code style, code clean up of redundant functions, comments, its many minor fixes across the platform. Sorry for not making 20 commits

This commit is contained in:
iceman1001 2025-02-21 15:38:33 +01:00
commit cef07dedf6
57 changed files with 672 additions and 521 deletions

View file

@ -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
@ -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,7 +130,7 @@ 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

View file

@ -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
@ -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

View file

@ -9,11 +9,11 @@ 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
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 = [[
@ -91,7 +91,7 @@ end
local function main(args)
for o, a in getopt.getopt(args, 'h') do
if o == 'h' then return help() end
end
end
command('lf t55 chk')
local log_content = read_log_file(logfile)
local password = log_content and extract_password(log_content) or nil