mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
Create hf_i2c_recovery.lua
helps unbrick soft locked i2cs (xsiids)
This commit is contained in:
parent
248cc83aab
commit
c79cba4bcc
1 changed files with 70 additions and 0 deletions
70
client/luascripts/hf_i2c_recovery.lua
Normal file
70
client/luascripts/hf_i2c_recovery.lua
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
local getopt = require('getopt')
|
||||||
|
local ansicolors = require('ansicolors')
|
||||||
|
|
||||||
|
copyright = ''
|
||||||
|
author = 'Equip'
|
||||||
|
version = 'v1.0.1'
|
||||||
|
desc = [[
|
||||||
|
This script tries to recover soft bricked ntag i2c tags through the use of raw commands
|
||||||
|
]]
|
||||||
|
example = [[
|
||||||
|
1. script run hf_i2c_recovery
|
||||||
|
]]
|
||||||
|
usage = [[
|
||||||
|
script run hf_i2c_recovery
|
||||||
|
]]
|
||||||
|
arguments = [[
|
||||||
|
-h this help
|
||||||
|
]]
|
||||||
|
---
|
||||||
|
local function help()
|
||||||
|
print(copyright)
|
||||||
|
print(author)
|
||||||
|
print(version)
|
||||||
|
print(desc)
|
||||||
|
print(ansicolors.cyan..'Usage'..ansicolors.reset)
|
||||||
|
print(usage)
|
||||||
|
print(ansicolors.cyan..'Arguments'..ansicolors.reset)
|
||||||
|
print(arguments)
|
||||||
|
print(ansicolors.cyan..'Example usage'..ansicolors.reset)
|
||||||
|
print(example)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function i2cR()
|
||||||
|
return {
|
||||||
|
[0] = 'hf 14a raw -k -a -b 7 40',
|
||||||
|
[1] = 'hf 14a raw -k -a 43',
|
||||||
|
[2] = 'hf 14a raw -c -a A2005380712A',
|
||||||
|
[3] = 'hf 14a raw -k -a -b 7 40',
|
||||||
|
[4] = 'hf 14a raw -k -a 43',
|
||||||
|
[5] = 'hf 14a raw -c -a A2010200D980',
|
||||||
|
[6] = 'hf 14a raw -k -a -b 7 40',
|
||||||
|
[7] = 'hf 14a raw -k -a 43',
|
||||||
|
[8] = 'hf 14a raw -c -a A2025B480000',
|
||||||
|
[9] = 'hf 14a raw -c -a 5000',
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function sendCmds( cmds )
|
||||||
|
for i = 0, #cmds do
|
||||||
|
if cmds[i] then
|
||||||
|
print ( cmds[i] )
|
||||||
|
core.console( cmds[i] )
|
||||||
|
core.clearCommandBuffer()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function main(args)
|
||||||
|
|
||||||
|
local i
|
||||||
|
local cmds = {}
|
||||||
|
--check for params
|
||||||
|
for o, a in getopt.getopt(args, 'h') do
|
||||||
|
if o == 'h' then return help() end
|
||||||
|
end
|
||||||
|
|
||||||
|
core.clearCommandBuffer()
|
||||||
|
sendCmds( i2cR() )
|
||||||
|
end
|
||||||
|
main(args)
|
Loading…
Add table
Add a link
Reference in a new issue