]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/util.c
Enhanced hf mf chk , add default key,support dic file and so on.
[proxmark3-svn] / client / util.c
index c7764f7092df5c0d6358e23bd409397603298e71..ae213e43f55a4521dddafd70393ae6e950119e71 100644 (file)
@@ -14,7 +14,7 @@
 #include <ctype.h>
 #include "util.h"
 
-#ifdef __linux__
+#ifndef WIN32
 #include <termios.h>
 #include <sys/ioctl.h> 
 int ukbhit(void)
@@ -194,3 +194,15 @@ int param_gethex(const char *line, int paramnum, uint8_t * data, int hexcnt)
 
        return 0;
 }
+
+int param_getstr(const char *line, int paramnum, char * str)
+{
+       int bg, en;
+
+       if (param_getptr(line, &bg, &en, paramnum)) return 0;
+       
+       memcpy(str, line + bg, en - bg + 1);
+       str[en - bg + 1] = 0;
+       
+       return en - bg + 1;
+}
Impressum, Datenschutz