mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 06:13:27 -07:00
Got rid of client/scripting.c debug code.
This commit is contained in:
parent
08f436d26a
commit
70df25e7cb
1 changed files with 0 additions and 32 deletions
|
@ -102,37 +102,6 @@ static int l_WaitForResponseTimeout(lua_State *L){
|
||||||
|
|
||||||
if(WaitForResponseTimeout(cmd, &response, ms_timeout))
|
if(WaitForResponseTimeout(cmd, &response, ms_timeout))
|
||||||
{
|
{
|
||||||
/* Uncomment code below to print the bytes which were received from the C code before they get passed to Lua. */
|
|
||||||
// uint8_t *recv;
|
|
||||||
// char *hexout;
|
|
||||||
// recv = response.d.asBytes;
|
|
||||||
// uint8_t iLen = response.arg[0];
|
|
||||||
// if (0){
|
|
||||||
// iLen = response.arg[1];
|
|
||||||
// if (iLen){
|
|
||||||
// PrintAndLog("Card selected. UID[%i]:", iLen);
|
|
||||||
// } else {
|
|
||||||
// PrintAndLog("Can't select card.");
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// PrintAndLog("received %i bytes:", iLen);
|
|
||||||
// }
|
|
||||||
// if(!iLen)
|
|
||||||
// return 1;
|
|
||||||
// hexout = (char *)malloc(iLen * 3 + 1);
|
|
||||||
// if (hexout != NULL) {
|
|
||||||
// for (int i = 0; i < iLen; i++) { // data in hex
|
|
||||||
// sprintf(&hexout[i * 3], "%02X ", recv[i]);
|
|
||||||
// }
|
|
||||||
// PrintAndLog("%s", hexout);
|
|
||||||
// free(hexout);
|
|
||||||
// } else {
|
|
||||||
// PrintAndLog("malloc failed your client has low memory?");
|
|
||||||
// return 2;
|
|
||||||
// }
|
|
||||||
// printf("Command response just sent back to Lua script with the bytes which were just printed.\n");
|
|
||||||
|
|
||||||
|
|
||||||
//Push it as a string
|
//Push it as a string
|
||||||
lua_pushlstring(L,(const char *)&response,sizeof(UsbCommand));
|
lua_pushlstring(L,(const char *)&response,sizeof(UsbCommand));
|
||||||
|
|
||||||
|
@ -140,7 +109,6 @@ static int l_WaitForResponseTimeout(lua_State *L){
|
||||||
}else{
|
}else{
|
||||||
//Push a Nil instead
|
//Push a Nil instead
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
printf("Nil pushed back to Lua script - no response received.\n");
|
|
||||||
return 1;// one return value
|
return 1;// one return value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue