]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/scripts/tnp3sim.lua
Merge branch 'master' of https://github.com/Proxmark/proxmark3
[proxmark3-svn] / client / scripts / tnp3sim.lua
index c7c66371df206d5e46a77fbe8b536714edcc488f..1d3dbefd176d663d72bd83cca84c42b41f317cde 100644 (file)
@@ -26,7 +26,7 @@ Arguments:
 ]]
 
 local TIMEOUT = 2000 -- Shouldn't take longer than 2 seconds
-local DEBUG = false -- the debug flag
+local DEBUG = true -- the debug flag
 
 
 local band = bit32.band
@@ -302,25 +302,25 @@ function DivideByK(msw, lsw)
        remainder = num % RADIX
        return remainder, highLSW, lowLSW
        
-                   uint num = 0 | (msw >> 16) & 0xffff;
+                   -- uint num = 0 | (msw >> 16) & 0xffff;
  
-            highLSW = 0 | (num / RADIX) << 16;
-            remainder = num % RADIX;
+            -- highLSW = 0 | (num / RADIX) << 16;
+            -- remainder = num % RADIX;
 
-            num = (remainder << 16) | (msw & 0xffff);
+            -- num = (remainder << 16) | (msw & 0xffff);
  
-            highLSW |= num / RADIX;
-            remainder = num % RADIX;
+            -- highLSW |= num / RADIX;
+            -- remainder = num % RADIX;
 
-            num = (remainder << 16) | ((lsw >> 16) & 0xffff);
+            -- num = (remainder << 16) | ((lsw >> 16) & 0xffff);
 
-            lowLSW = 0 | (num / RADIX) << 16;
-            remainder = num % RADIX;
+            -- lowLSW = 0 | (num / RADIX) << 16;
+            -- remainder = num % RADIX;
 
-            num = (remainder << 16) | (lsw & 0xffff);
+            -- num = (remainder << 16) | (lsw & 0xffff);
 
-            lowLSW |= num / RADIX;
-            remainder = num % RADIX;
+            -- lowLSW |= num / RADIX;
+            -- remainder = num % RADIX;
 
 end
 
@@ -397,7 +397,8 @@ local function main(args)
        print( ('       UID : 0x%s'):format(uid) )
        print( ('    CARDID : 0x%s %s [%s]'):format(
                                                                cardidMsw,cardidLsw, 
-                                                               Num2Card(cardidMsw, cardidLsw))
+                                                               --Num2Card(cardidMsw, cardidLsw))
+                                                               '')
                                                                )
        print( string.rep('--',20) )
 
@@ -466,7 +467,7 @@ local function main(args)
                err = LoadEmulator(blocks)
                if err then return oops(err) end        
                core.clearCommandBuffer()
-               print('The simulation is now prepared.\n --> run \"hf mf sim u '..uid..' x\" <--')
+               print('The simulation is now prepared.\n --> run \"hf mf sim u '..uid..'\" <--')
        end
 end
 main(args)
\ No newline at end of file
Impressum, Datenschutz