text
This commit is contained in:
@@ -7,9 +7,9 @@ local ansicolors = require('ansicolors')
|
|||||||
|
|
||||||
copyright = ''
|
copyright = ''
|
||||||
author = 'Iceman'
|
author = 'Iceman'
|
||||||
version = 'v1.0.2'
|
version = 'v1.0.3'
|
||||||
desc = [[
|
desc = [[
|
||||||
This script will generate 'hf mf wrbl' commands for each block to format a Mifare card.
|
This script will generate 'hf mf wrbl' commands for each block to format a Mifare Classic card.
|
||||||
|
|
||||||
Alla datablocks gets 0x00
|
Alla datablocks gets 0x00
|
||||||
As default the script sets the keys A/B to 0xFFFFFFFFFFFF
|
As default the script sets the keys A/B to 0xFFFFFFFFFFFF
|
||||||
@@ -41,7 +41,7 @@ arguments = [[
|
|||||||
|
|
||||||
local TIMEOUT = 2000 -- Shouldn't take longer than 2 seconds
|
local TIMEOUT = 2000 -- Shouldn't take longer than 2 seconds
|
||||||
local DEBUG = true -- the debug flag
|
local DEBUG = true -- the debug flag
|
||||||
local CmdString = 'hf mf wrbl %d B %s %s'
|
local CmdString = 'hf mf wrbl --blk %d -b -k %s -d %s'
|
||||||
local numBlocks = 64
|
local numBlocks = 64
|
||||||
local numSectors = 16
|
local numSectors = 16
|
||||||
---
|
---
|
||||||
@@ -89,7 +89,7 @@ local function ExitMsg(msg)
|
|||||||
end
|
end
|
||||||
--
|
--
|
||||||
-- Read information from a card
|
-- Read information from a card
|
||||||
function GetCardInfo()
|
local function GetCardInfo()
|
||||||
result, err = lib14a.read(false, true)
|
result, err = lib14a.read(false, true)
|
||||||
if not result then
|
if not result then
|
||||||
print(err)
|
print(err)
|
||||||
@@ -200,9 +200,9 @@ local function main(args)
|
|||||||
local reminder = (block+1) % 4
|
local reminder = (block+1) % 4
|
||||||
local cmd
|
local cmd
|
||||||
if reminder == 0 then
|
if reminder == 0 then
|
||||||
cmd = CmdString:format(block, OldKey , EMPTY_SECTORTRAIL)
|
cmd = CmdString:format(block, OldKey, EMPTY_SECTORTRAIL)
|
||||||
else
|
else
|
||||||
cmd = CmdString:format(block, OldKey , EMPTY_BL)
|
cmd = CmdString:format(block, OldKey, EMPTY_BL)
|
||||||
end
|
end
|
||||||
|
|
||||||
if block ~= 0 then
|
if block ~= 0 then
|
||||||
|
|||||||
Reference in New Issue
Block a user