1 | 1 | | #!/usr/bin/env python3 |
2 | 2 | | # server for hosting exploit search |
3 | 3 | | |
4 | | - | from exploitdb import exploitdb |
| 4 | + | try: |
| 5 | + | from exploitdb import exploitdb |
| 6 | + | except: |
| 7 | + | import os |
| 8 | + | os.system('cd exploitdb; git submodule init; git submodule update') |
5 | 9 | | import socketserver |
6 | 10 | | |
7 | 11 | | _PORT_ = 4521 |
| skipped 10 lines |
18 | 22 | | for exploits in results: |
19 | 23 | | output.append(exploits[0]['description'] + ' id: ' + exploits[0]['id']) |
20 | 24 | | if len(output) > 0: |
| 25 | + | print(''.join(output)) |
21 | 26 | | self.wfile.write('\n'.join(output).encode() + b'\n') |
22 | 27 | | data = self.rfile.readline().decode().strip() |
23 | 28 | | print('[-] Closing connection from ' + self.client_address[0]) |
| skipped 25 lines |