Closed koast18 closed 1 year ago
Hi! Thanks for creating an issue and proposing a fix! This is indeed a long-standing issue that I didn't take the time to fix!
The break
is voluntarily conservative (i.e., it matches a quite precise layout). I'll check this out and see if a continue
improves the situation without introducing regressions. 👍
Hi! So as I thought, switching to a continue
has the unwanted effect to include Themida/WinLicense 2.x's (empty-named) sections in the list of sections and thus break OEP detection for 2.x.
I pushed a more conservative fix which just whitelists .textbss
and .textidx
(I'd like your confirmation to ensure that it does the trick). Maybe we could revamp the text section probing later. However, I'm planning to release 0.4.0 soon I want to avoid introducing bugs right now 😅
That's really a good fix, I just test the 0.4.0 release on the sample and it just works fine! Thanks for your excellent fix and I think it's the time to close the issue and pr.
In some binary,
.text
section is not the first section with a non-blank striped fullname, when it occurs, this statement becametrue
and the.text
section detection would fail despite the next section is the.text
section with the fullname of.text\00\00\00
.DrcHost.zip
This sample would trigger this issue and change the
break
tocontinue
can fix this and get an executeable binary viapython -m unlincense ./DrcHost.exe
.The log is below.
before
after
The fix is in #95 , I don't know if there is any other reason to use a
break
here and if this change would cause other problem, but thanks anyway for your fantastic unpacker!!