Add 'rem' - new command that adds a line to the log file (@didierStevens)

This commit is contained in:
Chris 2018-09-05 20:31:10 +02:00
commit 972d30474d
2 changed files with 18 additions and 0 deletions

View file

@ -3,6 +3,10 @@ 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]
- Changed 'proxmark3 client threading' - remake from official repo (@micolous)
- Add 'rem' - new command that adds a line to the log file (@didierStevens)
- Fix 'EM410xdemod empty tag id in lfops.c' (@Defensor7)
- Fix 'usb device descriptor' - some android phones will enumerate better when iSerialnumber isn't a multiple of 8 (@micolous, @megabug)
- Fix 'StandaloneMode LF' - when collecting signal, justNoise detection is needed (@didierStevens, @Megabug)
- Fix 'StandAloneMode Colin' - mifare1ksim called with right params (@cjbrigato)

View file

@ -13,6 +13,7 @@
static int CmdHelp(const char *Cmd);
static int CmdQuit(const char *Cmd);
static int CmdRev(const char *Cmd);
static int CmdRem(const char *Cmd);
//For storing command that are received from the device
static UsbCommand cmdBuffer[CMD_BUFFER_SIZE];
@ -33,6 +34,7 @@ static command_t CommandTable[] = {
{"hf", CmdHF, 1, "{ High Frequency commands... }"},
{"hw", CmdHW, 1, "{ Hardware commands... }"},
{"lf", CmdLF, 1, "{ Low Frequency commands... }"},
{"rem", CmdRem, 1, "{ Add text to row in log file }"},
{"reveng", CmdRev, 1, "{ Crc calculations from the software reveng 1.53... }"},
{"script", CmdScript, 1, "{ Scripting commands }"},
{"trace", CmdTrace, 1, "{ Trace manipulation... }"},
@ -51,6 +53,18 @@ command_t* getTopLevelCommandTable() {
return CommandTable;
}
int CmdRem(const char *Cmd) {
char buf[22];
memset(buf, 0x00, sizeof(buf));
struct tm *curTime;
time_t now = time(0);
curTime = gmtime(&now);
strftime (buf, sizeof(buf), "%Y-%m-%dT%H:%M:%SZ", curTime); // ISO8601
PrintAndLogEx(NORMAL, "%s remark: %s", buf, Cmd);
return 0;
}
int CmdHelp(const char *Cmd) {
CmdsHelp(CommandTable);
return 0;