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

Improve help, init command and autocompletations #187

Merged
merged 3 commits into from
Aug 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/agent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,10 @@ async function initBasicInfoFromTarget (args) {
e dbg.backend =io
e anal.autoname=true
e cmd.fcn.new=aan
.=!i*
.=!ie*
.=!il*
m /r2f io 0
s entry0
.=!ii*
.=!iE*
.=!dr*
.=!is*
`;
return str;
}
Expand Down Expand Up @@ -2857,7 +2852,7 @@ function clearTrace (args) {
}

function interceptHelp (args) {
return 'Usage: di0, di1 or do-1 passing as argument the address to intercept';
return 'Usage: di0, di1 or di-1 passing as argument the address to intercept';
}

function interceptRetJava (klass, method, value) {
Expand Down
16 changes: 13 additions & 3 deletions src/io_frida.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,10 @@ static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) {
r2frida_launchopt_free (lo);

const char *autocompletions[] = {
"!!!\\chcon",
"!!!\\eval",
"!!!\\e",
"!!!\\e/",
"!!!\\env",
"!!!\\j",
"!!!\\i",
Expand All @@ -320,8 +322,10 @@ static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) {
"!!!\\iEa $flag",
"!!!\\ic",
"!!!\\ip",
"!!!\\init",
"!!!\\fd $flag",
"!!!\\dd",
"!!!\\ddj",
"!!!\\?",
"!!!\\?V",
"!!!\\/",
Expand All @@ -335,12 +339,17 @@ static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) {
"!!!\\/v8 $flag",
"!!!\\dt $flag",
"!!!\\dt- $flag",
"!!!\\dt-*",
"!!!\\dth",
"!!!\\dtq",
"!!!\\dtr",
"!!!\\dtS",
"!!!\\dtSf $flag",
"!!!\\dc",
"!!!\\di",
"!!!\\di0",
"!!!\\di1",
"!!!\\di-1",
"!!!\\dl",
"!!!\\dl2",
"!!!\\dx",
Expand All @@ -356,6 +365,7 @@ static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) {
"!!!\\dmp $flag",
"!!!\\db",
"!!!\\dp",
"!!!\\dpj",
"!!!\\dpt",
"!!!\\dr",
"!!!\\drj",
Expand Down Expand Up @@ -499,8 +509,7 @@ static char *__system(RIO *io, RIODesc *fd, const char *command) {
"dc Continue breakpoints or resume a spawned process\n"
"dd[j-][fd] ([newfd]) List, dup2 or close filedescriptors (ddj for JSON)\n"
"di[0,1,-1] [addr] Intercept and replace return value of address\n"
"dk ([pid]) [sig] Send signal to pid (kill -<sig> <pid>)\n"
"dk [signal] [pid] Send specific signal to specific pid in the remote system\n"
"dk ([pid]) [sig] Send specific signal to specific pid in the remote system\n"
"dkr Print the crash report (if the app has crashed)\n"
"dl libname Dlopen a library (Android see chcon)\n"
"dl2 libname [main] Inject library using Frida's >= 8.2 new API\n"
Expand All @@ -520,7 +529,8 @@ static char *__system(RIO *io, RIODesc *fd, const char *command) {
"dpt Show threads\n"
"dr Show thread registers (see dpt)\n"
"dt (<addr>|<sym>) .. Trace list of addresses or symbols\n"
"dt- Clear all tracing\n"
"dt- (<addr>|<sym>) Clear trace\n"
"dt-* Clear all tracing\n"
"dt. Trace at current offset\n"
"dtf <addr> [fmt] Trace address with format (^ixzO) (see dtf?)\n"
"dth (addr|sym)(x:0 y:1 ..) Define function header (z=str,i=int,v=hex barray,s=barray)\n"
Expand Down