gaasedelen / patching

An Interactive Binary Patching Plugin for IDA Pro
MIT License
878 stars 112 forks source link

Patching cancelled... - Plugin does not work with Python 3.11 on older versions of IDA #10

Closed PFAhard closed 3 months ago

PFAhard commented 2 years ago

Patching cancelled... when try to apply

Kein commented 2 years ago

Install properly as a user-plugin. Dont mix with other keystone stuff

Slluxx commented 1 year ago

@Kein What does that mean? i just installed it as given by the instructions. no other user-plugins installed.

eg import urllib.request as r; exec(r.urlopen('https://github.com/gaasedelen/patching/raw/main/install.py').read())

The issue is that from patching.util.qt import QT_AVAILABLE returns False and thus self.view is not populated and cant be opened

Kein commented 1 year ago

c:\Users\%USER%\AppData\Roaming\Hex-Rays\IDA Pro\plugins\

Slluxx commented 1 year ago

Yes, i know where the plugins folder is. There is nothing in it besides the patching plugin.

Slluxx commented 1 year ago

I managed to fix it by installing PyQt5 via pip and moving the file D:\Program Files\Python311\Lib\site-packages\PyQt5\sip.cp311-win_amd64.pyd to E:\Programs\IDA Pro 7.6\python\3\PyQt5\sip.pyd

Then i commented out line 32 (self.setWindowFlags) in patching\ui\save_ui.py

To fix IDA crashing when clicking on "Assemble...", i commented out line 42 (self._line_assembly.setFocus) in patching\ui\preview_ui.py

IDA Pro 7.6, Python 3.11, PyQt5==5.15.9

ngokmink commented 1 year ago

I managed to fix it by installing PyQt5 via pip and moving the file D:\Program Files\Python311\Lib\site-packages\PyQt5\sip.cp311-win_amd64.pyd to E:\Programs\IDA Pro 7.6\python\3\PyQt5\sip.pyd

This fixed both the "Assemble" crashing and "Patching cancelled" issue for me. Thank you.

likeNlong commented 1 year ago

I managed to fix it by installing PyQt5 via pip and moving the file D:\Program Files\Python311\Lib\site-packages\PyQt5\sip.cp311-win_amd64.pyd to E:\Programs\IDA Pro 7.6\python\3\PyQt5\sip.pyd

Then i commented out line 32 (self.setWindowFlags) in patching\ui\save_ui.py

To fix an IDA crashing when clicking on "Assemble...", i commented out line 42 (self._line_assembly.setFocus) in patching\ui\preview_ui.py

IDA Pro 7.6, Python 3.11, PyQt5==5.15.9

thanks,I don't know how you came up with the solution, but it did solve my problem

DragonQuestHero commented 1 year ago

I managed to fix it by installing PyQt5 via pip and moving the file D:\Program Files\Python311\Lib\site-packages\PyQt5\sip.cp311-win_amd64.pyd to E:\Programs\IDA Pro 7.6\python\3\PyQt5\sip.pyd

Then i commented out line 32 (self.setWindowFlags) in patching\ui\save_ui.py

To fix an IDA crashing when clicking on "Assemble...", i commented out line 42 (self._line_assembly.setFocus) in patching\ui\preview_ui.py

IDA Pro 7.6, Python 3.11, PyQt5==5.15.9

thanks+1

gaasedelen commented 3 months ago

Older versions of IDA don't like newer versions of Python. I see 3.11 references above.

Python 3.11 wasn't officially supported by IDA until 8.2 SP1

I added a warning to the auto-install script to prevent installation for incompatible setups. If people want to bodge around it, they are welcome to but not something I am going to support.

Thanks for the report and hopefully people have found the context/discussion within this issue as helpful.