一、自动创建文件
每秒创建文件一次
注意路径的格式、字符串前缀 f 的用法
import time
import random
list=['<?php eval($_POST["pwd"]);','getPramater("a")','Runtime.exe()']
if __name__ == '__main__':
for i in range(0,3):
fo=open(f'E:\\desktop\\FileCreate\\file{i}.txt','w')
fo.write(list[random.randint(0,2)])
fo.close()
time.sleep(1)
二、Base64 解密输出
- base64 解密
- bytes -> Str
- 写入文件
import base64
if __name__ == '__main__':
s=base64.b64decode('QUJDRA==')
print(bytes.decode(s))
f = open('E:\\desktop\\FileCreate\\filebs64.txt','w')
f.write(bytes.decode(s))
f.close()