Skip to content

Commit

Permalink
Merge pull request #187 from ecapson/master
Browse files Browse the repository at this point in the history
Autocrack fix
  • Loading branch information
s0lst1c3 authored Sep 17, 2021
2 parents f40c574 + 1d447ec commit e8d1ff8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions core/autocrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import select
import json
import core.utils
import re

from multiprocessing import Process
from settings import settings
Expand All @@ -22,6 +23,10 @@
ASLEAP_CMD = 'asleap -C %s -R %s -W %s | grep -v asleap | grep password'
EAP_USERS_ENTRY = '"%s"\tTTLS-PAP,TTLS-CHAP,TTLS-MSCHAP,MSCHAPV2,MD5,GTC,TTLS,TTLS-MSCHAPV2\t"%s"\t[2]'

challenge_pattern = re.compile("^([0-9A-Fa-f]{2}[:]){7}([0-9A-Fa-f]{2})$")
response_pattern = re.compile("^([0-9A-Fa-f]{2}[:]){23}([0-9A-Fa-f]{2})$")


def crack_locally(username, challenge, response, wordlist):

cmd = ASLEAP_CMD % (challenge, response, wordlist)
Expand Down Expand Up @@ -74,13 +79,13 @@ def run_autocrack(wordlist):

if remote_rig:
pass
else:

elif re.match(challenge_pattern, challenge) and re.match(response_pattern, response):
crack_locally(username,
challenge,
response,
wordlist)

else:
print('[autocrack] invalid input: {}'.format(data))

class Autocrack(object):

Expand Down

0 comments on commit e8d1ff8

Please sign in to comment.