Closed BusesCanFly closed 5 years ago
Put a commit!
this weekend I will publish some updates.
Here is a quick PoC: (Super dirty combo of python and bash but /shrug)
Script:
#!/usr/bin/env python
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-if', '--raw_list', type=str, help='Raw list of emails from the cc list')
parser.add_argument('-of', '--clean_list', type=str, help='Name for sorted list')
args = parser.parse_args()
os.system("cat "+args.raw_list+ "| sed \'s/\\s\+/\\n/g\' | grep @ | tr -d \'<>,\"\' > "+args.clean_list)
Usage:
root@BusesCanFly:~/pwndb# ls
cc_sort.py lists pwndb.py raw_email_cc_list.txt
root@BusesCanFly:~/pwndb# ./cc_sort.py -h
usage: cc_sort.py [-h] [-if RAW_LIST] [-of CLEAN_LIST]
optional arguments:
-h, --help show this help message and exit
-if RAW_LIST, --raw_list RAW_LIST
Raw list of emails from the cc list
-of CLEAN_LIST, --clean_list CLEAN_LIST
root@BusesCanFly:~/pwndb# ./cc_sort.py -if raw_email_cc_list.txt -of formatted.txt
root@BusesCanFly:~/pwndb# ls
cc_sort.py formatted.txt lists pwndb.py raw_email_cc_list.txt
root@BusesCanFly:~/pwndb#
This isn't an issue, but a feature request/idea/general comment.
If you are part of/found an email chain with a list of cc's, they come in the format of:
"name <email@email.email>, name1 <email1@email.email>," etc...
An easy way to sort that is to copy and paste the raw cc list into a file and then runcat [filename] | sed 's/\s\+/\n/g' | grep "@" | tr -d '<>,"'
This properly formats the list so it can passed through./pwndb --list
:D