Commit Graph

79 Commits

Author SHA1 Message Date
Elias Bachaalany 99bc2ae815 Merge pull request #22 from disconnect3d/patch-1
Simplifies _print_hex method
2023-05-05 22:30:34 -07:00
Elias Bachaalany 6e3899391a Update py_idaapi.py
IDA 8 no longer supports Python 2. Therefore, in Python 3, no "L" suffix is generated.
2023-05-05 22:26:46 -07:00
Elias Bachaalany d34bb4b45a + added default run/term for modern plugins
No longer need to implement dummy/empty run/term callbacks in plugin_t.
2023-04-06 19:52:18 -07:00
Elias Bachaalany 44d7546da9 Update py_kernwin_choose.py
minor mods
2023-03-21 21:50:24 -07:00
Arnaud Diederen d108d21ed3 Backport fixes 2023-02-20 09:44:21 +01:00
Arnaud Diederen 8ce2ea7146 Backport fixes
* non-modal Python forms (using class Form) could cause crashes on the ARM macOS build of IDA
* marked certain `newref_t` & `borref_t` constructors `delete` (we're not supposed to copy `newref_t`'s and `borref_t`'s, as it would mess up the refcount)
2023-02-07 12:26:08 +01:00
Elias Bachaalany eaf190072b Merge pull request #42 from 0xeb/hr
minor mods: use the bool operator on ref_t and co.
2023-02-06 23:47:39 -08:00
Arnaud Diederen e06d4d0986 Added missing support for ida_kernwin.Chooser.OnGetEA 2023-01-30 10:50:06 +01:00
Elias Bachaalany 50faf9466c fixed bugs introduced in the previous refactoring 2023-01-26 22:46:35 -08:00
Elias Bachaalany 67748fc426 Merge remote-tracking branch 'origin/master' into hr 2023-01-26 22:29:17 -08:00
Arnaud Diederen 27fa71c5ac IDAPython for IDA 8.2SP1 2023-01-26 10:56:52 +01:00
Elias Bachaalany 477a02f444 minor mods: use the bool operator on ref_t and co. 2023-01-25 20:57:20 -08:00
Arnaud Diederen 4d3da678c0 Merge pull request #40 from 0xeb/choose_ongetattr
+ bugfix: IDAPython: Choose.OnGetLineAttr was broken
2023-01-18 10:09:31 +01:00
Elias Bachaalany 1284df5188 added bool operator for ref_t and simplified the fix 2023-01-17 08:20:02 -08:00
Elias Bachaalany 02c95291c3 + bugfix: IDAPython: Choose.OnGetLineAttr was broken
- It was only accepting lists (it should accept both tuples and lists)
2023-01-17 08:19:41 -08:00
Arnaud Diederen a2a75975f2 Backported fixes - mostly issues discovered with Python 3.11+ 2023-01-16 11:14:55 +01:00
Arnaud Diederen 201a874e81 BUGFIX: IDAPython: upon failure, ida_hexrays.decompile() now always returns None (instead of either throw a ida_hexrays.DecompilationFailure or return None.)
The type `ida_hexrays.DecompilationFailure` is still present (but is a dummy) because otherwise scripts might break. It is never thrown anymore.

Note that `vds_xrefs.py` still need the `str(cfunc))` kludge, because of a caveat in when/how the decompiler actually updates the global xrefs cache. This will be fixed in the next IDA minor release

In addition, this commit introduces the notion of a typemap to convert form an `ea_t` to a `func_t *` for the `decompile()` call, but doesn't generalize its use.
Since this is a relatively far-ranging change, this will only be introduced in the next IDA minor release as well.
2023-01-16 10:50:06 +01:00
Elias Bachaalany b2b2470474 Removed obsolete flags from the Choose class 2023-01-07 13:46:12 -08:00
Elias Bachaalany ff8f5f7a15 Removed obsolete flags from the Choose wrapper 2023-01-07 13:10:21 -08:00
Arnaud Diederen 425d9e585e IDAPython for IDA 8.2 2022-12-19 10:10:14 +01:00
Arnaud Diederen 29512d9c48 IDAPython for IDA 8.1 2022-10-10 12:03:43 +02:00
Arnaud Diederen 023c5ba53c IDAPython for IDA 8.0 2022-08-22 10:14:21 +02:00
Arnaud Diederen 656ec7918c Backported fixes 2022-04-11 16:07:02 +02:00
Arnaud Diederen 01d069ae68 Backported fixes 2022-02-14 09:17:16 +01:00
Arnaud Diederen 3ce5b7f06d IDAPython for IDA 7.7 2022-01-17 11:28:09 +01:00
Arnaud Diederen 988910e28e Backported fixes 2021-11-08 09:18:25 +01:00
Arnaud Diederen 19a88f3101 Backported fixes 2021-10-11 10:06:23 +02:00
Arnaud Diederen 7ee60670f9 Backported fixes 2021-09-13 08:05:30 +02:00
Arnaud Diederen cc2b1e8d7c Backported fixes 2021-09-06 08:14:47 +02:00
Arnaud Diederen e1f854822d Backported fixes 2021-07-12 09:37:09 +02:00
Arnaud Diederen 7a5c73196d Backported fixes 2021-05-25 16:20:47 +02:00
Arnaud Diederen c22e071853 IDAPython for IDA 7.6 2021-03-30 08:54:44 +02:00
Arnaud Diederen 3c1990e307 Backported fixes 2021-01-11 08:08:53 +01:00
Arnaud Diederen 99d9079ed5 Backported fixes 2020-10-12 12:52:15 +02:00
Arnaud Diederen a0a90d7b07 Backported fixes 2020-09-28 08:07:36 +02:00
Arnaud Diederen 0706ff1018 Backported fixes 2020-09-14 17:25:37 +02:00
Arnaud Diederen 17a1c54457 IDAPython for IDA 7.5 SP2 2020-08-03 13:02:57 +02:00
Arnaud Diederen 01774be48b Backported fixes 2020-07-06 09:56:31 +02:00
Arnaud Diederen bc9b51b1c7 Backported fixes 2020-06-01 12:20:37 +02:00
Arnaud Diederen 604de9cfad IDAPython for IDA 7.5 2020-05-27 14:34:02 +02:00
Arnaud Diederen 0419c3f138 Backported fixes 2020-04-21 13:34:35 +02:00
Arnaud Diederen 9528950917 Backported fixes 2020-04-14 13:50:52 +02:00
Arnaud Diederen 21983ec8d2 Backported fixes 2020-04-07 08:41:19 +02:00
Arnaud Diederen fe7d9fdb40 Backported fixes 2020-03-09 13:58:30 +01:00
Arnaud Diederen f7e52a0c30 Backported fixes 2019-12-09 10:10:26 +01:00
Arnaud Diederen 752ba3896e IDAPython for IDA 7.4 SP1 2019-11-14 15:58:44 +01:00
Arnaud Diederen e3d07f2018 BUGFIX: IDAPython: inspect.stack() could fail on recent versions of Python3 (e.g., Python 3.7.4)
Don't leave empty strings ('') as '__file__' members of builtin modules' globals; some modules such as inspect expect that built-in modules don't have such an attribute.
2019-10-24 09:24:42 +02:00
Arnaud Diederen 5958995d66 IDAPython for IDA 7.4 2019-10-15 15:05:24 +02:00
Disconnect3d effebe27f7 Simplifies _print_hex method
Simplifies the `_print_hex` method.

Note that there are ~4 different ways of implementing it:
```
In [1]: def a(x):
   ...:     return hex(x).rstrip('L')
   ...: def b(x):
   ...:     s = hex(x)
   ...:     return s[0:-1] if s.endswith("L") else s
   ...: def c(x):
   ...:     return '0x%x' % x
   ...: def d(x):
   ...:     return '0x{:x}'.format(x)
```
2019-07-19 00:04:12 +02:00
Arnaud Diederen dc8f62dc8b The 'displayhook' now uses 'hex()' again, but removes an ending 'L' 2019-06-26 15:35:44 +02:00