hacktools 0.40.0__tar.gz → 0.40.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hacktools-0.40.0/hacktools.egg-info → hacktools-0.40.1}/PKG-INFO +1 -1
- hacktools-0.40.1/hacktools/__init__.py +1 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/common.py +6 -1
- {hacktools-0.40.0 → hacktools-0.40.1/hacktools.egg-info}/PKG-INFO +1 -1
- hacktools-0.40.0/hacktools/__init__.py +0 -1
- {hacktools-0.40.0 → hacktools-0.40.1}/LICENSE +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/MANIFEST.in +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/README.md +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/arch.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/assets/icon.png +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/c_ext/cmp_cri.c +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/c_ext/cmp_lzss.c +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/c_ext/cmp_misc.c +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/c_ext/cmp_racjin.c +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/c_ext/inc.h +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/compression.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/cpk.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/gb.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/gui.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/nasm.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/nds.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/nitro.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/psp.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/psx.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/wii.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools/ws.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools.egg-info/SOURCES.txt +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools.egg-info/dependency_links.txt +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools.egg-info/requires.txt +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/hacktools.egg-info/top_level.txt +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/setup.cfg +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/setup.py +0 -0
- {hacktools-0.40.0 → hacktools-0.40.1}/tests/test_cmp.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.40.1"
|
|
@@ -1061,7 +1061,7 @@ class BinaryPointer:
|
|
|
1061
1061
|
self.str = str
|
|
1062
1062
|
|
|
1063
1063
|
|
|
1064
|
-
def repackBinaryStrings(section, infile, outfile, binranges, freeranges=None, readfunc=detectEncodedString, writefunc=writeEncodedString, encoding="shift_jis", pointerstart=0, injectstart=0, fallbackf=None, injectfallback=0, sectionname="bin", preformat=None, postformat=None):
|
|
1064
|
+
def repackBinaryStrings(section, infile, outfile, binranges, freeranges=None, readfunc=detectEncodedString, writefunc=writeEncodedString, encoding="shift_jis", pointerstart=0, injectstart=0, fallbackf=None, injectfallback=0, sectionname="bin", preformat=None, postformat=None, pointeralign=1):
|
|
1065
1065
|
insize = os.path.getsize(infile)
|
|
1066
1066
|
notfound = []
|
|
1067
1067
|
with Stream(infile, "rb") as fi:
|
|
@@ -1158,6 +1158,11 @@ def repackBinaryStrings(section, infile, outfile, binranges, freeranges=None, re
|
|
|
1158
1158
|
index = allbin.find(pointersearch, index)
|
|
1159
1159
|
if index < 0:
|
|
1160
1160
|
break
|
|
1161
|
+
# Skip matches that aren't aligned: the pattern can collide with
|
|
1162
|
+
# bytes inside code/data, and overwriting those corrupts the binary
|
|
1163
|
+
if pointeralign > 1 and index % pointeralign != 0:
|
|
1164
|
+
index += 1
|
|
1165
|
+
continue
|
|
1161
1166
|
foundone = True
|
|
1162
1167
|
logDebug("Replaced pointer at", toHex(pointerstart + index), "with", toHex(newpointer))
|
|
1163
1168
|
fo.seek(index)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.40.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|