Added a fix for an issue where certain binaries will timeout due to rpyc or DragodisError timeouts. #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IDARemoteDisassembler times out when attempting to utilize dragodis on certain files.
IDARemoteDisassembler will timeout if it is used on a file with a larger than normal file loading time or autoanalysis time.
Example 5cc56bb9c934adde84e9e8725199c267d7313f25f83f97b60d0515d57887fe79 (Grandoreiro, although almost any delphi file will probably cause the issue).
This is because the ida_server.py is executed using IDA's -S parameter, which is handled after file loading and autoanalysis are complete. So if a file takes longer to autoanalyze / load than dragodis takes to run win_connect(), dragodis will not be able to connect to the IDA instance.
The following should fix the issue:
if self.__should_autoanalyze: logger.debug('Running autoanalysis.') self._idc.set_flag(self._idc.INF_GENFLAGS, self._idc.INFFL_AUTO, 1) self._idc.auto_wait() #For autoanalysis timeouts, hex rays likely needs to be contacted. else: logger.debug('Skipping autoanalysis.')
This code enables autoanalysis and then runs idc.auto_wait() to await autoanalysis results.
of note: I did try adding a timeout to the autoanalysis feature, but there were issues with the ida_auto.auto_is_ok() function where it would constantly return that autoanalysis isnt running even when it is running.