Skip to content

Fix bytes call hex() take argument & update some IDA methods#1095

Closed
machinewu wants to merge 2 commits into
qilingframework:devfrom
machinewu:dev
Closed

Fix bytes call hex() take argument & update some IDA methods#1095
machinewu wants to merge 2 commits into
qilingframework:devfrom
machinewu:dev

Conversation

@machinewu
Copy link
Copy Markdown
Contributor

@machinewu machinewu commented Feb 17, 2022

Checklist

Which kind of PR do you create?

  • This PR only contains minor fixes.
  • This PR contains major feature update.
  • This PR introduces a new function/api for Qiling Framework.

Coding convention?

  • The new code conforms to Qiling Framework naming convention.
  • The imports are arranged properly.
  • Essential comments are added.
  • The reference of the new code is pointed out.

Extra tests?

  • No extra tests are needed for this PR.
  • I have added enough tests for this PR.
  • Tests will be added after some discussion and review.

Changelog?

  • This PR doesn't need to update Changelog.
  • Changelog will be updated after some proper review.
  • Changelog has been updated in my PR.

Target branch?

  • The target branch is dev branch.

One last thing


Some minor fixes:

  1. Bytes call hex() should not take arguments. For formating the hex byte separate with blank space, use ' '.join() to do it.
  2. qiling/arch/utils.py line 42: log_insn = '\n> '.join(f'{insn.mnemonic:20s} {insn.op_str}' for insn in qd.disasm(tmp, address)) The first output command should also add \n>
  3. According to IDA's IDAPython official documentation, some of the old methods have changed names for a long time. In IDA v7.7, some methods are no longer available. Follow the documentation to change the method in qiling/extensions/idaplugin/qilingida.py.

Env:
Win10 x64
Pyhton 3.7.9 x64
IDA 7.7

@elicn
Copy link
Copy Markdown
Member

elicn commented Feb 17, 2022

Hi there,
There is no need to fix that. The argument for hex was introduced in Python 3.8.
If possible, upgrade your Python version.

@elicn
Copy link
Copy Markdown
Member

elicn commented May 1, 2022

Hi @machinewu,
Could you please open a new PR just for the IDA fixes?
The others seems to be irrelevant.

@machinewu machinewu mentioned this pull request May 1, 2022
15 tasks
@machinewu
Copy link
Copy Markdown
Contributor Author

Recreate a new PR #1145.
Close this.

@machinewu machinewu closed this May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants