From f8d996718cb1693d4bd6127c284480239b3208ea Mon Sep 17 00:00:00 2001 From: tautology0 Date: Thu, 22 Oct 2015 12:59:46 +0100 Subject: [PATCH] Added turba module --- Windows/src/LaZagne/config/manageModules.py | 4 +- .../src/LaZagne/softwares/games/roguestale.py | 2 +- Windows/src/LaZagne/softwares/games/turba.py | 58 +++++++++++++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 Windows/src/LaZagne/softwares/games/turba.py diff --git a/Windows/src/LaZagne/config/manageModules.py b/Windows/src/LaZagne/config/manageModules.py index 993a6937..fc79fe0e 100644 --- a/Windows/src/LaZagne/config/manageModules.py +++ b/Windows/src/LaZagne/config/manageModules.py @@ -33,6 +33,7 @@ from softwares.games.roguestale import RoguesTale from softwares.games.kalypsomedia import KalypsoMedia from softwares.games.galconfusion import GalconFusion +from softwares.games.turba import Turba def get_categories(): category = { @@ -72,7 +73,8 @@ def get_modules(): Secrets(), Skype(), SQLDeveloper(), - Squirrel(), + Squirrel(), + Turba(), Wifi(), WifiPass(), WinSCP() diff --git a/Windows/src/LaZagne/softwares/games/roguestale.py b/Windows/src/LaZagne/softwares/games/roguestale.py index 03b203e7..b94c168e 100644 --- a/Windows/src/LaZagne/softwares/games/roguestale.py +++ b/Windows/src/LaZagne/softwares/games/roguestale.py @@ -7,7 +7,7 @@ class RoguesTale(ModuleInfo): def __init__(self): - options = {'command': '-r', 'action': 'store_true', 'dest': 'roguestale', 'help': 'roguestale'} + options = {'command': '-r', 'action': 'store_true', 'dest': 'roguestale', 'help': 'Extract Rogue\'s Tale SHA1 password hashes.'} ModuleInfo.__init__(self, 'roguestale', 'games', options) def run(self): diff --git a/Windows/src/LaZagne/softwares/games/turba.py b/Windows/src/LaZagne/softwares/games/turba.py new file mode 100644 index 00000000..14742d1d --- /dev/null +++ b/Windows/src/LaZagne/softwares/games/turba.py @@ -0,0 +1,58 @@ +import os +from _winreg import HKEY_CURRENT_USER, OpenKey, QueryValueEx +from config.constant import * +from config.write_output import print_output, print_debug +from config.header import Header +from config.moduleInfo import ModuleInfo + +class Turba(ModuleInfo): + def __init__(self): + options = {'command': '-t', 'action': 'store_true', 'dest': 'turba', 'help': 'turba'} + ModuleInfo.__init__(self, 'turba', 'games', options) + + def run(self): + # print title + Header().title_info('Turba') + creds = [] + + # Find the location of steam - to make it easier we're going to use a try block + # 'cos I'm lazy + try: + with OpenKey(HKEY_CURRENT_USER, 'Software\Valve\Steam') as key: + results=QueryValueEx(key, 'SteamPath') + except: + print_debug('ERROR', 'Steam does not appear to be installed.') + return + + if not results: + print_debug('ERROR', 'Steam does not appear to be installed.') + return + + steampath=results[0] + steamapps = steampath + '\\SteamApps\common' + + # Check that we have a SteamApps directory + if not os.path.exists(steamapps): + print_debug('ERROR', 'Steam doesn\'t have a SteamApps directory.') + return + + filepath = steamapps + '\\Turba\\Assets\\Settings.bin' + + if not os.path.exists(filepath): + print_debug('ERROR', 'Turba doesn\'t appear to be installed.') + return + + # If we're here we should have a valid config file file + with open(filepath, mode='rb') as filepath: + # We've found a config file, now extract the creds + data = filepath.read() + values = {} + + chunk=data[0x1b:].split('\x0a') + values['Login'] = chunk[0] + values['Password'] = chunk[1] + creds.append(values) + + print_output("Turba", creds) + +