Advertisement
Guest User

Juno

a guest
May 22nd, 2009
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.36 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #NBTDOTM
  3. my $NumArgs = $#ARGV + 1;#Determine the number of arguments the user has given us
  4. if ($NumArgs <= 1) {
  5.     #Our user has only entered some information. Display help screen.
  6.     header();
  7.     exit();}
  8. if (($NumArgs == 2) or ($NumArgs == 3)) {  
  9.     my $userloc = $ARGV[0]; #Host is the first argument supplied
  10.     my $passloc = $ARGV[1]; #Username is the 2nd argument supplied
  11.     my $outloc = $ARGV[2]; #Passlist location is 3rd argument  
  12. print qq{
  13. ----------------------------------------------------------------------
  14.                    Combo Creator             
  15.                 Custom Built by Juno             
  16.                               NBTDOTM                                
  17. ----------------------------------------------------------------------
  18. };
  19. print "\nYour user list is: $userloc.";
  20. print "\nYour password list is: $passloc.";
  21. goto NOOUTLOC if ($outloc eq '');
  22. print "\nYour combolist will be saved to: $outloc.";
  23. NOOUTLOC:
  24. #Set up output file location
  25. if ($outloc eq '') {
  26.     $outloc = 'combo.txt';
  27.     }
  28.    
  29. print "\nThe program is now generating your combolist...\n";   
  30. #Go user by user and apply password to user
  31. open USERLIST, $userloc or die$!;
  32. my @users = USERLIST;
  33.     while (my $user = <USERLIST>) {
  34.         chomp($user);
  35.         #Use passlist and generate combolist in this subroutine
  36.         open PASSLIST, $passloc or die $!;
  37.         my @pass = PASSLIST;
  38.         while (my $password = <PASSLIST>) {
  39.             chomp($password);
  40.             #Perform the file operation
  41.             open(OUTFILE, ">>$outloc");
  42.             print OUTFILE "$user:$password\n";
  43.             close(OUTFILE);
  44.             print "                        \rProcessing: $user:$password";     
  45.             } #Done with current password
  46.     } #Done with current user
  47. print "\nYour combolist has been successfully created at: $outloc.";
  48. exit();
  49. }
  50. sub header{
  51. print qq{
  52. ----------------------------------------------------------------------
  53.                    Combo Creator             
  54.                 Custom Built by Juno             
  55.                               NBTDOTM                                
  56. ----------------------------------------------------------------------
  57. Usage: ComboCreator.pl [userlist] [passwordlist] (output file)
  58.  
  59. Example: ComboCreator.pl users.txt passwords.txt combo.txt
  60.  
  61. The program will take the supplied userlist and password list and
  62. combine them into a combo list.  The output argument is optional;
  63. the program will output combo.txt if left blank.
  64. Happy Hacking!
  65. }; 
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement