Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added disassembly by filterCallback #1315

Merged

Conversation

Japrajah
Copy link
Contributor

No description provided.

@Japrajah
Copy link
Contributor Author

Because it is called before buildSemantics, it is only able to filter by string & controlFlow, and isMemoryRead does not work.
But if you can call buildSemantics, you can use everything. But it will be equivalent to call 'processing'.

   static triton::Context* hack = &ctx;
    const  auto  dism_filter = [](std::vector<triton::arch::Instruction>& ret) -> bool
        {
            auto instr = ret.back();
            hack->buildSemantics(instr); // will not work without this
             return   instr.isMemoryRead() && !instr.isReadFrom(hack->registers.x86_rsp); 
        };
    ctx.disassembly(0x40000, dism_filter);
       const  auto  dism_filter_fine = [](std::vector<triton::arch::Instruction>& ret) -> bool
       {
           auto instr = ret.back();
           return  instr.getDisassembly().contains("rdrand"); 
       };
          ctx.disassembly(0x40000, dism_filter_fine );

Should there be a function that processes until "something", because now we need to dissasemble everything, that's can be unused latter.

@JonathanSalwan JonathanSalwan added this to the v1.0 milestone Mar 27, 2024
@JonathanSalwan JonathanSalwan merged commit f30e83e into JonathanSalwan:dev-v1.0 Mar 27, 2024
33 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants