Advertisement
Guest User

Untitled

a guest
May 25th, 2015
20,175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.73 KB | None | 0 0
  1. LawMac:Desktop Lawrence$ more bruteforcea.pl
  2. #!/usr/bin/perl
  3. use Getopt::Std;
  4.  
  5. getopts('u:d:');
  6.  
  7. die "Usage $0 -u -d \n" if (!$opt_u && !$opt_d);
  8.  
  9. #Guardamos parametros
  10. my $uid=$opt_u;
  11. my $dict=$opt_d;
  12.  
  13. open (FILE,"<$dict");
  14.  
  15. #Por cada posible contraseña generada, probamos
  16. while ()
  17. {
  18.         chomp ($_);
  19.         my $resp=`diskutil cs unlockvolume $uid -passphrase $_ `;
  20.  
  21.         #Si acertamos, indicamos la contraseña correcta
  22.         if ($resp =~ m/successfully/i)
  23.         {
  24.                 print "Password found!!! It was \"$_\"\n";
  25.                 print "$resp\n";
  26.                 exit(0);        
  27.         }
  28. }
  29. close (FILE);
  30. print "Password not found in diccionary $dict. Insert coin and play again\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement