├── README.md └── fbcli.py /README.md: -------------------------------------------------------------------------------- 1 | # fuzzbunch_wrapper 2 | Fuzzbunch Cli->Wine->fb.py wrapper 3 | 4 | #Dependencies: 5 | regular fuzzbunch dependencies installed in wine 6 | install fuzzbunch this way: https://github.com/knightmare2600/ShadowBrokers/tree/master/Lost_In_Translation 7 | 8 | Set Wine's PATH environment variable to c:\[fuzzbunch-path]\windows\lib\x86-Windows 9 | 10 | #Usage: 11 | 12 | ./fbcli.py module|list 13 | 14 | ./fbcli.py eternalblue --targetip 1.1.1.1 15 | 16 | ./fbcli.py doublepulsar --help 17 | 18 | ./fbcli.py doublepulsar --targetip 1.1.1.1 --function ping 19 | -------------------------------------------------------------------------------- /fbcli.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | import os 5 | from subprocess import check_output,Popen, PIPE, STDOUT 6 | import re 7 | 8 | if not len(sys.argv[1:]): 9 | print '\nUsage: fbcli module|list\n' 10 | exit(1) 11 | 12 | fbpath = '/root/.wine/drive_c/nsa/windows' 13 | 14 | command = sys.argv[1] 15 | args = ' '.join(sys.argv[2:]) 16 | #if not args: args = '--help' 17 | 18 | modules = [os.path.join(dp, f) for dp, dn, filenames in os.walk(fbpath) for f in filenames if os.path.splitext(f)[1] == '.exe'] 19 | if command == 'list': 20 | for i in modules: 21 | print i 22 | exit(0) 23 | 24 | commandlist = [i for i in modules if command in i.lower() and not 'legacy' in i.lower()] 25 | if len(commandlist) > 1: 26 | print '\nThere is more than one instance of %s:' % command 27 | cnt = 0 28 | for cmd in commandlist: 29 | print '[%d] %s' % (cnt,cmd) 30 | cnt += 1 31 | ans = raw_input('\nSelect your module: ') 32 | if not re.match('[0-9]',ans): 33 | print 'Invalid choice. Exit.' 34 | exit(1) 35 | else: 36 | command = commandlist[int(ans)] 37 | else: 38 | command = commandlist[0] 39 | 40 | module = os.path.basename(command) 41 | path = os.path.dirname(command) 42 | 43 | inconfig = [i for i in os.listdir(path) if '.'.join(module.split('.')[:-1]) in i and 'xml' in i][0] 44 | 45 | cmd = 'cd %s; TZ=Europe/Berlin wine %s --inconfig %s --OutConfig z:\\\\dev\\\\null %s 2>/dev/null' % (path, module, inconfig, args) 46 | 47 | p = Popen(cmd, stdout=PIPE, shell=True) 48 | for line in iter(p.stdout.readline, b''): 49 | sys.stdout.write(line) 50 | sys.stdout.flush() 51 | 52 | 53 | --------------------------------------------------------------------------------