Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
CHG: increased the script-filename column width from 16 to 21.
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed Aug 7, 2016
1 parent a152dea commit 5def0b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 3 additions & 7 deletions client/cmdscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int str_ends_with(const char * str, const char * suffix) {
*/
int CmdHelp(const char * Cmd)
{
PrintAndLog("This is a feature to run Lua-scripts. You can place lua-scripts within the scripts/-folder. ");
PrintAndLog("This is a feature to run Lua-scripts. You can place lua-scripts within the ´client/scripts/´ folder.");
return 0;
}

Expand All @@ -84,7 +84,7 @@ int CmdList(const char *Cmd)
while ((ep = readdir (dp)) != NULL)
{
if(str_ends_with(ep->d_name, ".lua"))
PrintAndLog("%-16s %s", ep->d_name, "A script file");
PrintAndLog("%-21s %s", ep->d_name, "A script file");
}
(void) closedir (dp);
}
Expand Down Expand Up @@ -152,17 +152,13 @@ int CmdRun(const char *Cmd)
char buf[256];
snprintf(buf, sizeof buf, "./scripts/%s%s", script_name, suffix);

printf("--- Executing: %s, args'%s'\n",buf,arguments);



printf("--- Executing: %s, args'%s'\n", buf, arguments);

// run the Lua script

int error = luaL_loadfile(lua_state, buf);
if(!error)
{

lua_pushstring(lua_state, arguments);
lua_setglobal(lua_state, "args");

Expand Down
2 changes: 0 additions & 2 deletions client/cmdscript.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
// Some lua scripting glue to proxmark core.
//-----------------------------------------------------------------------------


#ifndef CMDSCRIPT_H__
#define CMDSCRIPT_H__


int CmdScript(const char *Cmd);

#endif

0 comments on commit 5def0b3

Please sign in to comment.