Skip to content

Commit

Permalink
Port to 7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Garcia Illera committed Apr 12, 2021
1 parent 74026f3 commit 60eac23
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
5 changes: 3 additions & 2 deletions docs/misc/port.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Ponce supports any IDA version >= 7.0. If a new version of IDA pops up this are
3) We need to add the content of `C:\Program Files\IDA Pro 7.X\plugins\hexrays_sdk\include` into the `include` path of the downlaoded SDK zip from the prevoius step. To obtain the files to add (should be one called `hexrays.hpp` and maybe others) you have to install IDA (remember it needs to be bundled with the decompiler for this file to be present)
4) Zip up all the IDA versions SDKs in a file called `IDA_SDKs.zip` and upload it to a site that support direct download (i.e. bublup.com).
5) Use the direct link to [update the secret](https://github.com/illera88/Ponce/settings/secrets/actions) `DOWNLOAD_LINK_IDA_SDK` in Github.
6) Update the action files for Windows, Linux and OSX in two places:
6) Update the action files for Windows, Linux and OSX in these two places:
- [Here](https://github.com/illera88/Ponce/blob/master/.github/workflows/ci-windows.yml#L76-L80)
- [Here](https://github.com/illera88/Ponce/blob/master/.github/workflows/ci-windows.yml#L142-L150)
7) The CI will automatically create the Ponce plugin for you on every platform and every version
7) Check that the IDA APIs have not change and Ponce compiles.
8) The CI will automatically create the Ponce plugin for you on every platform and every version
1 change: 1 addition & 0 deletions src/actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ struct ah_taint_symbolize_register_t : public action_handler_t
};
static ah_taint_symbolize_register_t ah_taint_symbolize_register;


action_desc_t action_IDA_taint_symbolize_register = ACTION_DESC_LITERAL(
"Ponce:taint_symbolize_register", // The action name. This acts like an ID and must be unique
"nothing", //The action text.
Expand Down
33 changes: 18 additions & 15 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
#ifdef BUILD_HEXRAYS_SUPPORT
#include "ponce_hexrays.hpp"

#if IDA_SDK_VERSION < 760
// Hex-Rays API pointer
hexdsp_t* hexdsp = NULL;
#endif
#endif

bool idaapi run(size_t)
{
Expand Down Expand Up @@ -118,7 +120,9 @@ bool idaapi run(size_t)
}

//--------------------------------------------------------------------------
#if IDA_SDK_VERSION >= 750
#if IDA_SDK_VERSION >= 760
plugmod_t* idaapi init(void)
#elif IDA_SDK_VERSION == 750
size_t idaapi init(void)
#else
int idaapi init(void)
Expand All @@ -127,29 +131,28 @@ int idaapi init(void)
char version[8];
//We do some checks with the versions...
if (get_kernel_version(version, sizeof(version))) {
#if IDA_SDK_VERSION > 750
warning("[!] This Ponce plugin was built for IDA %d, you are using: %s\n", IDA_SDK_VERSION, version);
#if IDA_SDK_VERSION == 760
if (strcmp(version, "7.6") != 0) {
#elif IDA_SDK_VERSION == 750
if (strcmp(version, "7.5") != 0)
warning("[!] This Ponce plugin was built for IDA %d, you are using: %s\n", IDA_SDK_VERSION, version);
if (strcmp(version, "7.5") != 0) {
#elif IDA_SDK_VERSION == 740
if (strcmp(version, "7.4") != 0)
warning("[!] This Ponce plugin was built for IDA %d, you are using: %s\n", IDA_SDK_VERSION, version);
if (strcmp(version, "7.4") != 0) {
#elif IDA_SDK_VERSION == 730
if (strcmp(version, "7.3") != 0)
warning("[!] This Ponce plugin was built for IDA %d, you are using: %s\n", IDA_SDK_VERSION, version);
if (strcmp(version, "7.3") != 0) {
#elif IDA_SDK_VERSION == 720
if (strcmp(version, "7.2") != 0)
warning("[!] This Ponce plugin was built for IDA %d, you are using: %s\n", IDA_SDK_VERSION, version);
if (strcmp(version, "7.2") != 0) {
#elif IDA_SDK_VERSION == 710
if (strcmp(version, "7.1") != 0)
warning("[!] This Ponce plugin was built for IDA %d, you are using: %s\n", IDA_SDK_VERSION, version);
if (strcmp(version, "7.1") != 0) {
#elif IDA_SDK_VERSION == 700
if (strcmp(version, "7.00") != 0)
warning("[!] This Ponce plugin was built for IDA %d, you are using: %s\n", IDA_SDK_VERSION, version);
if (strcmp(version, "7.00") != 0) {
#elif IDA_SDK_VERSION < 700
#error // not supported
#endif
warning("[!] This Ponce plugin was built for IDA %d, you are using: %s\n", IDA_SDK_VERSION, version);
}
}
else {
error("Can't detect the IDA version you are running");
}

if (int(version[0]) < 7) {
Expand Down

0 comments on commit 60eac23

Please sign in to comment.