December 10th, 2008
I recently needed to bulk load some entries to the DynDNS custom DNS service, I ended up using wget and a couple of bash for loops. This was the crux of it:
To login:
wget --keep-session-cookies \
--save-cookies cookies.txt \
--post-data="__login=1&username=${USERNAME}&password=${PASSWORD}" \
https://www.dyndns.com/account/
To check you are logged in:
wget --keep-session-cookies \
--load-cookies cookies.txt \
https://www.dyndns.com/account/services/zones/dns/
grep the page for ‘Logged’ you should see it say something like ‘Logged in user: blah’.
Also look towards the bottom of the page for the ‘multiform’ hidden form element, you need the value which is a string, something like ‘jaoEEPpxzAhfadQZ/dpO/A341374′
To add an entry:
NAME=test
IP=1.2.3.4
MULTIFORM="jaoEEPpxzAhfadQZ/dpO/A341374"
wget --keep-session-cookies \
--load-cookies cookies.txt \
--post-data="name_new=${NAME}&ttl_new=600&type_new=A&data_new=${IP}&submit=submit&multiform=${MULTIFORM}" \
https://www.dyndns.com/account/services/zones/dns/
No Comments » |
Uncategorized |
Permalink
Posted by robin
November 14th, 2008
I never remember how to make Solaris ping show the time of each ping, like GNU Ping does, without any arguments the output is like:
% ping foo
foo is alive
%
If you want to see the time of each ping, use -s which makes it more like the GNU Ping you find on linux:
% ping -s foo
PING foo: 56 data bytes
64 bytes from foo.somedomain.com (10.44.101.16): icmp_seq=0. time=0. ms
64 bytes from foo.somedomain.com (10.44.101.16): icmp_seq=1. time=0. ms
^C
----foo PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
%
That is all.
No Comments » |
Solaris |
Permalink
Posted by robin
August 18th, 2008
Every so often I need a copy of one or all of these on a new machine. I tend to normally use RPM based distros and always have issues trying to find RPMS of these packages. As a result I’ve packaged them up and put them in my svn repo.
Feel free to checkout that directory, it includes a readme of how to build them for a system I’ve yet to need them on. replace the fc7 or el5 with something appropriate for your distribution.
Direct download links:
Redhat/Centos 5:
Fedora 7:
No Comments » |
Fedora, RPM, Redhat, Uncategorized |
Permalink
Posted by robin
August 18th, 2008
I’ve just had to struggle with the hex ip addresses which dnscache logs, after a bit of searching I found some nice notes about the log format here thanks to Rob Mayoff.
Finally I found this handy perl script.
No Comments » |
Uncategorized |
Permalink
Posted by robin
December 19th, 2007
Laptop for reference HP Compaq 6910p Notebook
Specs:
- 75Gb Disk
- 2.0 Ghz Core 2 Duo
- 1Gb Ram
No Comments » |
Hardware |
Permalink
Posted by robin
December 3rd, 2007
I’ve just had to delete a bunch of messages from an Exim queue and I found this to be useful:
# exiqgrep -f billg@microsoft.com
Will print out details for any messages from that address.
To delete any messages from a person use the f as well as the i flags to print out just the message id, this can neatly be piped to xargs:
# exiqgrep -i billg@microsoft.com | xargs exim -Mrm
No Comments » |
Exim |
Permalink
Posted by robin
August 21st, 2007
To restart things run:
# svcadm restart ssh
To list the currently known svcs use:
# svcs
Sun have a nice guide here on their BigAdmin site.
No Comments » |
Solaris |
Permalink
Posted by robin