diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index de3dab10..352d407b 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -28,13 +28,8 @@ jobs: cd IDA_SDKs unzip -n -q '*.zip' - - name: Install Triton (delete first two lines when Triton last port is in the CI) + - name: Install Triton run: | - cd $VCPKG_INSTALLATION_ROOT - git reset --hard - git pull - ./bootstrap-vcpkg.sh - echo "set(VCPKG_BUILD_TYPE release)" >> $VCPKG_INSTALLATION_ROOT/triplets/x64-linux.cmake vcpkg install triton diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index fe335514..935dc52e 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -30,11 +30,6 @@ jobs: - name: Install Triton (delete first two lines when Triton last port is in the CI) run: | - cd $VCPKG_INSTALLATION_ROOT - git reset --hard - git pull - ./bootstrap-vcpkg.sh - echo "set(VCPKG_BUILD_TYPE release)" >> $VCPKG_INSTALLATION_ROOT/triplets/x64-osx.cmake vcpkg install triton diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 45ebb030..60e85942 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -27,13 +27,8 @@ jobs: cd IDA_SDKs 7z.exe x *.zip - - name: Install Triton (delete first two lines when Triton last port is in the CI) + - name: Install Triton run: | - cd $env:VCPKG_INSTALLATION_ROOT - git reset --hard - git pull - ".\bootstrap-vcpkg.bat" - "`r`nset(VCPKG_BUILD_TYPE release)" | Add-Content "$env:VCPKG_INSTALLATION_ROOT\triplets\x64-windows-static.cmake" vcpkg install triton --triplet x64-windows-static diff --git a/src/formTaintSymbolizeInput.cpp b/src/formTaintSymbolizeInput.cpp index 5c834b0d..572a888a 100644 --- a/src/formTaintSymbolizeInput.cpp +++ b/src/formTaintSymbolizeInput.cpp @@ -14,9 +14,6 @@ #include #include -//Triton -#include - //Ponce #include "formTaintSymbolizeInput.hpp" #include "globals.hpp" diff --git a/src/globals.hpp b/src/globals.hpp index 34c97cb7..717fdb6b 100644 --- a/src/globals.hpp +++ b/src/globals.hpp @@ -107,6 +107,6 @@ extern std::map ponce_comments; #define REG_XIP tritonCtx.registers.x86_rip #else #define MEM_FORMAT "%#" PRIx32 -#define REG_XIP api.registers.x86_eip +#define REG_XIP tritonCtx.registers.x86_eip #endif // __EA64__ diff --git a/src/utils.cpp b/src/utils.cpp index 8534d467..553dbaae 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -116,14 +116,14 @@ ea_t get_args(int argument_number, bool skip_ret) //On Linux - parameters are passed in RDI, RSI, RDX, RCX, R8, R9 for ints / ptrs and xmm0 - 7 for float types. switch (argument_number) { - case 0: return static_cast(IDA_getCurrentRegisterValue(api.registers.x86_rdi)); - case 1: return static_cast(IDA_getCurrentRegisterValue(api.registers.x86_rsi)); - case 2: return static_cast(IDA_getCurrentRegisterValue(api.registers.x86_rdx)); - case 3: return static_cast(IDA_getCurrentRegisterValue(api.registers.x86_rcx)); - case 4: return static_cast(IDA_getCurrentRegisterValue(api.registers.x86_r8)); - case 5: return static_cast(IDA_getCurrentRegisterValue(api.registers.x86_r9)); + case 0: return static_cast(IDA_getCurrentRegisterValue(tritonCtx.registers.x86_rdi)); + case 1: return static_cast(IDA_getCurrentRegisterValue(tritonCtx.registers.x86_rsi)); + case 2: return static_cast(IDA_getCurrentRegisterValue(tritonCtx.registers.x86_rdx)); + case 3: return static_cast(IDA_getCurrentRegisterValue(tritonCtx.registers.x86_rcx)); + case 4: return static_cast(IDA_getCurrentRegisterValue(tritonCtx.registers.x86_r8)); + case 5: return static_cast(IDA_getCurrentRegisterValue(tritonCtx.registers.x86_r9)); default: - ea_t esp = static_cast(IDA_getCurrentRegisterValue(api.registers.x86_rsp)); + ea_t esp = static_cast(IDA_getCurrentRegisterValue(tritonCtx.registers.x86_rsp)); ea_t arg = esp + (argument_number - 6 + skip_ret_index) * 8; return get_qword(arg); } @@ -168,7 +168,7 @@ ea_t get_args_pointer(int argument_number, bool skip_ret) case 4: case 5:error("[!] In Linux/OsX 64 bits you can't get a pointer to the five first\n arguments since they are registers"); default: - ea_t esp = (ea_t)IDA_getCurrentRegisterValue(api.registers.x86_rsp); + ea_t esp = (ea_t)IDA_getCurrentRegisterValue(tritonCtx.registers.x86_rsp); ea_t arg = esp + (argument_number - 6 + skip_ret_index) * 8; return arg; }