]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Updated the README.txt
authoriceman1001 <iceman@iuse.se>
Thu, 1 Jan 2015 13:07:42 +0000 (14:07 +0100)
committericeman1001 <iceman@iuse.se>
Thu, 1 Jan 2015 13:07:42 +0000 (14:07 +0100)
CHG:  added marshmellows last changes with rtrim, and minor fixes.
DEL:  code cleanup in usb_cdc.c

README.txt
client/cmddata.c
client/cmddata.h
client/cmdlf.c
common/cmd.c
common/usb_cdc.c

index cb2c7f3c783a137b43f99c7d14010d611bfa49ee..62c2992018ff3061e45be0852676ba087e68979f 100644 (file)
@@ -1,87 +1,63 @@
-NOTICE:
-(2014-03-26)
-This is now the official Proxmark repository!
-
-INTRODUCTION:
-
-The proxmark3 is a powerful general purpose RFID tool, the size of a deck
-of cards, designed to snoop, listen and emulate everything from
-Low Frequency (125kHz) to High Frequency (13.56MHz) tags.
-
-This repository contains enough software, logic (for the FPGA), and design
-documentation for the hardware that you could, at least in theory,
-do something useful with a proxmark3.
-
-RESOURCES:
-
-   * This repository!
-      https://github.com/Proxmark/proxmark3
-      
-   * The Wiki
-      https://github.com/Proxmark/proxmark3/wiki
-      
-   * The GitHub page
-      http://proxmark.github.io/proxmark3/
-      
-   * The Forum
-      http://www.proxmark.org/forum
-      
-   * The IRC chanel
-       irc.freenode.org #proxmark3
-       -or-
-       http://webchat.freenode.net/?channels=#proxmark3
-   
-DEVELOPMENT:
-
-The tools required to build  or run the project will vary depending on
-your operating system. Please refer to the Wiki for details.
-
-   * https://github.com/Proxmark/proxmark3/wiki
-
-OBTAINING HARDWARE:
-
-The Proxmark 3 is available for purcahse (assembled and tested) from the
-following locations:
-
-   * http://proxmark3.com/
-   * http://www.xfpga.com/
-
-Most of the ultra-low-volume contract assemblers could put
-something like this together with a reasonable yield. A run of around
-a dozen units is probably cost-effective. The BOM includes (possibly-
-outdated) component pricing, and everything is available from Digikey
-and the usual distributors.
-
-If you've never assembled a modern circuit board by hand, then this is
-not a good place to start. Some of the components (e.g. the crystals)
-must not be assembled with a soldering iron, and require hot air.
-
-The schematics are included; the component values given are not
-necessarily correct for all situations, but it should be possible to do
-nearly anything you would want with appropriate population options.
-
-The printed circuit board artwork is also available, as Gerbers and an
-Excellon drill file.
+The iceman fork.
 
+NOTICE:
 
-LICENSING:
+The official Proxmark repository is found here: https://github.com/Proxmark/proxmark3
 
-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 2 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.
+NEWS:      
 
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+Whats in this fork?  I have scraped the web for different enhancements to the PM3 sourcecode and not all of them ever found their way to the master branch. 
+Among the stuff is
+       * jonor's hf 14a raw timing patch
+       * Piwi's updates. (usually gets into the master)
+       * Holimans iclass, (usually gets into the master)
+       * Marshmellows LF fixes (will go into the master)
+       * Midnitesnakes Ultralight,  Ultralight-c enhancements
+       * My desfire, Ultralight extras, LF T55xx enhancements, bugs fixes (filelength, hf mf commands ), TNP3xxx lua scripts,  Awid26,  skidata scripts (will come)
+       * other osbscury patches like for the sammy-mode,  (offline you know), tagidentifications, defaultkeys. 
+       
+Give me a hint, and I'll see if I can't merge in the stuff you have. 
+       
+PM3 GUI:
 
+I do tend to rename and move stuff around, the official PM3-GUI from Gaucho will not work so good. *sorry*     
 
-Jonathan Westhues
-user jwesthues, at host cq.cx
+         
+DEVELOPMENT:
 
-May 2007, Cambridge MA
+This fork is adjusted to compile on windows/mingw environment with Qt5.3.1 & GCC 4.8
+For people with linux you will need to patch some sourcecode and some small change to one makefile.  If you are lazy, you google the forum and find asper's or holimans makefile or you find your solution below.
+
+Common errors linux/macOS finds
+Error:
+       * loclass/fileutils.c:15:2: warning: implicit declaration of function ‘_stat’ [-Wimplicit-function-declaration]
+Solution:
+       * Remove the "unscore" sign.   In linux you use without underscore, in windows you need a underscore. 
+       
+Error:  
+       * \client\makefile  the parameter -lgdi32 
+Solution:
+       * Remove parameter.
+       
+Error:  
+       * Using older Qt4.6 gives compilation errors.  
+Solution
+       * Upgrade to Qt5.3.1 
+       OR 
+       * Change these two line in  \client\makefile
+               CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui -I$(QTDIR)/include/QtWidgets  -I/mingw/include
+               QTLDLIBS = -L$(QTDIR)/lib  -lQt5Core -lQt5Gui -lQt5Widgets 
+               
+               TO
+               
+               CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui
+               QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4
+       
+
+And old Qt4 version is found here: http://www.icesql.se/proxmark3/code/linuxmakefile.txt  but this one doesn't have all new files in it. So I don't recommend it.
+
+
+
+January 2015, Sweden
+iceman at host iuse.se
\ No newline at end of file
index 7aa8fcf43b8cf18219f31e47002fb06975070eb8..de564a69c94b387abb59a2b328ca389a451b7e28 100644 (file)
@@ -226,7 +226,7 @@ int Cmdaskmandemod(const char *Cmd)
     PrintAndLog("EM410x pattern found: ");
   printEM410x(lo);
   }
-  if (BitLen>16) return 1;
+  //if (BitLen>16) return 1;
   return 0;
 }
 
@@ -976,6 +976,15 @@ int CmdLtrim(const char *Cmd)
   RepaintGraphWindow();
   return 0;
 }
+int CmdRtrim(const char *Cmd)
+{
+  int ds = atoi(Cmd);
+
+  GraphTraceLen = ds;
+
+  RepaintGraphWindow();
+  return 0;
+}
 
 /*
  * Manchester demodulate a bitstream. The bitstream needs to be already in
@@ -1377,13 +1386,14 @@ static command_t CommandTable[] =
   {"fskdemod",      CmdFSKdemod,        1, "Demodulate graph window as a HID FSK"},
   {"fskhiddemod",   CmdFSKdemodHID,     1, "Demodulate graph window as a HID FSK using raw"},
   {"fskiodemod",    CmdFSKdemodIO,      1, "Demodulate graph window as an IO Prox FSK using raw"},
-  {"fskrawdemod",   CmdFSKrawdemod,     1, "[clock rate] [invert] Demodulate graph window from FSK to binary (clock = 64 or 50)(invert = 1 or 0)"},
+  {"fskrawdemod",   CmdFSKrawdemod,     1, "[clock rate] [invert] [rchigh] [rclow] Demodulate graph window from FSK to binary (clock = 50)(invert = 1 or 0)(rchigh = 10)(rclow=8)"},
   {"grid",          CmdGrid,            1, "<x> <y> -- overlay grid on graph window, use zero value to turn off either"},
   {"hexsamples",    CmdHexsamples,      0, "<bytes> [<offset>] -- Dump big buffer as hex bytes"},  
   {"hide",          CmdHide,            1, "Hide graph window"},
   {"hpf",           CmdHpf,             1, "Remove DC offset from trace"},
   {"load",          CmdLoad,            1, "<filename> -- Load trace (to graph window"},
   {"ltrim",         CmdLtrim,           1, "<samples> -- Trim samples from left of trace"},
+  {"rtrim",         CmdRtrim,           1, "<location to end trace> -- Trim samples from right of trace"},
   {"mandemod",      CmdManchesterDemod, 1, "[i] [clock rate] -- Manchester demodulate binary stream (option 'i' to invert output)"},
   {"manrawdecode",  Cmdmandecoderaw,    1, "Manchester decode binary stream already in graph buffer"},
   {"manmod",        CmdManchesterMod,   1, "[clock rate] -- Manchester modulate a binary stream"},
index 9b8f22cab5f0903d34ae5e917a16a07b180cba8e..59ac43b9cf977645f7c245f11917cb5bbad0bc23 100644 (file)
@@ -36,6 +36,7 @@ int CmdHide(const char *Cmd);
 int CmdHpf(const char *Cmd);
 int CmdLoad(const char *Cmd);
 int CmdLtrim(const char *Cmd);
+int CmdRtrim(const char *Cmd);
 int Cmdmandecoderaw(const char *Cmd);
 int CmdManchesterDemod(const char *Cmd);
 int CmdManchesterMod(const char *Cmd);
index 14d8d2159f31fa17ffd2542540165157e7e061ec..8257a5b392abeb66a42395630e277d6909de503c 100644 (file)
@@ -571,8 +571,9 @@ int CmdVchDemod(const char *Cmd)
 //by marshmellow
 int CmdLFfind(const char *Cmd)
 {
+       int ans = 0;
        char cmdp = param_getchar(Cmd, 0);
-
+       
        if (strlen(Cmd) > 1 || cmdp == 'h' || cmdp == 'H') {
                PrintAndLog("Usage:  lf search [use data from Graphbuffer]");
                PrintAndLog("     [use data from Graphbuffer], if not set, try reading data from tag.");
@@ -581,9 +582,8 @@ int CmdLFfind(const char *Cmd)
                PrintAndLog("          : lf search 1");
                return 0;
        }
-       
-       int ans = 0;
-       if (!offline && cmdp != '1' ){
+
+       if (!offline || (cmdp != '1') ){
                ans = CmdLFRead("");
        } else if (GraphTraceLen<1000) {
                PrintAndLog("Data in Graphbuffer was too small.");
@@ -607,7 +607,9 @@ int CmdLFfind(const char *Cmd)
        ans=CmdIndalaDemod("224");
        PrintAndLog("Indala (224): %s", (ans)?"YES":"NO" );
 
-       //PrintAndLog("No Known Tags Found!\n");
+       if (!ans)
+               PrintAndLog("No Known Tags Found!\n");
+               
        return 0;
 }
 
index dae3a8daafaa707ecb8350bf99e42347973a5303..66b939909981889d544ce76cd49fc4d337f2686e 100644 (file)
@@ -34,8 +34,6 @@
 #include "string.h"\r
 #include "../include/proxmark3.h"\r
 \r
-//static UsbCommand txcmd;\r
-\r
 bool cmd_receive(UsbCommand* cmd) {\r
  \r
   // Check if there is a usb packet available\r
index 097d9a4ee97e60eee2dc973c86fc90e430976fbf..c8d5af1c4363d9c152eba6b535a9e53c0fa53364 100644 (file)
@@ -223,7 +223,6 @@ byte_t btReceiveBank   = AT91C_UDP_RX_DATA_BK0;
 void usb_disable() {\r
   // Disconnect the USB device\r
   AT91C_BASE_PIOA->PIO_ODR = GPIO_USB_PU;\r
-//  SpinDelay(100);\r
   \r
   // Clear all lingering interrupts\r
   if(pUdp->UDP_ISR & AT91C_UDP_ENDBUSRES) {\r
@@ -236,32 +235,31 @@ void usb_disable() {
 //* \brief This function Activates the USB device\r
 //*----------------------------------------------------------------------------\r
 void usb_enable() {\r
-  // Set the PLL USB Divider\r
-  AT91C_BASE_CKGR->CKGR_PLLR |= AT91C_CKGR_USBDIV_1 ;\r
-  \r
-  // Specific Chip USB Initialisation\r
-  // Enables the 48MHz USB clock UDPCK and System Peripheral USB Clock\r
-  AT91C_BASE_PMC->PMC_SCER = AT91C_PMC_UDP;\r
-  AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_UDP);\r
-  \r
-  // Enable UDP PullUp (USB_DP_PUP) : enable & Clear of the corresponding PIO\r
-  // Set in PIO mode and Configure in Output\r
-  AT91C_BASE_PIOA->PIO_PER = GPIO_USB_PU; // Set in PIO mode\r
+       // Set the PLL USB Divider\r
+       AT91C_BASE_CKGR->CKGR_PLLR |= AT91C_CKGR_USBDIV_1 ;\r
+\r
+       // Specific Chip USB Initialisation\r
+       // Enables the 48MHz USB clock UDPCK and System Peripheral USB Clock\r
+       AT91C_BASE_PMC->PMC_SCER = AT91C_PMC_UDP;\r
+       AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_UDP);\r
+\r
+       // Enable UDP PullUp (USB_DP_PUP) : enable & Clear of the corresponding PIO\r
+       // Set in PIO mode and Configure in Output\r
+       AT91C_BASE_PIOA->PIO_PER = GPIO_USB_PU; // Set in PIO mode\r
        AT91C_BASE_PIOA->PIO_OER = GPIO_USB_PU; // Configure as Output\r
-  \r
-  // Clear for set the Pullup resistor\r
+\r
+       // Clear for set the Pullup resistor\r
        AT91C_BASE_PIOA->PIO_CODR = GPIO_USB_PU;\r
-  \r
-  // Disconnect and reconnect USB controller for 100ms\r
-  usb_disable();\r
-  \r
-  // Wait for a short while\r
-  for (volatile size_t i=0; i<0x100000; i++);\r
-//  SpinDelay(100);\r
 \r
-  // Reconnect USB reconnect\r
-  AT91C_BASE_PIOA->PIO_SODR = GPIO_USB_PU;\r
-  AT91C_BASE_PIOA->PIO_OER = GPIO_USB_PU;\r
+       // Disconnect and reconnect USB controller for 100ms\r
+       usb_disable();\r
+\r
+       // Wait for a short while\r
+       for (volatile size_t i=0; i<0x100000; i++);\r
+\r
+       // Reconnect USB reconnect\r
+       AT91C_BASE_PIOA->PIO_SODR = GPIO_USB_PU;\r
+       AT91C_BASE_PIOA->PIO_OER = GPIO_USB_PU;\r
 }\r
 \r
 //*----------------------------------------------------------------------------\r
@@ -300,28 +298,26 @@ bool usb_poll()
 //* \brief Read available data from Endpoint OUT\r
 //*----------------------------------------------------------------------------\r
 uint32_t usb_read(byte_t* data, size_t len) {\r
-  byte_t bank = btReceiveBank;\r
+       byte_t bank = btReceiveBank;\r
        uint32_t packetSize, nbBytesRcv = 0;\r
-  uint32_t time_out = 0;\r
+       uint32_t time_out = 0;\r
   \r
-       while (len)\r
-  {\r
+       while (len)  {\r
                if (!usb_check()) break;\r
 \r
                if ( pUdp->UDP_CSR[AT91C_EP_OUT] & bank ) {\r
                        packetSize = MIN(pUdp->UDP_CSR[AT91C_EP_OUT] >> 16, len);\r
-      len -= packetSize;\r
+                       len -= packetSize;\r
                        while(packetSize--)\r
                                data[nbBytesRcv++] = pUdp->UDP_FDR[AT91C_EP_OUT];\r
                        pUdp->UDP_CSR[AT91C_EP_OUT] &= ~(bank);\r
-                       if (bank == AT91C_UDP_RX_DATA_BK0)\r
-      {\r
+                       if (bank == AT91C_UDP_RX_DATA_BK0) {\r
                                bank = AT91C_UDP_RX_DATA_BK1;\r
-      } else {\r
+                       } else {\r
                                bank = AT91C_UDP_RX_DATA_BK0;\r
-      }\r
+                       }\r
                }\r
-    if (time_out++ == 0x1fff) break;\r
+               if (time_out++ == 0x1fff) break;\r
        }\r
 \r
        btReceiveBank = bank;\r
@@ -353,7 +349,7 @@ uint32_t usb_write(const byte_t* data, const size_t len) {
                // Wait for the the first bank to be sent\r
                while (!(pUdp->UDP_CSR[AT91C_EP_IN] & AT91C_UDP_TXCOMP)) {\r
                        if (!usb_check()) return length;\r
-    }\r
+               }\r
                pUdp->UDP_CSR[AT91C_EP_IN] &= ~(AT91C_UDP_TXCOMP);\r
                while (pUdp->UDP_CSR[AT91C_EP_IN] & AT91C_UDP_TXCOMP);\r
                pUdp->UDP_CSR[AT91C_EP_IN] |= AT91C_UDP_TXPKTRDY;\r
Impressum, Datenschutz