import os
path = '/Applications/Home/User/CI5235_Joshua/evtx_logs'
folderCount = 0
fileCount = 0 #an
for rootfolder, directories, files in os.walk(path):
for folder in directories:
folderCount = folderCount + 1
filePath = path + folder + "/"
for rootfolder, directories, files in os.walk(filePath):
for file in files:
convertFile = filePath + file
print(convertFile)
xmlFile = convertFile.rsplit('.', 1)[0] + ".xml"
print(xmlFile)
os.system("/Applications/Home/User/CI5235_Joshua/evtx_dump.py" + convertFile + " > " + xmlFile)
, когда я запускаю это, вот что появляется:
joshuajohn@Joshuas-MacBook-Pro-2 CI5235_Joshua% /Applications/Xcode.app/Contents/Developer/usr/bin/python3 / Applications / Главная / Пользователь / CI5235_Joshua / convert_working_example.py