Skip to content

Commit

Permalink
more flexible code and architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro ZANNI committed Aug 23, 2016
1 parent 057e5d8 commit 0c7268c
Show file tree
Hide file tree
Showing 58 changed files with 315 additions and 445 deletions.
94 changes: 0 additions & 94 deletions Windows/src/LaZagne/config/manageModules.py

This file was deleted.

1 change: 0 additions & 1 deletion Windows/src/LaZagne/config/write_output.py

This file was deleted.

51 changes: 27 additions & 24 deletions Windows/src/LaZagne/laZagne.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,24 @@
import getpass

# Softwares that passwords can be retrieved without needed to be in the user environmment
from softwares.browsers.mozilla import Mozilla
from softwares.wifi.wifipass import WifiPass
from softwares.windows.secrets import Secrets
from softwares.chats.jitsi import Jitsi
from softwares.chats.pidgin import Pidgin
from softwares.databases.dbvis import Dbvisualizer
from softwares.databases.sqldeveloper import SQLDeveloper
from softwares.games.kalypsomedia import KalypsoMedia
from softwares.games.roguestale import RoguesTale
from softwares.sysadmin.filezilla import Filezilla

from lazagne.softwares.browsers.mozilla import Mozilla
from lazagne.softwares.wifi.wifipass import WifiPass
from lazagne.softwares.windows.secrets import Secrets
from lazagne.softwares.chats.jitsi import Jitsi
from lazagne.softwares.chats.pidgin import Pidgin
from lazagne.softwares.databases.dbvis import Dbvisualizer
from lazagne.softwares.databases.sqldeveloper import SQLDeveloper
from lazagne.softwares.games.kalypsomedia import KalypsoMedia
from lazagne.softwares.games.roguestale import RoguesTale
from lazagne.softwares.sysadmin.filezilla import Filezilla

# Configuration
from config.header import Header
from config.write_output import write_header, write_footer, print_footer, print_debug, parseJsonResult, parseJsonResultToBuffer
from config.constant import *
from config.manageModules import get_categories, get_modules
from config.changePrivileges import ListSids, GetUserName, create_proc_as_sid, rev2self, getsystem, isChildProcess, isProcessStillAlive
from config.get_system_priv import get_system_priv
from lazagne.config.header import Header
from lazagne.config.write_output import write_header, write_footer, print_footer, print_debug, parseJsonResult, parseJsonResultToBuffer, print_output
from lazagne.config.constant import *
from lazagne.config.manageModules import get_categories, get_modules
from lazagne.config.changePrivileges import ListSids, GetUserName, create_proc_as_sid, rev2self, getsystem, isChildProcess, isProcessStillAlive
from lazagne.config.get_system_priv import get_system_priv

category = get_categories()
moduleNames = get_modules()
Expand Down Expand Up @@ -95,16 +94,20 @@ def verbosity():

def launch_module(b):
ok = False
modulesToLaunch = []
# Launch only a specific module
for i in args:
if args[i] and i in b:
b[i].run()
ok = True

modulesToLaunch.append(i)

# Launch all modules
if not ok:
for i in b:
b[i].run()
if not modulesToLaunch:
modulesToLaunch = b

for i in modulesToLaunch:
Header().title_info(i.capitalize()) # print title
pwdFound = b[i].run(i.capitalize()) # run the module
print_output(i.capitalize(), pwdFound) # print the results

def manage_advanced_options():
# File used for dictionary attacks
Expand Down Expand Up @@ -398,7 +401,7 @@ def error(self, message):
constant.finalResults = {}
constant.finalResults['User'] = user_selected

# Try to retrieve all passwords from softwares which do not need to be in the user session
# Try to retrieve all passwords from lazagne.softwares which do not need to be in the user session
constant.mozilla_software = 'Firefox'
Mozilla(False).run()
constant.mozilla_software = 'Thunderbird'
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ctypes import *
import subprocess
import psutil
from config.write_output import print_debug
from lazagne.config.write_output import print_debug

LPVOID = c_void_p
PVOID = LPVOID
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
94 changes: 94 additions & 0 deletions Windows/src/LaZagne/lazagne/config/manageModules.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# browsers
from lazagne.softwares.browsers.mozilla import Mozilla
from lazagne.softwares.browsers.chrome import Chrome
from lazagne.softwares.browsers.opera import Opera
from lazagne.softwares.browsers.ie import IE
# windows
from lazagne.softwares.windows.network import Network
from lazagne.softwares.windows.dot_net import Dot_net
from lazagne.softwares.windows.secrets import Secrets
# sysadmin
from lazagne.softwares.sysadmin.filezilla import Filezilla
from lazagne.softwares.sysadmin.cyberduck import Cyberduck
from lazagne.softwares.sysadmin.puttycm import Puttycm
from lazagne.softwares.sysadmin.winscp import WinSCP
from lazagne.softwares.sysadmin.coreftp import CoreFTP
from lazagne.softwares.sysadmin.ftpnavigator import FtpNavigator
from lazagne.softwares.sysadmin.apachedirectorystudio import ApacheDirectoryStudio
from lazagne.softwares.sysadmin.opensshforwindows import OpenSSHForWindows
# svn
from lazagne.softwares.svn.tortoise import Tortoise
# git
from lazagne.softwares.git.gitforwindows import GitForWindows
# maven
from lazagne.softwares.maven.mavenrepositories import MavenRepositories
# chats
from lazagne.softwares.chats.skype import Skype
from lazagne.softwares.chats.pidgin import Pidgin
from lazagne.softwares.chats.jitsi import Jitsi
# wifi
from lazagne.softwares.wifi.wifi import Wifi
from lazagne.softwares.wifi.wifipass import WifiPass
# mails
from lazagne.softwares.mails.outlook import Outlook
# databases
from lazagne.softwares.databases.sqldeveloper import SQLDeveloper
from lazagne.softwares.databases.squirrel import Squirrel
from lazagne.softwares.databases.dbvis import Dbvisualizer
# games
from lazagne.softwares.games.roguestale import RoguesTale
from lazagne.softwares.games.kalypsomedia import KalypsoMedia
from lazagne.softwares.games.galconfusion import GalconFusion
from lazagne.softwares.games.turba import Turba

def get_categories():
category = {
'chats': {'help': 'Chat clients supported'},
'sysadmin': {'help': 'SCP/SSH/FTP/FTPS clients supported'},
'database': {'help': 'SQL clients supported'},
'svn': {'help': 'SVN clients supported'},
'git': {'help': 'GIT clients supported'},
'maven': {'help': 'Maven java build tool'},
'mails': {'help': 'Email clients supported'},
'wifi': {'help': 'Wifi'},
'browsers': {'help': 'Web browsers supported'},
'windows': {'help': 'Windows credentials (credential manager, etc.)'},
'games': {'help': 'Games etc.'}
}
return category

def get_modules():
moduleNames = [
Dbvisualizer(),
Dot_net(),
Chrome(),
CoreFTP(),
Cyberduck(),
Filezilla(),
FtpNavigator(),
IE(),
GalconFusion(),
Jitsi(),
KalypsoMedia(),
Mozilla(),
Network(),
Opera(),
Outlook(),
Pidgin(),
Puttycm(),
RoguesTale(),
Tortoise(),
Secrets(),
Skype(),
SQLDeveloper(),
Squirrel(),
Turba(),
Wifi(),
WifiPass(),
WinSCP(),
GitForWindows(),
MavenRepositories(),
ApacheDirectoryStudio(),
OpenSSHForWindows()
]
return moduleNames
File renamed without changes.
Loading

0 comments on commit 0c7268c

Please sign in to comment.