simple script working

This commit is contained in:
iceman1001 2020-05-26 12:17:41 +02:00
parent 6b8f1b141e
commit e106a5717c
2 changed files with 5 additions and 5 deletions

5
client/pyscripts/ice.py Normal file
View file

@ -0,0 +1,5 @@
lrc= 0x00
for i in range(5):
lrc ^= 42
print('\n final LRC XOR byte value: %02X\n' % (lrc))

View file

@ -185,13 +185,8 @@ static int CmdScriptRun(const char *Cmd) {
*/
#ifdef HAVE_PYTHON
PrintAndLogEx(SUCCESS, "script engine detected: %s", ( ext == PM3_PY) ? "PYTHON" : ( ext == PM3_CMD) ? "CMD" : "LUA");
PrintAndLogEx(SUCCESS, "script engine, folder %s", PYTHON_SCRIPTS_SUBDIR);
if ((ext == PM3_PY) && (searchFile(&script_path, PYTHON_SCRIPTS_SUBDIR, preferredName, ".py", true) == PM3_SUCCESS)) {
PrintAndLogEx(SUCCESS, "ICE");
PrintAndLogEx(SUCCESS, "executing python s " _YELLOW_("%s"), script_path);
PrintAndLogEx(SUCCESS, "args " _YELLOW_("'%s'"), arguments);