mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Merge branch 'master' into master
Signed-off-by: Jarek Barwinski <116510448+jareckib@users.noreply.github.com>
This commit is contained in:
commit
06ff7934f3
124 changed files with 3736 additions and 2282 deletions
|
@ -10,7 +10,7 @@ local green = ac.green
|
|||
|
||||
author = ' Author: jareckib - created 04.02.2025'
|
||||
version = ' version v1.05'
|
||||
desc = [[
|
||||
desc = [[
|
||||
A simple script for searching the password for T5577. The script creates a
|
||||
dictionary starting from the entered starting year to the entered ending year.
|
||||
There are two search methods - DDMMYYYY or YYYYMMDD. Checking the entire year
|
||||
|
@ -19,7 +19,7 @@ desc = [[
|
|||
]]
|
||||
|
||||
usage = [[
|
||||
script run t55_chk [-s start_year] [-e end_year] [-d | -y]
|
||||
script run lf_t55xx_chk [-s start_year] [-e end_year] [-d | -y]
|
||||
]]
|
||||
options = [[
|
||||
-h this help
|
||||
|
@ -29,10 +29,10 @@ options = [[
|
|||
-y search method: YYYYMMDD
|
||||
]]
|
||||
examples = [[
|
||||
script run t55_chk -s 1999 -d -> start 1999, end is current year, method 01011999
|
||||
script run t55_chk -s 1999 -y -> start 1999, end is current year, method 19990101
|
||||
script run t55_chk -s 1999 -e 2001 -y -> start 1999, end year 2001, method 19990101
|
||||
script run t55_chk -s 1999 -e 2001 -d -> start 1999, end year 2001, method 01011999
|
||||
script run lf_t55xx_chk -s 1999 -d -> start 1999, end is current year, method 01011999
|
||||
script run lf_t55xx_chk -s 1999 -y -> start 1999, end is current year, method 19990101
|
||||
script run lf_t55xx_chk -s 1999 -e 2001 -y -> start 1999, end year 2001, method 19990101
|
||||
script run lf_t55xx_chk -s 1999 -e 2001 -d -> start 1999, end year 2001, method 01011999
|
||||
]]
|
||||
|
||||
local function help()
|
||||
|
@ -102,11 +102,11 @@ local function main(args)
|
|||
|
||||
for o, a in getopt.getopt(args, 'hs:e:dy') do
|
||||
if o == 'h' then return help() end
|
||||
if o == 's' then
|
||||
if o == 's' then
|
||||
start_year = tonumber(a)
|
||||
if not start_year then return oops(' Invalid start year') end
|
||||
end
|
||||
if o == 'e' then
|
||||
if o == 'e' then
|
||||
end_year = tonumber(a)
|
||||
if not end_year then return oops(' Invalid end year') end
|
||||
end
|
||||
|
@ -115,13 +115,13 @@ local function main(args)
|
|||
end
|
||||
|
||||
if not start_year then return oops(' Starting year is required') end
|
||||
if start_year < 1900 or start_year > 2100 then
|
||||
return oops(' Start year must be between 1900 and 2100')
|
||||
if start_year < 1900 or start_year > 2100 then
|
||||
return oops(' Start year must be between 1900 and 2100')
|
||||
end
|
||||
if args[#args] == "-e" then return oops(' Ending year cannot be empty') end
|
||||
if not end_year then end_year = current_year end
|
||||
if end_year < 1900 or end_year > 2100 then
|
||||
return oops(' End year must be between 1900 and 2100')
|
||||
if end_year < 1900 or end_year > 2100 then
|
||||
return oops(' End year must be between 1900 and 2100')
|
||||
end
|
||||
|
||||
if end_year < start_year then return oops(' End year cannot be earlier than start year') end
|
||||
|
@ -130,9 +130,9 @@ local function main(args)
|
|||
if generate_dictionary(start_year, end_year, mode) then
|
||||
print(ac.green .. " File created: " .. dictionary_path .. res)
|
||||
print(cyan .. " Starting password testing on T5577..." .. res)
|
||||
core.console('lf t55 chk -f ' .. dictionary_path)
|
||||
core.console('lf t55 chk -f ' .. dictionary_path)
|
||||
else
|
||||
return oops('Problem saving the file')
|
||||
end
|
||||
end
|
||||
main(args)
|
||||
main(args)
|
|
@ -6,7 +6,7 @@ local dash = string.rep('--', 32)
|
|||
|
||||
author = ' Author: jareckib - created 01.02.2025'
|
||||
version = ' version v1.01'
|
||||
desc = [[
|
||||
desc = [[
|
||||
A simple script for searching the password for T5577. The script creates a
|
||||
dictionary starting from the entered starting year to the entered ending year.
|
||||
There are two search methods - DDMMYYYY or YYYYMMDD. Checking the entire year
|
||||
|
@ -14,10 +14,10 @@ desc = [[
|
|||
useful if the password is, for example, a date of birth.
|
||||
]]
|
||||
usage = [[
|
||||
script run t55_chk_date
|
||||
script run lf_t55xx_chk_date
|
||||
]]
|
||||
arguments = [[
|
||||
script run t55_chk_date -h : this help
|
||||
script run lf_t55xx_chk_date -h : this help
|
||||
]]
|
||||
|
||||
local DEBUG = true
|
||||
|
@ -84,11 +84,11 @@ local function get_valid_year_input(prompt)
|
|||
local year
|
||||
while true do
|
||||
io.write(prompt)
|
||||
local input = io.read()
|
||||
local input = io.read()
|
||||
if input == "" then
|
||||
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Year cannot be empty')
|
||||
else
|
||||
year = tonumber(input)
|
||||
year = tonumber(input)
|
||||
if not year then
|
||||
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Invalid input (digits only)')
|
||||
elseif year < 1900 then
|
||||
|
@ -155,7 +155,7 @@ local function main(args)
|
|||
if generate_dictionary(start_year, end_year, mode) then
|
||||
print(ac.green .. " File created: " .. dictionary_path .. ac.reset)
|
||||
print(ac.cyan .. " Starting password testing on T5577..." .. ac.reset)
|
||||
core.console('lf t55 chk -f ' .. dictionary_path)
|
||||
core.console('lf t55 chk -f ' .. dictionary_path)
|
||||
else
|
||||
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Problem saving the file.')
|
||||
end
|
|
@ -141,4 +141,4 @@ local function main(args)
|
|||
print(dash)
|
||||
end
|
||||
|
||||
main(args)
|
||||
main(args)
|
|
@ -1,101 +0,0 @@
|
|||
local getopt = require('getopt')
|
||||
local utils = require('utils')
|
||||
local ac = require('ansicolors')
|
||||
local os = require('os')
|
||||
local dash = string.rep('--', 32)
|
||||
local dir = os.getenv('HOME') .. '/.proxmark3/logs/'
|
||||
local logfile = (io.popen('dir /a-d /o-d /tw /b/s "' .. dir .. '" 2>nul:'):read("*a"):match("%C+"))
|
||||
local command = core.console
|
||||
|
||||
author = ' Author: jareckib - 15.02.2025'
|
||||
version = ' version v1.00'
|
||||
desc = [[
|
||||
This simple script first checks if a password has been set for the T5577.
|
||||
It uses the dictionary t55xx_default_pwds.dic for this purpose. If a password
|
||||
is found, it uses the wipe command to erase the T5577. Then the reanimation
|
||||
procedure is applied. If the password is not found or doesn't exist the script
|
||||
only performs the reanimation procedure. The script revives 99% of blocked tags.
|
||||
]]
|
||||
usage = [[
|
||||
script run t55_fix
|
||||
]]
|
||||
arguments = [[
|
||||
script run t55_fix -h : this help
|
||||
]]
|
||||
|
||||
local function help()
|
||||
print()
|
||||
print(author)
|
||||
print(version)
|
||||
print(desc)
|
||||
print(ac.cyan..' Usage'..ac.reset)
|
||||
print(usage)
|
||||
print(ac.cyan..' Arguments'..ac.reset)
|
||||
print(arguments)
|
||||
end
|
||||
|
||||
local function read_log_file(logfile)
|
||||
local file = io.open(logfile, "r")
|
||||
if not file then
|
||||
return nil
|
||||
end
|
||||
local content = file:read("*all")
|
||||
file:close()
|
||||
return content
|
||||
end
|
||||
|
||||
local function extract_password(log_content)
|
||||
for line in log_content:gmatch("[^\r\n]+") do
|
||||
local password = line:match('%[%+%] found valid password: %[ (%x%x%x%x%x%x%x%x) %]')
|
||||
if password then
|
||||
return password
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
local function reanimate_t5577(password)
|
||||
if password then
|
||||
command('clear')
|
||||
print(dash)
|
||||
print(" Using found password to wipe: " .. password)
|
||||
print(dash)
|
||||
command('lf t55 wipe -p ' .. password)
|
||||
else
|
||||
command('clear')
|
||||
print(dash)
|
||||
print(ac.yellow.." No valid password found, proceeding with reanimation."..ac.reset)
|
||||
print(dash)
|
||||
end
|
||||
command('lf t55 write -b 0 -d 000880E8 -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --pg1 --r0 -t -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --pg1 --r1 -t -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --pg1 --r2 -t -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --pg1 --r3 -t -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --r0 -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --r1 -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --r2 -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --r3 -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --pg1 --r0 -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --pg1 --r1 -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --pg1 --r2 -p 00000000')
|
||||
command('lf t55 write -b 0 -d 000880E0 --pg1 --r3 -p 00000000')
|
||||
command('lf t55 detect')
|
||||
local file = io.open(logfile, "w+")
|
||||
file:write("")
|
||||
file:close()
|
||||
print(dash)
|
||||
print('all done!')
|
||||
end
|
||||
|
||||
local function main(args)
|
||||
for o, a in getopt.getopt(args, 'h') do
|
||||
if o == 'h' then return help() end
|
||||
end
|
||||
command('lf t55 chk')
|
||||
local log_content = read_log_file(logfile)
|
||||
local password = log_content and extract_password(log_content) or nil
|
||||
reanimate_t5577(password)
|
||||
end
|
||||
|
||||
main(args)
|
Loading…
Add table
Add a link
Reference in a new issue