Skip to content

Commit

Permalink
+ Build a matrix with our pending work
Browse files Browse the repository at this point in the history
  • Loading branch information
matricali committed Jun 6, 2017
1 parent 453f2eb commit d46707a
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions bin/brutekrag
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ elif args.single is None:
sys.exit(255)



'''
BUILD MATRIX
'''
matrix = []
if args.single is not None:
# Single file
dictionary = []
Expand All @@ -129,22 +132,25 @@ if args.single is not None:
username, password = line.split(args.separator)
password = password.strip('$BLANKPASS')
for target in targets:
try:
btkg = brutekrag.brutekrag(target.strip(), args.port, timeout=args.timeout)
btkg.connect(username.strip(), password.strip('\n'))
except Exception as ex:
print_error(str(ex))
matrix.append([target.strip(), username.strip(), password.strip('\n')])

else:
# Separated 1n1 username passwords
print('')
for username in users:
for password in passwords:
password = password.strip('$BLANKPASS')
for target in targets:
try:
btkg = brutekrag.brutekrag(target.strip(), args.port, timeout=args.timeout)
btkg.connect(username.strip(), password.strip('\n'))
except Exception as ex:
print_error(str(ex))
matrix.append([target.strip(), username.strip(), password.strip('\n')])


print('%d total loggin attemps.\n' % len(matrix))
for loginAttempt in matrix:
try:
btkg = brutekrag.brutekrag(loginAttempt[0], args.port, timeout=args.timeout)
btkg.connect(loginAttempt[1], loginAttempt[2])
except Exception as ex:
print_error(str(ex))


print('Bye...')

0 comments on commit d46707a

Please sign in to comment.