Here is the basics of the script I use. I created a signup.php page with a form containing the form fields of:
username
email
passwd
passwd2
domain
Then I used signup.pl as the form action and the perl script took care of the rest
I hope this helps!
#!/usr/bin/perl -w
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
print "Content-type: text/html\n\n";
@QUERY_STRING = split (/\&/, $ENV{QUERY_STRING});
foreach $line (@QUERY_STRING) {
( $var, $val ) = split (/\=/,$line);
$val =~ s/(\@|\%40)/\\\@/g;
eval "\$" . $var . " = \"" . $val . "\"\n"; print "<br>";
}
$browser = LWP::UserAgent->new();
$browser->agent('Mozilla/4.76 [en] (Win98; U)');
$browser->cookie_jar({});
push @{ $browser->requests_redirectable }, 'POST';
# change the username, password and ip address to your server information.
$url = 'http://reselleraccount:
[email protected]:2222/CMD_ACCOUNT_USER';
$response = $browser->post( $url,
[
action => 'create',
add => 'Submit',
username => "$username",
email => "$email",
passwd => "$passwd",
passwd2 =>"$passwd2",
domain => "$domain",
package => 'webstore',
ip => '192.168.0.2',
notify => 'yes'
]
);
die "Can't access admin tool -- ", $response->status_line
unless $response->is_success;
print $response->content;