Closed apehex closed 3 years ago
Hello again,
I think I spotted a mistake, line 28 of gd-jpeg.py.
str.find returns -1 if no match is found, and -1 evaluates to True. So whether or not the magic number is found,
In case the magic number is not here, the code will be injected in position 9 = len(magic) - 1
if loc: print("Found magic number.") return loc
Hello again,
I think I spotted a mistake, line 28 of gd-jpeg.py.
str.find returns -1 if no match is found, and -1 evaluates to True. So whether or not the magic number is found,
In case the magic number is not here, the code will be injected in position 9 = len(magic) - 1