From 2094f5f92b5c4e70cd39e0e8370655e4c0855d44 Mon Sep 17 00:00:00 2001 From: Jean-Michel Picod Date: Fri, 20 Sep 2024 17:44:09 +0200 Subject: [PATCH] Print LUA and Python interpreter versions --- CHANGELOG.md | 1 + client/src/cmdhw.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a63f7fa..3f5aba3b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] +- Print LUA and Python versions in `hw version` command (@jmichelp) - Changed `lf search` - it now tries to read and decode paxton id (@iceman1001) - Changed `lf search` - to identify hitag2/s/82xx in chipset detection to preserve their EM4100 or other outputs (@iceman1001) - Added `lf hitag hts reader` - to act as a HitagS / 82xx reader (@iceman1001) diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index d5dfe5697..6b7ac6843 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -22,6 +22,10 @@ #include #include +#ifdef HAVE_PYTHON +#include +#endif + #include "cmdparser.h" // command_t #include "cliparser.h" #include "comms.h" @@ -41,6 +45,8 @@ #include "proxgui.h" #include "graph.h" // for graph data +#include "lua.h" + static int CmdHelp(const char *Cmd); static void lookup_chipid_short(uint32_t iChipID, uint32_t mem_used) { @@ -1667,7 +1673,7 @@ void pm3_version(bool verbose, bool oneliner) { PrintAndLogEx(NORMAL, " native BT support......... " _YELLOW_("absent")); #endif #ifdef HAVE_PYTHON - PrintAndLogEx(NORMAL, " Python script support..... " _GREEN_("present")); + PrintAndLogEx(NORMAL, " Python script support..... " _GREEN_("present") " (" _YELLOW_(PY_VERSION) ")"); #else PrintAndLogEx(NORMAL, " Python script support..... " _YELLOW_("absent")); #endif @@ -1676,6 +1682,7 @@ void pm3_version(bool verbose, bool oneliner) { #else PrintAndLogEx(NORMAL, " Lua SWIG support.......... " _YELLOW_("absent")); #endif + PrintAndLogEx(NORMAL, " Lua runtime version....... " _GREEN_(LUA_RELEASE)); #ifdef HAVE_PYTHON_SWIG PrintAndLogEx(NORMAL, " Python SWIG support....... " _GREEN_("present")); #else