MCPcopy Create free account
hub / github.com/RobinMeis/MITMsmtp / handle

Method handle

MITMsmtp/SMTPHandler.py:40–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38 Handles a new TCP Connection to SMTPServer following SMTP Protocol
39 """
40 def handle(self):
41 self.init()
42 try:
43 self.sendGreeting()
44 self.readEHLO()
45 self.sendHELLO()
46 if (self.server.STARTTLS == True and self.startedTLS == False):
47 self.STARTTLS()
48 self.sendAuthTypes()
49 self.readAuth()
50 self.readSender()
51 self.sendOK()
52 self.readRecipients()
53 self.sendIntermediate()
54 self.readMSG()
55 self.sendOK()
56 except Exception as e:
57 print("Closed connection!")
58 self.connection.close()
59 raise e
60 else:
61 self.message.setComplete()
62 self.connection.close()
63
64 """
65 Send a greeting message

Callers

nothing calls this directly

Calls 13

initMethod · 0.95
sendGreetingMethod · 0.95
readEHLOMethod · 0.95
sendHELLOMethod · 0.95
STARTTLSMethod · 0.95
sendAuthTypesMethod · 0.95
readAuthMethod · 0.95
readSenderMethod · 0.95
sendOKMethod · 0.95
readRecipientsMethod · 0.95
sendIntermediateMethod · 0.95
readMSGMethod · 0.95

Tested by

no test coverage detected