chg: 'script run iso15_magic' - added switch "-a" to swap between iceman styled vs offical styled iso15 raw commands.

In order to run this script on official pm3 repo, you will need to copy this script and
/client/lualibs/read15.lua file.

Read help text for examples
script run iso15_magic -h
This commit is contained in:
iceman1001 2019-01-21 09:59:47 +01:00
parent fa889900c0
commit 7294262442

View file

@ -5,7 +5,7 @@ local utils = require('utils')
copyright = 'Copyright (c) 2018 IceSQL AB. All rights reserved.' copyright = 'Copyright (c) 2018 IceSQL AB. All rights reserved.'
author = 'Christian Herrmann' author = 'Christian Herrmann'
version = 'v1.0.3' version = 'v1.0.4'
desc = [[ desc = [[
This script tries to set UID on a IS15693 SLIX magic card This script tries to set UID on a IS15693 SLIX magic card
Remember the UID ->MUST<- start with 0xE0 Remember the UID ->MUST<- start with 0xE0
@ -15,6 +15,8 @@ example = [[
-- ISO15693 slix magic tag -- ISO15693 slix magic tag
script run iso15_magic -u E004013344556677 script run iso15_magic -u E004013344556677
script run iso15_magic -u E004013344556677 -a
]] ]]
usage = [[ usage = [[
script run iso15_magic -h -u <uid> script run iso15_magic -h -u <uid>
@ -22,6 +24,7 @@ script run iso15_magic -h -u <uid>
Arguments: Arguments:
-h : this help -h : this help
-u <UID> : UID (16 hexsymbols) -u <UID> : UID (16 hexsymbols)
-a : use offical pm3 repo ISO15 commands instead of iceman fork.
]] ]]
local DEBUG = true local DEBUG = true
@ -82,11 +85,13 @@ function main(args)
print() print()
local uid = 'E004013344556677' local uid = 'E004013344556677'
local use_iceman = true
-- Read the parameters -- Read the parameters
for o, a in getopt.getopt(args, 'hu:') do for o, a in getopt.getopt(args, 'hu:a') do
if o == "h" then return help() end if o == "h" then return help() end
if o == "u" then uid = a end if o == "u" then uid = a end
if o == "a" then use_iceman = false end
end end
-- uid string checks -- uid string checks
@ -103,8 +108,11 @@ function main(args)
core.clearCommandBuffer() core.clearCommandBuffer()
magicUID_iceman(block0, block1) if use_iceman then
--magicUID_offical(block0, block1) magicUID_iceman(block0, block1)
else
magicUID_offical(block0, block1)
end
end end
main(args) main(args)