diff --git a/README.md b/README.md index c85b7c3..a1ccbca 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,12 @@ format). ``` usage: vita-elf-create [-v|vv|vvv] [-n] [-e config.yml] input.elf output.velf -v,-vv,-vvv: logging verbosity (more v is more verbose) + -s : strip the output ELF -n : allow empty imports -e yml : optional config options -g yml : generate an export config from ELF symbols -m list : specify the list of module entrypoints - -l op name : long name option name + -p : skip stub privilege check input.elf : input ARM ET_EXEC type ELF output.velf: output ET_SCE_RELEXEC type ELF ``` diff --git a/src/vita-elf-create/elf-create-argp.c b/src/vita-elf-create/elf-create-argp.c index 2a64902..84d2c7e 100644 --- a/src/vita-elf-create/elf-create-argp.c +++ b/src/vita-elf-create/elf-create-argp.c @@ -19,7 +19,7 @@ int parse_arguments(int argc, char *argv[], elf_create_args *arguments) arguments->is_test_stripping = 0; arguments->is_bypass_stub_privilege_check = 0; - while ((c = getopt(argc, argv, "vne:sg:m:l:")) != -1) + while ((c = getopt(argc, argv, "vne:sg:m:p")) != -1) { switch (c) { @@ -41,20 +41,8 @@ int parse_arguments(int argc, char *argv[], elf_create_args *arguments) case 'm': entrypoint_list = optarg; break; - case 'l': // long name option - - if (strlen(optarg) == 0) { - fprintf(stderr, "long name option lemgth is 0\n"); - return -1; - } - - if (strcmp(optarg, "skip_stub_privilege_check") == 0) { - arguments->is_bypass_stub_privilege_check = 1; - } else { - fprintf(stderr, "unknown long name option (%s)\n", optarg); - return -1; - } - + case 'p': + arguments->is_bypass_stub_privilege_check = 1; break; case '?': fprintf(stderr, "unknown option -%c\n", optopt); diff --git a/src/vita-elf-create/vita-elf-create.c b/src/vita-elf-create/vita-elf-create.c index 9d30453..b43f446 100644 --- a/src/vita-elf-create/vita-elf-create.c +++ b/src/vita-elf-create/vita-elf-create.c @@ -478,7 +478,7 @@ static int usage(int argc, char *argv[]) "\t-e yml : optional config options\n" "\t-g yml : generate an export config from ELF symbols\n" "\t-m list : specify the list of module entrypoints\n" - "\t-l op name : long name option name\n" + "\t-p : skip stub privilege check\n" "\tinput.elf : input ARM ET_EXEC type ELF\n" "\toutput.velf: output ET_SCE_RELEXEC type ELF\n", argc > 0 ? argv[0] : "vita-elf-create"); return 0; @@ -551,7 +551,7 @@ int main(int argc, char *argv[]) if (prev_privilege != ~0 && prev_privilege != (flags & VITA_STUB_GEN_2_FLAG_IS_KERNEL)) { printf("Importing stubs with different privileges.\n"); - printf("\tIf needed for exploit, add flag \"-l skip_stub_privilege_check\" and try again.\n"); + printf("\tIf needed for exploit, add flag \"-p\" and try again.\n"); printf("\tIf not, check the stub you are importing to make sure there are no mistake regarding privileges.\n"); return EXIT_FAILURE; } @@ -571,7 +571,7 @@ int main(int argc, char *argv[]) if (prev_privilege != ~0 && prev_privilege != (flags & VITA_STUB_GEN_2_FLAG_IS_KERNEL)) { printf("Importing stubs with different privileges.\n"); - printf("\tIf needed for exploit, add flag \"-l skip_stub_privilege_check\" and try again.\n"); + printf("\tIf needed for exploit, add flag \"-p\" and try again.\n"); printf("\tIf not, check the stub you are importing to make sure there are no mistake regarding privileges.\n"); return EXIT_FAILURE; }