Skip to content

Commit 1bcd182

Browse files
committed
Removed considering -debug in each example. Now it's handled in utils.
1 parent 809f968 commit 1bcd182

11 files changed

+0
-76
lines changed

examples/GetADComputers.py

-7
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,6 @@ def run(self):
283283
# Init the example's logger theme
284284
logger.init(options.ts, options.debug)
285285

286-
if options.debug is True:
287-
logging.getLogger().setLevel(logging.DEBUG)
288-
# Print the Library's installation path
289-
logging.debug(version.getInstallationPath())
290-
else:
291-
logging.getLogger().setLevel(logging.INFO)
292-
293286
domain, username, password = parse_credentials(options.target)
294287

295288
if domain == '':

examples/GetADUsers.py

-7
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,6 @@ def run(self):
242242
# Init the example's logger theme
243243
logger.init(options.ts, options.debug)
244244

245-
if options.debug is True:
246-
logging.getLogger().setLevel(logging.DEBUG)
247-
# Print the Library's installation path
248-
logging.debug(version.getInstallationPath())
249-
else:
250-
logging.getLogger().setLevel(logging.INFO)
251-
252245
domain, username, password = parse_credentials(options.target)
253246

254247
if domain == '':

examples/GetLAPSPassword.py

-7
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,6 @@ def run(self):
339339
# Init the example's logger theme
340340
logger.init(options.ts, options.debug)
341341

342-
if options.debug is True:
343-
logging.getLogger().setLevel(logging.DEBUG)
344-
# Print the Library's installation path
345-
logging.debug(version.getInstallationPath())
346-
else:
347-
logging.getLogger().setLevel(logging.INFO)
348-
349342
domain, username, password = parse_credentials(options.target)
350343

351344
if domain == '':

examples/GetNPUsers.py

-7
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,6 @@ def request_multiple_TGTs(self, usernames):
440440
# Init the example's logger theme
441441
logger.init(options.ts, options.debug)
442442

443-
if options.debug is True:
444-
logging.getLogger().setLevel(logging.DEBUG)
445-
# Print the Library's installation path
446-
logging.debug(version.getInstallationPath())
447-
else:
448-
logging.getLogger().setLevel(logging.INFO)
449-
450443
domain, username, password = parse_credentials(options.target)
451444

452445
if domain == '':

examples/GetUserSPNs.py

-7
Original file line numberDiff line numberDiff line change
@@ -543,13 +543,6 @@ def request_multiple_TGSs(self, usernames):
543543
' a list of SPNs and/or sAMAccountNames to Kerberoast.')
544544
sys.exit(1)
545545

546-
if options.debug is True:
547-
logging.getLogger().setLevel(logging.DEBUG)
548-
# Print the Library's installation path
549-
logging.debug(version.getInstallationPath())
550-
else:
551-
logging.getLogger().setLevel(logging.INFO)
552-
553546
userDomain, username, password = parse_credentials(options.target)
554547

555548
if userDomain == '':

examples/atexec.py

-7
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,6 @@ def cmd_split(cmdline):
292292
logging.error('You need to specify a command to execute!')
293293
sys.exit(1)
294294

295-
if options.debug is True:
296-
logging.getLogger().setLevel(logging.DEBUG)
297-
# Print the Library's installation path
298-
logging.debug(version.getInstallationPath())
299-
else:
300-
logging.getLogger().setLevel(logging.INFO)
301-
302295
domain, username, password, address = parse_target(options.target)
303296

304297
if domain is None:

examples/getPac.py

-7
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,6 @@ def dump(self):
321321
from getpass import getpass
322322
password = getpass("Password:")
323323

324-
if options.debug is True:
325-
logging.getLogger().setLevel(logging.DEBUG)
326-
# Print the Library's installation path
327-
logging.debug(version.getInstallationPath())
328-
else:
329-
logging.getLogger().setLevel(logging.INFO)
330-
331324
try:
332325
dumper = S4U2SELF(options.targetUser, username, password, domain, options.hashes)
333326
dumper.dump()

examples/getST.py

-7
Original file line numberDiff line numberDiff line change
@@ -799,13 +799,6 @@ def run(self):
799799
# Init the example's logger theme
800800
logger.init(options.ts, options.debug)
801801

802-
if options.debug is True:
803-
logging.getLogger().setLevel(logging.DEBUG)
804-
# Print the Library's installation path
805-
logging.debug(version.getInstallationPath())
806-
else:
807-
logging.getLogger().setLevel(logging.INFO)
808-
809802
domain, username, password = parse_credentials(options.identity)
810803

811804
try:

examples/goldenPac.py

-7
Original file line numberDiff line numberDiff line change
@@ -1121,13 +1121,6 @@ def exploit(self):
11211121
logging.critical('Domain should be specified!')
11221122
sys.exit(1)
11231123

1124-
if options.debug is True:
1125-
logging.getLogger().setLevel(logging.DEBUG)
1126-
# Print the Library's installation path
1127-
logging.debug(version.getInstallationPath())
1128-
else:
1129-
logging.getLogger().setLevel(logging.INFO)
1130-
11311124
if password == '' and username != '' and options.hashes is None:
11321125
from getpass import getpass
11331126
password = getpass("Password:")

examples/keylistattack.py

-6
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,6 @@ def getAllDomainUsers(self):
186186
# Init the example's logger theme
187187
logger.init(options.ts, options.debug)
188188

189-
if options.debug is True:
190-
logging.getLogger().setLevel(logging.DEBUG)
191-
logging.debug(version.getInstallationPath())
192-
else:
193-
logging.getLogger().setLevel(logging.INFO)
194-
195189
if options.rodcNo is None:
196190
logging.error("You must specify the RODC number (krbtgt_XXXXX)")
197191
sys.exit(1)

examples/psexec.py

-7
Original file line numberDiff line numberDiff line change
@@ -649,13 +649,6 @@ def run(self):
649649
if CODEC is None:
650650
CODEC = 'utf-8'
651651

652-
if options.debug is True:
653-
logging.getLogger().setLevel(logging.DEBUG)
654-
# Print the Library's installation path
655-
logging.debug(version.getInstallationPath())
656-
else:
657-
logging.getLogger().setLevel(logging.INFO)
658-
659652
domain, username, password, remoteName = parse_target(options.target)
660653

661654
if domain is None:

0 commit comments

Comments
 (0)