我试图在Mac上使用python将evtx文件转换为xml,但什么都没有出现?

2024-10-02 08:17:17 发布

您现在位置:Python中文网/ 问答频道 /正文

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/Home/user/CI5235_Joshua/convert_working_example.py


Tags: pathinhomeforosfilesapplicationsuser

热门问题