Files
proxmark3/client/src/cmdscript.h
T
Shawn Hoffman 148e5ed2d1 python fixes
now, one can do "script run mything.py" multiple times without
crashing, and exit codes are correct.

Pm3PyRun_SimpleFileNoExit:
* use XDECREF instead of DECREF (handles possible nullptr).
* don't double-free "er".
* print exit status correctly.

CmdScriptRun:
* allow invoking scripts multiple times.
* fix memleak of argtable contents if help path not triggered.
* configure_c_stdio should be 0 or 1, not < 0.
* py_conf: don't explicitly set options to their default values, it's confusing.
* Call Py_Finalize only when exiting pm3.

main_loop:
* cleanup cmdscript from main_loop. Important to call
  Py_Finalize from here in case Qt is used (in which case
  main_loop is on Qt thread).

ProxGuiQT::MainLoop:
* reduce timer delay to 0 - there isn't a need to wait here.
2026-05-22 16:38:59 -07:00

28 lines
1.0 KiB
C

//-----------------------------------------------------------------------------
// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// See LICENSE.txt for the text of the license.
//-----------------------------------------------------------------------------
// Some Lua and Python scripting glue to proxmark core.
//-----------------------------------------------------------------------------
#ifndef CMDSCRIPT_H__
#define CMDSCRIPT_H__
#include "common.h"
int CmdScript(const char *Cmd);
void CmdScriptCleanup(void);
#endif