mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-07 13:41:18 -07:00
Initial commit for the firmware. Used the 20090306_ela version as baseline.
It is identical to the popular 20081211, with the doob addition (20090301), a linux client, and two additional commands for LF analysis. Let me know if you find issues here!
This commit is contained in:
parent
b811cc51f9
commit
6658905f18
91 changed files with 16661 additions and 0 deletions
54
linux/gui.c
Normal file
54
linux/gui.c
Normal file
|
@ -0,0 +1,54 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "proxgui.h"
|
||||
#include "translate.h"
|
||||
#include "../winsrc/prox.h"
|
||||
|
||||
int GraphBuffer[MAX_GRAPH_TRACE_LEN];
|
||||
int GraphTraceLen;
|
||||
double CursorScaleFactor;
|
||||
int CommandFinished;
|
||||
|
||||
static char *logfilename = "proxmark3.log";
|
||||
|
||||
void PrintToScrollback(char *fmt, ...) {
|
||||
va_list argptr;
|
||||
static FILE *logfile = NULL;
|
||||
static int logging=1;
|
||||
|
||||
if (logging && !logfile) {
|
||||
logfile=fopen(logfilename, "a");
|
||||
if (!logfile) {
|
||||
fprintf(stderr, "Can't open logfile, logging disabled!\n");
|
||||
logging=0;
|
||||
}
|
||||
}
|
||||
|
||||
va_start(argptr, fmt);
|
||||
vprintf(fmt, argptr);
|
||||
printf("\n");
|
||||
if (logging && logfile) {
|
||||
#if 0
|
||||
char zeit[25];
|
||||
time_t jetzt_t;
|
||||
struct tm *jetzt;
|
||||
|
||||
jetzt_t = time(NULL);
|
||||
jetzt = localtime(&jetzt_t);
|
||||
strftime(zeit, 25, "%b %e %T", jetzt);
|
||||
|
||||
fprintf(logfile,"%s ", zeit);
|
||||
#endif
|
||||
vfprintf(logfile, fmt, argptr);
|
||||
fprintf(logfile,"\n");
|
||||
fflush(logfile);
|
||||
}
|
||||
va_end(argptr);
|
||||
}
|
||||
|
||||
void setlogfilename(char *fn)
|
||||
{
|
||||
logfilename = fn;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue