Commit 052f1a38 authored by ussrhero's avatar ussrhero
Browse files

fixed ascii print error

parent ae3b8ec7
......@@ -9,13 +9,19 @@ from datetime import datetime
import time
from fnmatch import fnmatch
import sys
import codecs
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
sys.stderr = codecs.getwriter('utf8')(sys.stderr)
from config import getModuleInfoProvider
moduleInfoProvider = None
defaultModuleFilter = 'not ( manufactor in ("Microsoft") and type in ("system") )'
defaultProcessFilter = 'not processName.lower() in ("svchost.exe", "system", "csrss.exe", "winlogon.exe", "wininit.exe", "lsass.exe", "services.exe", "smss.exe", "spoolsv.exe", "userinit.exe", "explorer.exe", "dwm.exe", "taskhost.exe", "taskeng.exe" )'
defaultProcessFilter = 'not processName.lower() in ("svchost.exe", "system", "csrss.exe", "winlogon.exe", "wininit.exe", "lsass.exe", "services.exe", "smss.exe", "spoolsv.exe", "userinit.exe", "explorer.exe", "dwm.exe", "taskhost.exe", "taskeng.exe", "taskhostw.exe", "searchindexer.exe", "searchui.exe", "fontdrvhost.exe", "memcompression", "runtimebroker.exe", "wmiprvse.exe" )'
class DumpStatus:
......@@ -90,9 +96,9 @@ class ProcessInfo(object):
def getProcessName(self, process):
if not hasattr(process, "ImageFilePointer") or process.ImageFilePointer == 0:
return pykd.loadCStr(process.ImageFileName)
return pykd.loadCStr(process.ImageFileName).decode('ascii', 'ignore')
return os.path.split(pykd.loadUnicodeString(process.ImageFilePointer.FileName))[1]
return os.path.split(pykd.loadUnicodeString(process.ImageFilePointer.FileName))[1]#.decode('ascii', 'ignore')
return None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment