| skipped 22 lines |
23 | 23 | | try: |
24 | 24 | | print('[+] Connection from '+ self.client_address[0]) |
25 | 25 | | p = multiprocessing.Pool(5) |
26 | | - | for output in p.imap_unordered(self.search, iter(self.rfile.readline, b'\n')): |
| 26 | + | for output in p.imap_unordered(self.search, iter(str(self.rfile.readline), '\n')): |
27 | 27 | | if not output[0]: |
28 | 28 | | #error'd out. print the results, but don't send them on? |
29 | 29 | | print(output[1]) |
| skipped 6 lines |
36 | 36 | | |
37 | 37 | | print('[$] Closing connection from {}\n'.format(self.client_address[0])) |
38 | 38 | | except Exception as e: |
39 | | - | self.wfile.write(b'{{"SEARCH":"ERROR", "RESULTS":"{}"}}'.format(e)) |
| 39 | + | self.wfile.write('{{"SEARCH":"ERROR", "RESULTS":"{}"}}'.format(e).decode()) |
40 | 40 | | print("[-] Exception Caught: {}".format(e)) |
41 | 41 | | |
42 | 42 | | def search(data): |
| skipped 48 lines |