The above code is tested but there are other things to think about, too. You might want to randomly pull a few usernames each time so different users are signed in after each login session. It'll make it look more realistic to people who are looking at account profiles seeing the last access/login time for each user.use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $url = "url.here"; $mech->get( $url ); $mech->submit_form( form_number => 2, fields => { username => 'name', passwrd => 'pass', } ); my $mech2 = WWW::Mechanize->new(); $mech2->get( $url ); $mech2->submit_form( form_number => 2, fields => { username => 'name', passwrd => 'pass', } ); my $mech3 = WWW::Mechanize->new(); $mech3->get( $url ); $mech3->submit_form( form_number => 2, fields => { username => 'name', passwrd => 'pass', } ); print "done";
You could also add a flatfile database and use a logout script to randomly pull a name or two of your signed in users every X minutes, too.
This is the basics, but think about making it perform a little more realistic.
In reply to Re: creating script that logs in to site under different names
by sulfericacid
in thread creating script that logs in to site under different names
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |