# This code is provided "as is" with NO WARRANTY expressed or # implied. You may use it freely at your own risk. #!/usr/bin/perl use HTTP::Request::Common qw(POST); use LWP::UserAgent; sleep(30); $count = 0; while ($count < 50) { $count++; $ip = `/sbin/ifconfig`; $ip =~ s/.*(ppp0)(.*)/$2/s; if ($1) { $ip =~ s/.*inet addr:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*/$1/s; print "IP is $ip\n"; $ua = new LWP::UserAgent; $ua->agent("DarkSpell/6.0"); # the so-called "browser string" $process = 'http://www.tsx.org/update.cfm?Code=Process'; $request = POST $process, ["HostName" => "macondo", "URL_required" => "Please enter the URL", "Password_required" => "Please enter your Password", "Owner_required" => "Please enter the Owner's Name", "Email_required" => "Please enter email address", "URL" => "http://$ip", "Owner" => "John Byrd", "Email" => "jbyrd\@vnet.net", "Password" => "81987", "Popup" => "0", "Adult" => "0", "Title" => "", "Keywords" => "", "Description" => "", "HomePage" => "http://" ]; $request->header('Accept' => 'text/html'); $response = $ua->request($request); if ($response->is_success) { exit(0); } } sleep(4); }