From 72e3668a663ccaaf1738a778c320c463bb4de471 Mon Sep 17 00:00:00 2001 From: b4ggio-su Date: Wed, 2 Jan 2019 21:10:01 +0000 Subject: [PATCH] Cookie Decryter --- CookieDecrypter.py | 20 ++++++++++++++++++++ DB.py | 13 ++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 CookieDecrypter.py diff --git a/CookieDecrypter.py b/CookieDecrypter.py new file mode 100644 index 0000000..89b17f4 --- /dev/null +++ b/CookieDecrypter.py @@ -0,0 +1,20 @@ +#!/usr/bin/python + +from DB import * +from Colours import * +from Core import * +import os, sys, re + +file = open(sys.argv[1], "r") +result = get_keys() + +for line in file: + if re.search("SessionID", line): + if result: + for i in result: + try: + value = decrypt(i[0], line.split('=')[1]) + print (Colours.GREEN + "Success with Key %s - %s" % (i[0],value)) + except: + print (Colours.RED + "Failed with Key %s" % i[0]) + diff --git a/DB.py b/DB.py index a31f5a2..8d6b021 100644 --- a/DB.py +++ b/DB.py @@ -621,4 +621,15 @@ def get_newtasks(randomuri): if result: return result else: - return None \ No newline at end of file + return None + +def get_keys(): + conn = sqlite3.connect(DB) + conn.row_factory = sqlite3.Row + c = conn.cursor() + result = c.execute("SELECT EncKey FROM C2Server") + result = c.fetchall() + if result: + return result + else: + return None