change scripts/ to luascripts/

This commit is contained in:
Philippe Teuwen 2019-08-21 23:17:01 +02:00
commit a8ee33baf4
47 changed files with 8 additions and 8 deletions

View file

@ -151,9 +151,9 @@ build_script:
Copy-Item C:\ProxSpace\pm3\bootrom\obj\*.elf C:\ProxSpace\Release\arm Copy-Item C:\ProxSpace\pm3\bootrom\obj\*.elf C:\ProxSpace\Release\arm
New-Item -ItemType Directory -Force -Path C:\ProxSpace\Release\scripts New-Item -ItemType Directory -Force -Path C:\ProxSpace\Release\luascripts
Copy-Item C:\ProxSpace\pm3\client\scripts\*.lua C:\ProxSpace\Release\scripts Copy-Item C:\ProxSpace\pm3\client\luascripts\*.lua C:\ProxSpace\Release\luascripts
New-Item -ItemType Directory -Force -Path C:\ProxSpace\Release\hardnested\tables New-Item -ItemType Directory -Force -Path C:\ProxSpace\Release\hardnested\tables

View file

@ -86,7 +86,7 @@ static int CmdHFMFPInfo(const char *cmd) {
// check SL0 // check SL0
uint8_t data[250] = {0}; uint8_t data[250] = {0};
int datalen = 0; int datalen = 0;
// https://github.com/Proxmark/proxmark3/blob/master/client/scripts/mifarePlus.lua#L161 // https://github.com/Proxmark/proxmark3/blob/master/client/luascripts/mifarePlus.lua#L161
uint8_t cmd[3 + 16] = {0xa8, 0x90, 0x90, 0x00}; uint8_t cmd[3 + 16] = {0xa8, 0x90, 0x90, 0x00};
int res = ExchangeRAW14a(cmd, sizeof(cmd), false, false, data, sizeof(data), &datalen); int res = ExchangeRAW14a(cmd, sizeof(cmd), false, false, data, sizeof(data), &datalen);
if (!res && datalen > 1 && data[0] == 0x09) { if (!res && datalen > 1 && data[0] == 0x09) {

View file

@ -77,7 +77,7 @@ static int CmdScriptList(const char *Cmd) {
n = scandir(script_directory_path, &namelist, NULL, alphasort); n = scandir(script_directory_path, &namelist, NULL, alphasort);
if (n == -1) { if (n == -1) {
PrintAndLogEx(FAILED, "Couldn't open the scripts-directory"); PrintAndLogEx(FAILED, "Couldn't open the luascripts-directory");
return 1; return 1;
} }
@ -175,7 +175,7 @@ static command_t CommandTable[] = {
*/ */
static int CmdHelp(const char *Cmd) { static int CmdHelp(const char *Cmd) {
(void)Cmd; // Cmd is not used so far (void)Cmd; // Cmd is not used so far
PrintAndLogEx(NORMAL, "This is a feature to run Lua-scripts. You can place lua-scripts within the scripts/-folder. "); PrintAndLogEx(NORMAL, "This is a feature to run Lua-scripts. You can place Lua-scripts within the luascripts/-folder. ");
return 0; return 0;
} }

View file

@ -223,7 +223,7 @@ local function configure_magic_ntag(uid)
-- -p == set pwd -- -p == set pwd
-- -a == set pack -- -a == set pack
args =('-t 12 -u %s -p %08X -a %04X'):format(uid, pwd, pack) args =('-t 12 -u %s -p %08X -a %04X'):format(uid, pwd, pack)
require('../scripts/mfu_magic') require('mfu_magic')
-- Set back args. Not that it's used, just for the karma... -- Set back args. Not that it's used, just for the karma...
args = myargs args = myargs

View file

@ -1133,7 +1133,7 @@ int set_pm3_libraries(lua_State *L) {
//--add to the LUA_PATH (package.path in lua) //--add to the LUA_PATH (package.path in lua)
// so we can load scripts from the ./scripts/ - directory // so we can load scripts from the ./luascripts/ - directory
char scripts_path[strlen(get_my_executable_directory()) + strlen(LUA_SCRIPTS_DIRECTORY) + strlen(LUA_LIBRARIES_WILDCARD) + 1]; char scripts_path[strlen(get_my_executable_directory()) + strlen(LUA_SCRIPTS_DIRECTORY) + strlen(LUA_LIBRARIES_WILDCARD) + 1];
strcpy(scripts_path, get_my_executable_directory()); strcpy(scripts_path, get_my_executable_directory());
strcat(scripts_path, LUA_SCRIPTS_DIRECTORY); strcat(scripts_path, LUA_SCRIPTS_DIRECTORY);

View file

@ -15,7 +15,7 @@
//#include <lauxlib.h> //#include <lauxlib.h>
#define LUA_LIBRARIES_DIRECTORY "lualibs/" #define LUA_LIBRARIES_DIRECTORY "lualibs/"
#define LUA_SCRIPTS_DIRECTORY "scripts/" #define LUA_SCRIPTS_DIRECTORY "luascripts/"
#define LUA_LIBRARIES_WILDCARD "?.lua" #define LUA_LIBRARIES_WILDCARD "?.lua"
/** /**