skelsec / minidump

Python library to parse and read Microsoft minidump file format
MIT License
271 stars 55 forks source link

Fix leftover issue with inrange calls #37

Closed mrexodia closed 11 months ago

mrexodia commented 11 months ago

Closes #35

I forgot to fix the other uses of inrange back in #28 (relevant diff).

I tested with HarnessMinimal_x64.dmp.zip and the following command now executes successfully:

minidump HarnessMinimal_x64.dmp -r 0x130000000 -s 0x1000

Output:

# minidump 0.0.22
# Author: Tamas Jos @skelsec (skelsecprojects@gmail.com)

130000000(+0000):  4d 5a 90 00 03 00 00 00  04 00 00 00 ff ff 00 00   |MZ..............|
130000010(+0010):  b8 00 00 00 00 00 00 00  40 00 00 00 00 00 00 00   |........@.......|
130000020(+0020):  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   |................|
130000030(+0030):  00 00 00 00 00 00 00 00  00 00 00 00 c8 00 00 00   |................|
130000040(+0040):  0e 1f ba 0e 00 b4 09 cd  21 b8 01 4c cd 21 54 68   |........!..L.!Th|
130000050(+0050):  69 73 20 70 72 6f 67 72  61 6d 20 63 61 6e 6e 6f   |is program canno|
130000060(+0060):  74 20 62 65 20 72 75 6e  20 69 6e 20 44 4f 53 20   |t be run in DOS |
<snip>
130000fc0(+0fc0):  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   |................|
130000fd0(+0fd0):  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   |................|
130000fe0(+0fe0):  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   |................|
130000ff0(+0ff0):  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   |................|
mrexodia commented 11 months ago

I also removed the trailing whitespace from all files in a separate commit. If you want me to do a separate PR for this let me know, but I figured it's a trivial-enough change for this to not be necessary. The actual diff is here: https://github.com/skelsec/minidump/pull/37/files?diff=unified&w=1