|
21 | 21 | import time |
22 | 22 |
|
23 | 23 | import FakeDns.fakedns as fakedns |
| 24 | + from makeftp import make_ftp |
24 | 25 | except ImportError: |
25 | 26 | if sys.version_info.major < 3: |
26 | 27 | print('ERROR: This must be run on Python 3') |
|
30 | 31 | sys.exit() |
31 | 32 | else: |
32 | 33 | print('ERROR: Import Error') |
| 34 | + print('Download from the releases page or clone with `--recursive`') |
33 | 35 | try: |
34 | 36 | input('Press [ENTER] to exit') |
35 | 37 | finally: |
@@ -290,25 +292,31 @@ def payload_brain(ipaddr): |
290 | 292 | payloads.append(files) |
291 | 293 | except IOError: |
292 | 294 | pass |
293 | | - if not payloads: |
294 | | - print('>> No payloads found') |
295 | | - elif AUTOSEND in payloads: |
| 295 | + |
| 296 | + if AUTOSEND in payloads: |
296 | 297 | with open(os.path.join(PAYLOAD_LOC, AUTOSEND), 'rb') as buf: |
297 | 298 | print('>> Sending {}...'.format(AUTOSEND)) |
298 | 299 | content = buf.read() |
299 | 300 | send_payload(ipaddr, 9020, content) |
| 301 | + |
| 302 | + payloads.insert(0, 'Don\'t send a payload') |
| 303 | + payloads.insert(1, 'Integrated FTP') |
| 304 | + choice = menu('Payload', payloads) |
| 305 | + if choice == 1: |
| 306 | + print('>> Sending integrated FTP...') |
| 307 | + content = make_ftp(ipaddr) |
| 308 | + send_payload(ipaddr, 9020, content) |
| 309 | + print('>> Connect at {}:1337'.format(ipaddr)) |
| 310 | + send_another(ipaddr) |
| 311 | + elif choice != 0: |
| 312 | + path = os.path.join(PAYLOAD_LOC, payloads[choice]) |
| 313 | + with open(path, 'rb') as buf: |
| 314 | + print('>> Sending {}...'.format(payloads[choice])) |
| 315 | + content = buf.read() |
| 316 | + send_payload(ipaddr, 9020, content) |
| 317 | + send_another(ipaddr) |
300 | 318 | else: |
301 | | - payloads.insert(0, 'Don\'t send a payload') |
302 | | - choice = menu('Payload', payloads) |
303 | | - if choice != 0: |
304 | | - path = os.path.join(PAYLOAD_LOC, payloads[choice]) |
305 | | - with open(path, 'rb') as buf: |
306 | | - print('>> Sending {}...'.format(payloads[choice])) |
307 | | - content = buf.read() |
308 | | - send_payload(ipaddr, 9020, content) |
309 | | - send_another(ipaddr) |
310 | | - else: |
311 | | - print('>> No payload sent') |
| 319 | + print('>> No payload sent') |
312 | 320 |
|
313 | 321 |
|
314 | 322 | def send_another(ipaddr): |
|
0 commit comments