add: change PE metadata

maybe it's bad to generate it randomly, maybe it'd be better to use random real-words
This commit is contained in:
2023-09-04 20:30:18 +02:00
parent 45bc629176
commit d233a273a3
7 changed files with 165 additions and 1 deletions

27
metadata.py Normal file
View File

@@ -0,0 +1,27 @@
from randomness import *
def change_metadata() :
f = open("DllExecutor.rc", "r")
f_c = f.readlines()
f.close()
o = open("DllExecutor.rc", "w")
for line in f_c :
if "CompanyName" in line :
line = f'\t\t\tVALUE "CompanyName", "Microsoft"\n'
elif "FileDescription" in line :
line = f'\t\t\tVALUE "FileDescription", "{GetRandomString(20)}"\n'
elif "InternalName" in line :
line = f'\t\t\tVALUE "InternalName", "{GetRandomString(7)}.exe"\n'
elif "OriginalFilename" in line :
line = f'\t\t\tVALUE "OriginalFilename", "{GetRandomString(7)}.exe"\n'
elif "ProductName" in line :
line = f'\t\t\tVALUE "ProductName", "{GetRandomString(7)}.exe"\n'
o.write(line)
o.close()