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 | + | print("-"*80) |
| 9 | + | print('Submodule not found. Setting up...') |
| 10 | + | os.system('cd exploitdb; git submodule init; git submodule update') |
| 11 | + | print("-"*80) |
| 12 | + | print("Please run again for full functionality.") |
| 13 | + | exit() |
5 | 14 | | import socketserver |
6 | 15 | | |
7 | 16 | | _PORT_ = 4521 |
| skipped 10 lines |
18 | 27 | | for exploits in results: |
19 | 28 | | output.append(exploits[0]['description'] + ' id: ' + exploits[0]['id']) |
20 | 29 | | if len(output) > 0: |
| 30 | + | print(''.join(output)) |
21 | 31 | | self.wfile.write('\n'.join(output).encode() + b'\n') |
22 | 32 | | data = self.rfile.readline().decode().strip() |
23 | 33 | | print('[-] Closing connection from ' + self.client_address[0]) |
| skipped 25 lines |