even moar colorz in help

This commit is contained in:
jvoisin 2014-06-28 16:35:15 +02:00
parent 2ddb3c90e9
commit bed307e818
6 changed files with 72 additions and 64 deletions

View file

@ -139,20 +139,23 @@ eprintf ("TODO: list options\n");
break;
}
break;
case '?':
eprintf ("|Usage: g[wcilper] [arg]\n"
"| g foo.r : compile r_egg source file\n"
"| gw : compile and write\n"
"| gc cmd=/bin/ls : set config option for shellcodes and encoders\n"
"| gc : list all config options\n"
"| gl : list plugins (shellcodes, encoders)\n"
"| gs name args : compile syscall name(args)\n"
"| gi exec : compile shellcode. like ragg2 -i\n"
"| gp padding : define padding for command\n"
"| ge xor : specify an encoder\n"
"| gr : reset r_egg\n"
"|EVAL VARS: asm.arch, asm.bits, asm.os\n"
);
case '?': {
const char* help_msg[] = {
"Usage:", "g[wcilper] [arg]", "Go compile shellcodes",
"g", " foo.r", "Compile r_egg source file",
"gw", "", "Compile and write",
"gc", " cmd=/bin/ls", "Set config option for shellcodes and encoders",
"gc", "", "List all config options",
"gl", "", "List plugins (shellcodes, encoders)",
"gs", " name args", "Compile syscall name(args)",
"gi", " exec", "Compile shellcode. like ragg2 -i",
"gp", " padding", "Define padding for command",
"ge", " xor", "Specify an encoder",
"gr", "", "Reset r_egg",
"EVAL VARS:", "", "asm.arch, asm.bits, asm.os",
NULL};
r_core_cmd_help (core, help_msg);
}
break;
}
return R_TRUE;

View file

@ -153,21 +153,23 @@ static int cmd_eval(void *data, const char *input) {
switch (input[1]) {
case '?': r_config_list (core->config, input+2, 2); break;
default: r_config_list (core->config, input+1, 2); break;
case 0:
r_cons_printf (
"|Usage: e[?] [var[=value]]\n"
"| e? show this help\n"
"| e?asm.bytes show description\n"
"| e?? list config vars with description\n"
"| e list config vars\n"
"| e- reset config vars\n"
"| e* dump config vars in r commands\n"
"| e!a invert the boolean value of 'a' var\n"
"| er [key] set config key as readonly. no way back\n"
"| ec [k] [color] set color for given key (prompt, offset, ...)\n"
"| e a get value of var 'a'\n"
"| e a=b set var 'a' the 'b' value\n"
"| env [k[=v]] get/set environment variable\n");
case 0:{
const char* help_msg[] = {
"Usage:", "e[?] [var[=value]]", "Evaluable vars",
"e","?asm.bytes", "show description",
"e", "??", "list config vars with description",
"e", "", "list config vars",
"e-", "", "reset config vars",
"e*", "", "dump config vars in r commands",
"e!", "a", "invert the boolean value of 'a' var",
"er", " [key]", "set config key as readonly. no way back",
"ec", " [k] [color]", "set color for given key (prompt, offset, ...)",
"e", " a", "get value of var 'a'",
"e", " a=b", "set var 'a' the 'b' value",
"env", " [k[=v]]", "get/set environment variable",
NULL};
r_core_cmd_help (core, help_msg);
}
}
break;
case 'r':

View file

@ -201,12 +201,12 @@ static int cmd_hash(void *data, const char *input) {
}
if (input[0]=='?' || handled_cmd == R_FALSE) {
eprintf (
"Usage: #algo <size> @ addr\n"
" # this is a comment note the space after the sharp sign\n"
" ## List hash/checksum algorithms.\n"
" #sha256 10K @ 33 calculate sha256 of 10K at 33\n"
"Hashes:\n");
const char* help_msg[] = {
"Usage:", "#algo <size> @ addr", "Hashes",
" # this is a comment note the space after the sharp sign"
" ## List hash/checksum algorithms."
" #sha256 10K @ 33 calculate sha256 of 10K at 33"
"Hashes:\n"};
algolist (0);
eprintf (
"Usage #!interpreter [<args>] [<file] [<<eof]\n"

View file

@ -173,26 +173,27 @@ static int cmd_mount(void *data, const char *_input) {
case 'y':
eprintf ("TODO\n");
break;
case '?':
r_cons_printf (
"Usage: m[-?*dgy] [...]\n"
" m ; list all mountpoints in human readable format\n"
" m* ; same as above, but in r2 commands\n"
" ml ; list filesystem plugins\n"
" m /mnt ; mount fs at /mnt with autodetect fs and current offset\n"
" m /mnt ext2 0 ; mount ext2 fs at /mnt with delta 0 on IO\n"
" m-/ ; umount given path (/)\n"
" my ; yank contents of file into clipboard\n"
" mo /foo ; get offset and size of given file\n"
" mg /foo ; get contents of file/dir dumped to disk (XXX?)\n"
" mf[o|n] ; search files for given filename or for offset\n"
" md / ; list directory contents for path\n"
" mp ; list all supported partition types\n"
" mp msdos 0 ; show partitions in msdos format at offset 0\n"
" ms /mnt ; open filesystem prompt at /mnt\n"
" m? ; show this help\n"
"TODO: support multiple mountpoints and RFile IO's (need io+core refactor)\n"
);
case '?': {
const char* help_msg[] = {
"Usage:", "m[-?*dgy] [...] ", "Mountpoints management",
"m", "", "List all mountpoints in human readable format",
"m*", "", "Same as above, but in r2 commands",
"ml", "", "List filesystem plugins",
"m", " /mnt", "Mount fs at /mnt with autodetect fs and current offset",
"m", " /mnt ext2 0", "Mount ext2 fs at /mnt with delta 0 on IO",
"m-/", "", "Umount given path (/)",
"my", "", "Yank contents of file into clipboard",
"mo", " /foo", "Get offset and size of given file",
"mg", " /foo", "Get contents of file/dir dumped to disk (XXX?)",
"mf", "[o|n]", "Search files for given filename or for offset",
"md", " /", "List directory contents for path",
"mp", "", "List all supported partition types",
"mp", " msdos 0", "Show partitions in msdos format at offset 0",
"ms", " /mnt", "Open filesystem prompt at /mnt",
//"TODO: support multiple mountpoints and RFile IO's (need io+core refactorn",
NULL};
r_core_cmd_help (core, help_msg);
}
break;
}
free (oinput);

View file

@ -19,14 +19,17 @@ static int cmd_project(void *data, const char *input) {
// if (r_file_is_regular (file))
free (r_core_project_info (core, file));
break;
default:
r_cons_printf (
"|Usage: P[?osi] [file]\n"
"| Po [file] open project\n"
"| Ps [file] save project\n"
"| Pi [file] show project information\n"
"|NOTE: See 'e file.project'\n"
"|NOTE: project files are stored in ~/.config/radare2/projects\n");
default: {
const char* help_msg[] = {
"Usage:", "P[?osi] [file]", "Project management",
"Po", " [file]", "open project",
"Ps", " [file]", "save project",
"Pi", " [file]", "show project information",
"NOTE:", "", "See 'e file.project'",
"NOTE:", "", "project files are stored in ~/.config/radare2/projects",
NULL};
r_core_cmd_help (core, help_msg);
}
break;
}
free (str);

View file

@ -6,7 +6,6 @@ static int cmd_section(void *data, const char *input) {
"Usage:","S[?-.*=adlr] [...]","",
"S","","list sections",
"S.","","show current section name",
"S?","","show this help message",
"S*","","list sections (in radare commands)",
"S=","","list sections (in nice ascii-art bars)",
"Sa","[-] [arch] [bits] [[off]]","Specify arch and bits for given section",