# Create a user agent object use LWP::UserAgent; $ua = new LWP::UserAgent; $ua->agent("AgentName/0.1 " . $ua->agent); # Create a request my $req = new HTTP::Request POST => 'http://127.0.0.1/cgi-bin/bank05.cgi'; $req->content_type('application/x-www-form-urlencoded'); ($name,$password)=@ARGV; if (($name eq "") || ($password eq "") || ($name eq "-h")){ print "Usage: Perl onlinebankrobot.pl userID password "; exit; } $req->content("name=$name&password=$password"); # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response if ($res->is_success) { #print $res->content; $_=$res->content; if (/unable to verify/) { print "Database was unable to verify your userid and password"; exit; } ($match) = /