#!/usr/bin/perl -w # Perl script to update dynup.net IP. # Author: Chris Ball. use strict; use IO::Socket; if (scalar @ARGV != 2) { print "Usage: perl $0 \n"; exit; } my $dynsock = IO::Socket::INET->new( PeerAddr => "www.dynup.net", PeerPort => "80", Proto => "tcp", Type => SOCK_STREAM) or die "Couldn't connect to the web server : $@\n"; # Send the HTTP request. print $dynsock "GET /update/java.php3?hostname=$ARGV[0]&password=$ARGV[1] HTTP/1.0\r\n\r\n"; # Print the last line of the socket response. # Usually "Update complete!", "Incorrect password..", or an HTTP error. print ((<$dynsock>)[-1]); # And we're done. print "\n$0 finished.\n";