@@ -1184,6 +1184,7 @@ int handle_tearoff(tearoff_params_t *params, bool verbose) {
11841184 return resp .status ;
11851185}
11861186
1187+
11871188static int CmdTearoff (const char * Cmd ) {
11881189 CLIParserContext * ctx ;
11891190 CLIParserInit (& ctx , "hw tearoff" ,
@@ -1192,14 +1193,16 @@ static int CmdTearoff(const char *Cmd) {
11921193 "Delay (in us) must be between 1 and 43000 (43ms). Precision is about 1/3us." ,
11931194 "hw tearoff --delay 1200 --> define delay of 1200us\n"
11941195 "hw tearoff --on --> (re)activate a previously defined delay\n"
1195- "hw tearoff --off --> deactivate a previously activated but not yet triggered hook\n" );
1196+ "hw tearoff --off --> deactivate a previously activated but not yet triggered hook\n"
1197+ "hw tearoff --list --> list commands implementing tear-off hooks\n" );
11961198
11971199 void * argtable [] = {
11981200 arg_param_begin ,
11991201 arg_int0 (NULL , "delay" , "<dec>" , "Delay in us before triggering tear-off, must be between 1 and 43000" ),
12001202 arg_lit0 (NULL , "on" , "Activate tear-off hook" ),
12011203 arg_lit0 (NULL , "off" , "Deactivate tear-off hook" ),
12021204 arg_lit0 ("s" , "silent" , "less verbose output" ),
1205+ arg_lit0 (NULL , "list" , "List commands implementing tear-off hooks" ),
12031206 arg_param_end
12041207 };
12051208
@@ -1209,8 +1212,35 @@ static int CmdTearoff(const char *Cmd) {
12091212 params .on = arg_get_lit (ctx , 2 );
12101213 params .off = arg_get_lit (ctx , 3 );
12111214 bool silent = arg_get_lit (ctx , 4 );
1215+ bool list = arg_get_lit (ctx , 5 );
12121216 CLIParserFree (ctx );
12131217
1218+ if (list ) {
1219+ PrintAndLogEx (INFO , "Commands implementing tear-off hooks:" );
1220+ PrintAndLogEx (INFO , " hf 14a raw" );
1221+ PrintAndLogEx (INFO , " hf 14b apdu" );
1222+ PrintAndLogEx (INFO , " hf 14b raw" );
1223+ PrintAndLogEx (INFO , " hf 15 raw" );
1224+ PrintAndLogEx (INFO , " hf iclass creditepurse" );
1225+ PrintAndLogEx (INFO , " hf iclass wrbl" );
1226+ PrintAndLogEx (INFO , " hf mfc wrbl" );
1227+ // PrintAndLogEx(INFO, " hf mfu wrbl");
1228+ PrintAndLogEx (INFO , " hf topaz wrbl" );
1229+ PrintAndLogEx (INFO , " lf em 4x05 write" );
1230+ PrintAndLogEx (INFO , " lf em 4x50 wrbl" );
1231+ PrintAndLogEx (INFO , " lf em 4x50 wrpwd" );
1232+ PrintAndLogEx (INFO , " lf hitag wrbl" );
1233+ PrintAndLogEx (INFO , " lf hitag hts wrbl" );
1234+ PrintAndLogEx (INFO , "" );
1235+ PrintAndLogEx (INFO , "See also commands implementing tearing-off on their own:" );
1236+ PrintAndLogEx (INFO , " lf em 4x05_unlock" );
1237+ PrintAndLogEx (INFO , " lf t55xx dangerraw" );
1238+ PrintAndLogEx (INFO , " hf iclass tear" );
1239+ PrintAndLogEx (INFO , " hf mfu otptear" );
1240+ PrintAndLogEx (INFO , " Standalone mode HF_ST25_TEAROFF" );
1241+ return PM3_SUCCESS ;
1242+ }
1243+
12141244 if (delay != -1 ) {
12151245 if ((delay < 1 ) || (delay > 43000 )) {
12161246 PrintAndLogEx (WARNING , "You can't set delay out of 1..43000 range!" );
0 commit comments