Quick Python script to separate e-mails and passwords from combolists
by - Thursday, January 1, 1970 at 12:00 AM
Hello,

I just made this quick script in a few seconds to separate e-mails and passwords from combolists, because I needed to use e-mails and passwords payloads combinations in Burpsuite, and that the combolist format isn't supported by the application.

COMBOLIST = 'FILENAME'

with open(COMBOLIST, 'r+') as f:
combolist = f.readlines()
emails = open('emails.txt', 'a+')
passwords = open('passwords.txt', 'a+')
for combos in combolist:
combo = combos.split(":")
emails.write(combo[0])
emails.write('
')
passwords.write(combo[1])
print('Success.')


Hopefully it will be useful for other people as well. :D

Don't forget to change the COMBOLIST value to your file name for this to work.
Reply
Each line shouldn’t be a new code block which is why your post is broken. Do one code block for the whole script

https://pompur.in
Reply
I just done that, thanks for telling me about it!
Reply
Thanks, I began to write a script that would do it but i'm glad you share yourself
Reply
Good one
Reply
when writing files in python u should try and use f strings for writing
```
emails.write(combo[0])
emails.write('
')
passwords.write(combo[1])
```

rather then that u can condense it by doing

```
emails.write(f'{combo[0]}
')
passwords.write(f'{combo[1]}
')
```

Its good to have the habit of using f strings for when you are formatting so when you do even bigger things it makes it easier then using +'s or brand new lines for each part
Reply
nice simple script, really just depends how the input is formatted though in terms of seperating
Reply
(August 1, 2022, 07:56 AM)drain Wrote: when writing files in python u should try and use f strings for writing
```
emails.write(combo[0])
emails.write('
')
passwords.write(combo[1])
```

rather then that u can condense it by doing

```
emails.write(f'{combo[0]}
')
passwords.write(f'{combo[1]}
')
```

Its good to have the habit of using f strings for when you are formatting so when you do even bigger things it makes it easier then using +'s or brand new lines for each part


Thank you for the advice, and thank you to the others for the comments!
Reply
You can do this in a bash one line:
 

cut -d":" -f1 combolist.txt > emails.txt && cut -d":" -f2 combolist.txt > passwords.txt
Reply
Thanks for sharing. ;)
Reply


 Users viewing this thread: Quick Python script to separate e-mails and passwords from combolists: No users currently viewing.