Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
CHG: fixes to match the new arguments to the darkside attack (keytype…
Browse files Browse the repository at this point in the history
… A|B and blocknumber) in mifare_autopwn.lua script.
  • Loading branch information
iceman1001 committed Aug 7, 2016
1 parent 16658b1 commit b62cbad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/scripts/mifare_autopwn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Output files from this operation:
-- Some utilities
-------------------------------
local DEBUG = false
local MIFARE_AUTH_KEYA = 0x60
local MIFARE_AUTH_KEYB = 0x61
---
-- A debug printout-function
function dbg(args)
Expand Down Expand Up @@ -66,7 +68,7 @@ end
function mfcrack()
core.clearCommandBuffer()
-- Build the mifare-command
local cmd = Command:new{cmd = cmds.CMD_READER_MIFARE, arg1 = 1, arg2 = 0}
local cmd = Command:new{cmd = cmds.CMD_READER_MIFARE, arg1 = 1, arg2 = 0, arg3 = MIFARE_AUTH_KEYA}

local retry = true
while retry do
Expand All @@ -78,7 +80,7 @@ function mfcrack()
if errormessage then return nil, errormessage end
-- Try again..set arg1 to 0 this time.

cmd = Command:new{cmd = cmds.CMD_READER_MIFARE, arg1 = 0, arg2 = 0}
cmd = Command:new{cmd = cmds.CMD_READER_MIFARE, arg1 = 0, arg2 = 0, arg3 = MIFARE_AUTH_KEYA}
end
return nil, "Aborted by user"
end
Expand Down

0 comments on commit b62cbad

Please sign in to comment.