|
|
@ -13,11 +13,14 @@ parser.add_argument('-a', dest='attachment_dir', action='store', default='attach
|
|
|
|
args = parser.parse_args()
|
|
|
|
args = parser.parse_args()
|
|
|
|
options = vars(args)
|
|
|
|
options = vars(args)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if os.path.isfile(options['database']) == False:
|
|
|
|
|
|
|
|
print "Database file not found. Use the -d switch to specify a custom database path."
|
|
|
|
|
|
|
|
exit(1)
|
|
|
|
|
|
|
|
|
|
|
|
# Connect to database
|
|
|
|
# Connect to database
|
|
|
|
database = sqlite3.connect(options['database'])
|
|
|
|
database = sqlite3.connect(options['database'])
|
|
|
|
cursor = database.cursor()
|
|
|
|
cursor = database.cursor()
|
|
|
|
|
|
|
|
|
|
|
|
cursor.execute("SELECT * FROM emails")
|
|
|
|
for message in cursor.execute("SELECT * FROM emails"):
|
|
|
|
email_list = cursor.fetchall()
|
|
|
|
message_id, sender, recipient, subject, timestamp, textbody, htmlbody, sha1_hash = message
|
|
|
|
|
|
|
|
|
|
|
|
print email_list
|
|
|
|
|
|
|
|