I already did the copying part but I don't know how to include the payload method.. I have already did some research but I didn't find anything.
from sys import argv
import suprocess
script = argv
name = str(script[0])
print Name
for i in range (0,10):
directoryNamee = 'copy '+str(i)
subprocess.call(['mkdir ' ,directoryName])
subprocess.call(['cp' ,name,directoryName])
It is working. It is copying the source code in a file but I don't know how to do the payload method.