1414
1515# Configuration
1616from lazagne .config .write_output import parseJsonResultToBuffer , print_debug , StandartOutput
17- from lazagne .config .changePrivileges import ListSids , rev2self , impersonate_sid_long_handle
17+ from lazagne .config .change_privileges import list_sids , rev2self , impersonate_sid_long_handle
1818from lazagne .config .manageModules import get_categories , get_modules
1919from lazagne .config .dpapi_structure import *
2020from lazagne .config .constant import *
@@ -115,7 +115,7 @@ def launch_module(module, dpapi_used=True, registry_used=True, system_module=Fal
115115 if args [i ] and i in module :
116116 modulesToLaunch .append (i )
117117 except :
118- # if no args
118+ # If no args
119119 pass
120120
121121 # Launch all modules
@@ -142,7 +142,7 @@ def launch_module(module, dpapi_used=True, registry_used=True, system_module=Fal
142142 )
143143 continue
144144
145- # run module
145+ # Run module
146146 for m in run_module (title = i , module = module [i ]):
147147 yield m
148148
@@ -169,9 +169,9 @@ def runModule(category_choosed, dpapi_used=True, registry_used=True, system_modu
169169 yield r
170170
171171 if constant .module_to_exec_at_end :
172- # these modules will need the windows user password to be able to decrypt dpapi blobs
172+ # These modules will need the windows user password to be able to decrypt dpapi blobs
173173 constant .dpapi = Decrypt_DPAPI (password = constant .user_password )
174- # add username to check username equals passwords
174+ # Add username to check username equals passwords
175175 constant .passwordFound .append (constant .username )
176176 constant .dpapi .check_credentials (constant .passwordFound )
177177
@@ -224,7 +224,7 @@ def get_user_list_on_filesystem(impersonated_user=[]):
224224 return all_users
225225
226226def set_env_variables (user , toImpersonate = False ):
227- # restore template path
227+ # Restore template path
228228 template_path = {
229229 'APPDATA' : u'{drive}:\\ Users\\ {user}\\ AppData\\ Roaming\\ ' ,
230230 'USERPROFILE' : u'{drive}:\\ Users\\ {user}\\ ' ,
@@ -262,7 +262,7 @@ def clean_temporary_files():
262262
263263def runLaZagne (category_choosed = 'all' , password = None ):
264264
265- # useful if this function is called from another tool
265+ # Useful if this function is called from another tool
266266 if password :
267267 constant .user_password = password
268268
@@ -285,7 +285,7 @@ def runLaZagne(category_choosed='all', password=None):
285285
286286 # --------- Impersonation using tokens ---------
287287
288- sids = ListSids ()
288+ sids = list_sids ()
289289 impersonateUsers = {}
290290 impersonated_user = [constant .username ]
291291
@@ -403,6 +403,7 @@ def runLaZagne(category_choosed='all', password=None):
403403 categories [c ]['subparser' ] += tmp
404404
405405 # ------------------------------------------- Print all -------------------------------------------
406+
406407 parents = [PPoptional ] + all_subparser + [PPwd , PWrite ]
407408 dic = {'all' :{'parents' :parents , 'help' :'Run all modules' , 'func' : runModule }}
408409 for c in categories :
0 commit comments