X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/d1057e7a2105d5e2696df185482176f22a5bd669..02069dbbdb943617d7999d12c3506b82ae20a89e:/client/scripting.c diff --git a/client/scripting.c b/client/scripting.c index 8d77c78a..0d491df7 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -8,6 +8,7 @@ // Some lua scripting glue to proxmark core. //----------------------------------------------------------------------------- +#include #include #include #include @@ -161,7 +162,7 @@ static int l_nonce2key(lua_State *L){ uint8_t dest_key[8]; num_to_bytes(key,sizeof(dest_key),dest_key); - //printf("Pushing to lua stack: %012"llx"\n",key); + //printf("Pushing to lua stack: %012" PRIx64 "\n",key); lua_pushlstring(L,(const char *) dest_key,sizeof(dest_key)); return 2; //Two return values @@ -536,7 +537,11 @@ int set_pm3_libraries(lua_State *L) //-- Last but not least, add to the LUA_PATH (package.path in lua) // so we can load libraries from the ./lualib/ - directory - setLuaPath(L,"./lualibs/?.lua"); + char libraries_path[strlen(get_my_executable_directory()) + strlen(LUA_LIBRARIES_DIRECTORY) + strlen(LUA_LIBRARIES_WILDCARD) + 1]; + strcpy(libraries_path, get_my_executable_directory()); + strcat(libraries_path, LUA_LIBRARIES_DIRECTORY); + strcat(libraries_path, LUA_LIBRARIES_WILDCARD); + setLuaPath(L, libraries_path); return 1; }