Skip to content

Commit 3e29204

Browse files
authored
Merge pull request #71 from mrexodia/primitive-types
Add a few missing primitive types
2 parents 9cfd9ee + 180203a commit 3e29204

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

src/dumpulator/dumpulator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ def read(self, addr, size):
881881
def write(self, addr, data):
882882
if not isinstance(addr, int):
883883
addr = int(addr)
884-
self._pages.write(addr, data)
884+
self._pages.write(addr, bytes(data))
885885

886886
def call(self, addr, args: List[int] = None, regs: dict = None, count=0):
887887
if args is None:

src/dumpulator/modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def find_export(self, key: Union[str, int]):
7474
raise TypeError()
7575

7676
def __repr__(self):
77-
return f"Module({hex(self.base)}, {hex(self.size)}, {repr(self.path)})"
77+
return f"Module({hex(self.base)}, {hex(self.size)}, {self.path})"
7878

7979
def __hash__(self):
8080
return hash((self.base, self.size, self.path))

src/dumpulator/native.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,6 @@ def to_regs(self, regs):
460460
assert regs.gs == self.SegGs & 0xFFFF
461461

462462
# TODO: implement xmm
463-
464463
assert ctypes.sizeof(WOW64_CONTEXT) == 0x2cc
465464

466465
class EXCEPTION_RECORD32(ctypes.Structure):

src/dumpulator/ntprimitives.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,9 @@ class KAFFINITY(ULONG_PTR):
392392
class KPRIORITY(ULONG_PTR):
393393
pass
394394

395+
class KIRQL(UCHAR):
396+
pass
397+
395398
# TODO: should probably be bool
396399
class BOOLEAN(BYTE):
397400
pass
@@ -408,6 +411,15 @@ class PSID(PVOID):
408411
class PWSTR(PVOID):
409412
pass
410413

414+
class CCHAR(CHAR):
415+
pass
416+
417+
class CSHORT(SHORT):
418+
pass
419+
420+
class CLONG(ULONG):
421+
pass
422+
411423
# Some unsupported enum
412424
class LATENCY_TIME(Enum):
413425
LT_DONT_CARE = 0

0 commit comments

Comments
 (0)