Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #NBTDOTM
- my $NumArgs = $#ARGV + 1;#Determine the number of arguments the user has given us
- if ((($NumArgs == 0) or ($NumArgs == 2)) or ($NumArgs >= 4)) {
- #Our user hasn't entered anything. Display help screen.
- header();
- exit();}
- if (($NumArgs == 1) or ($NumArgs == 3)) {
- #Our user has entered a list. Time to split it!
- my $comboloc = $ARGV[0]; #Combo location is the first argument
- my $userloc = $ARGV[1]; #Userlist location is the 2nd argument
- my $passloc = $ARGV[2]; #Passlist location is 3rd argument
- #Set up output file location
- if ($userloc eq '') {
- $userloc = 'users.txt';}
- if ($passloc eq '') {
- $passloc = 'passwords.txt';}
- print qq{
- ----------------------------------------------------------------------
- Combo Splitter
- Custom Built by Juno
- NBTDOTM
- ----------------------------------------------------------------------
- };
- print "\nYour combolist is: $comboloc.";
- print "\nYour user list is: $userloc.";
- print "\nYour password list is: $passloc.";
- print "\n\nThe program is now generating your lists...\n";
- #Go line by line and separate the lists
- open COMBOLIST, $comboloc or die$!;
- my @COMBOS = COMBOLIST;
- while (my $COMBO = <COMBOLIST>) {
- chomp($COMBO);
- $position = rindex($COMBO, ":") + 1;
- $username = substr($COMBO, 0, ($position - 1));
- $password = substr($COMBO, $position);
- #Now write each element to their respective lists
- #User list
- open(OUTUSER, ">>$userloc");
- print OUTUSER "$username\n";
- close(OUTUSER);
- #Password list
- open(OUTPASS, ">>$passloc");
- print OUTPASS "$password\n";
- close(OUTPASS);
- } # Done with the current comboline
- print "\nYour lists have been successfully created.\n";
- exit();
- }
- sub header{
- print qq{
- ----------------------------------------------------------------------
- Combo Splitter
- Custom Built by Juno
- NBTDOTM
- ----------------------------------------------------------------------
- Usage: ComboCreator.pl [combo file] (output userlist] (output passwords.txt)
- Example: ComboCreator.pl combo.txt users.txt passwords.txt
- The program will take the supplied combo list and split them into two
- separate lists. The output argument is optional; the program will
- output users.txt and passwords.txt if left blank.
- Happy Hacking!
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement