#include "cmdscript.h"
#include "cmdhfmf.h"
#include "pm3_binlib.h"
-
+#include "pm3_bitlib.h"
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
{
while ((ep = readdir (dp)) != NULL)
{
- if(ep->d_name != NULL && str_ends_with(ep->d_name, ".lua"))
+ if(str_ends_with(ep->d_name, ".lua"))
PrintAndLog("%-16s %s", ep->d_name, "A script file");
}
(void) closedir (dp);
* @param Cmd
* @return
*/
-int CmdScript(const char *Cmd)
-{
- CmdsParse(CommandTable, Cmd);
- return 0;
+int CmdScript(const char *Cmd) {
+ clearCommandBuffer();
+ CmdsParse(CommandTable, Cmd);
+ return 0;
}
/**
* Utility to check the ending of a string (used to check file suffix)
//Add the 'bin' library
set_bin_library(lua_state);
+ //Add the 'bit' library
+ set_bit_library(lua_state);
char script_name[128] = {0};
char arguments[256] = {0};