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

Feature: quick, customizable command in REPL #104

Open
regomne opened this issue May 25, 2022 · 1 comment
Open

Feature: quick, customizable command in REPL #104

regomne opened this issue May 25, 2022 · 1 comment

Comments

@regomne
Copy link
Contributor

regomne commented May 25, 2022

I'm developing a feature called "quick command" in frida REPL, like:

[Local::a.exe ]-> .d 401000 10
           0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  0123456789ABCDEF
00401000  55 8b ec 81 c4 fc fe ff ff 8b 45 0c 83 f8 01 75  U.........E....u

The quick cmd starts with '.' (same as nodejs REPL), and can be customized dynamically by the javascript loaded.

For example, register a new quick cmd 'u' in agent.js :

REPL.register_quick_cmd(
    'u', // the quick cmd
    1, // at least 1 argument
    function disasm(addr, inst_cnt = 10) { ... } // target function
)

Which can be used in REPL:

[Local::a.exe ]-> .u 401000
00401000    push ebp
00401001    mov ebp, esp
00401003    add esp, 0xfffffefc
00401009    mov eax, dword ptr [ebp + 0xc]
0040100C    cmp eax, 1
0040100F    jne 0x401028
00401011    push dword ptr [0x403864]
00401017    push 1
00401019    push 0x466
0040101E    push dword ptr [ebp + 8]

I have not contributed to this project yet, and would like to know if it is possble to make a pull request for this feature directly?

@oleavr oleavr transferred this issue from frida/frida-gum May 26, 2022
@oleavr
Copy link
Member

oleavr commented May 26, 2022

Ahh, love it! 🔥 Please feel free to open a PR on this repo (frida-tools).

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

No branches or pull requests

2 participants