Merge branch 'RfidResearchGroup:master' into mf4

This commit is contained in:
team-orangeBlue 2025-02-03 22:38:45 +03:00 committed by GitHub
commit 88b30a778a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 501 additions and 47 deletions

View file

@ -0,0 +1,122 @@
local os = require("os")
local ac = require('ansicolors')
local getopt = require('getopt')
local dir = os.getenv('HOME') .. '/proxmark3/client/dictionaries/'
local dictionary_path = dir .. 'T5577date.dic'
local cyan = ac.cyan
local res = ac.reset
author = ' Author: jareckib - created 02.02.2025'
version = ' version v1.00'
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
takes about 1 minute and 50 seconds. Date from 1900 to 2100. The script may be
useful if the password is, for example, a date of birth.
]]
usage = [[
script run t55_chk [-s start_year] [-e end_year] [-d | -y]
]]
options = [[
-h Show this help message
-s Starting year (required)
-e Ending year (default: current year)
-d Search method: DDMMYYYY
-y Search method: YYYYMMDD
]]
examples = [[
script run t55_chk -s 1999 -d - start from 1999, end year is current year, method 01011999
script run t55_chk -s 1999 -y - start from 1999, end year is current year, method 19990101
script run t55_chk -s 1999 -e 2001 -y - start from 1999, end year 2001, method 19990101
script run t55_chk -s 1999 -e 2001 -d - start from 1999, end year 2001, method 01011999
]]
local function help()
print(ac.green..author..res)
print(version)
print(desc)
print(cyan..' Usage:'..res)
print(usage)
print(cyan..' Options:'..res)
print(options)
print(cyan..' Examples:'..res)
print(examples)
end
local function generate_dictionary(start_year, end_year, mode)
local file = io.open(dictionary_path, "w")
if not file then
print(ac.yellow .. ' ERROR: ' .. res .. 'Cannot create T5577date.dic')
return false
end
for year = start_year, end_year do
for month = 1, 12 do
for day = 1, 31 do
local entry = (mode == "y") and
(string.format("%04d%02d%02d", year, month, day)) or
(string.format("%02d%02d%04d", day, month, year))
file:write(entry .. "\n")
end
end
end
file:close()
return true
end
local function oops(err)
core.console('clear')
print( string.rep('--',39) )
print( string.rep('--',39) )
print(ac.red..' ERROR:'..res.. err)
print( string.rep('--',39) )
print( string.rep('--',39) )
return nil, err
end
local function main(args)
if #args == 0 then return help() end
local start_year, end_year, mode = nil, nil, nil
local current_year = tonumber(os.date("%Y"))
for o, a in getopt.getopt(args, 'hs:e:dy') do
if o == 'h' then return help() end
if o == 's' then
start_year = tonumber(a)
if not start_year then return oops('Invalid start year') end
end
if o == 'e' then
end_year = tonumber(a)
if not end_year then return oops('Invalid end year (-e)') end
end
if o == 'd' then mode = "d" end
if o == 'y' then mode = "y" end
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')
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')
end
if end_year < start_year then return oops('End year cannot be earlier than start year') end
if not mode then return oops('You must select searching method'..cyan..' -d'..res.. ' or '..cyan.. '-y'..res) end
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)
else
return oops('Problem saving the file')
end
end
main(args)

View file

@ -0,0 +1,164 @@
local os = require("os")
local ac = require('ansicolors')
local utils = require('utils')
local getopt = require('getopt')
local dash = string.rep('--', 32)
author = ' Author: jareckib - created 01.02.2025'
version = ' version v1.01'
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
takes about 1 minute and 50 seconds. Date from 1900 to 2100. The script may be
useful if the password is, for example, a date of birth.
]]
usage = [[
script run t55_chk_date
]]
arguments = [[
script run t55_chk_date -h : this help
]]
local DEBUG = true
local function dbg(args)
if not DEBUG then return end
if type(args) == 'table' then
for _, v in ipairs(args) do
dbg(v)
end
else
print('###', args)
end
end
local function help()
print()
print(ac.green..author)
print(version)
print(ac.yellow..desc)
print(ac.cyan..' Usage'..ac.reset)
print(usage)
print(ac.cyan..' Arguments'..ac.reset)
print(arguments)
end
local dir = os.getenv('HOME') .. '/proxmark3/client/dictionaries/'
local dictionary_path = dir .. 'T5577date.dic'
local days_in_month = {
[1] = 31, [2] = 28, [3] = 31, [4] = 30, [5] = 31, [6] = 30,
[7] = 31, [8] = 31, [9] = 30, [10] = 31, [11] = 30, [12] = 31
}
local function generate_dictionary(start_year, end_year, mode)
local file = io.open(dictionary_path, "w")
if not file then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Cannot create T5577date.dic')
return false
end
for year = start_year, end_year do
for month = 1, 12 do
local days_in_current_month = days_in_month[month]
if month == 2 and ((year % 4 == 0 and year % 100 ~= 0) or (year % 400 == 0)) then
days_in_current_month = 29
end
for day = 1, days_in_current_month do
local month_str = string.format("%02d", month)
local day_str = string.format("%02d", day)
local year_str = tostring(year)
local entry = (mode == "1") and (year_str .. month_str .. day_str) or (day_str .. month_str .. year_str)
file:write(entry .. "\n")
end
end
end
file:close()
return true
end
local function get_valid_year_input(prompt)
local year
while true do
io.write(prompt)
local input = io.read()
if input == "" then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Year cannot be empty')
else
year = tonumber(input)
if not year then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Invalid input (digits only)')
elseif year < 1900 then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Year cannot be less than 1900')
elseif year > 2100 then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Year cannot be greater than 2100')
else
break
end
end
end
return year
end
local function get_valid_ending_year_input(start_year)
local end_year
while true do
io.write(" Enter the ending year: " .. ac.yellow)
local input = io.read()
io.write(ac.reset..'')
if input == "" then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Ending year cannot be empty')
else
end_year = tonumber(input)
if not end_year then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Invalid input (digits only)')
elseif end_year < 1900 or end_year > 2100 then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Year must be between 1900 and 2100')
elseif end_year < start_year then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Ending year cannot be less than the starting year')
else
break
end
end
end
return end_year
end
local function get_valid_mode_input()
local mode
while true do
io.write(' Choose the searching mode ('..ac.cyan..'1'..ac.reset..' - YYYYMMDD '..ac.cyan..'2'..ac.reset..' - DDMMYYYY): ')
mode = io.read()
if mode == "1" or mode == "2" then
return mode
else
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Invalid choice. Please enter 1 or 2.')
end
end
end
local function main(args)
for o, a in getopt.getopt(args, 'h') do
if o == 'h' then return help() end
end
core.console('clear')
print(dash)
print(dash)
local start_year = get_valid_year_input(" Enter the starting year: " .. ac.yellow)
io.write(ac.reset..'')
local end_year = get_valid_ending_year_input(start_year)
local mode = get_valid_mode_input()
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)
else
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Problem saving the file.')
end
end
main(args)

View file

@ -284,6 +284,7 @@ FRA_OrganizationalAuthority_Contract_Provider = {
},
0x091: {
1: InterticHelper('Strasbourg', 'CTS', Describe_Usage_4), # More dump needed, not only tram !
5: InterticHelper('Strasbourg', 'CTS / new', Describe_Usage_4), # More dump needed, not only tram !
},
0x502: {
83: InterticHelper('Annecy', 'Sibra', Describe_Usage_2),

View file

@ -1000,7 +1000,7 @@ static int seos_pacs_adf_select(char *oid, int oid_len, uint8_t *get_data, int g
uint16_t selectedOIDLen = strlen(selectedOID);
char selectedOIDLenHex[3];
snprintf(selectedOIDLenHex, sizeof(selectedOIDLenHex), "%02X", (selectedOIDLen) / 2);
snprintf(selectedOIDLenHex, sizeof(selectedOIDLenHex), "%02X", (selectedOIDLen >> 1) & 0xFF);
char selectedADF[strlen(ADFprefix) + strlen(selectedOIDLenHex) + selectedOIDLen + 1];
snprintf(selectedADF, sizeof(selectedADF), "%s%s%s", ADFprefix, selectedOIDLenHex, selectedOID);
@ -1112,10 +1112,9 @@ static int seos_adf_select(char *oid, int oid_len, int key_index) {
const char *ADFprefix = "06";
char selectedOID[100];
snprintf(selectedOID, sizeof(selectedOID), "%s", oid);
uint16_t selectedOIDLen = strlen(selectedOID);
char selectedOIDLenHex[3];
snprintf(selectedOIDLenHex, sizeof(selectedOIDLenHex), "%02X", (selectedOIDLen) / 2);
snprintf(selectedOIDLenHex, sizeof(selectedOIDLenHex), "%02X", (selectedOIDLen >> 1) & 0xFF);
char selectedADF[strlen(ADFprefix) + strlen(selectedOIDLenHex) + selectedOIDLen + 1];
snprintf(selectedADF, sizeof(selectedADF), "%s%s%s", ADFprefix, selectedOIDLenHex, selectedOID);

View file

@ -544,6 +544,7 @@ static int CmdHIDBrute(const char *Cmd) {
}
wiegand_card_t card_hi, card_low;
cardformatdescriptor_t card_descriptor = HIDGetCardFormat(format_idx).Fields;
memset(&card_hi, 0, sizeof(wiegand_card_t));
char field[3] = {0};
@ -623,13 +624,13 @@ static int CmdHIDBrute(const char *Cmd) {
return PM3_ESOFT;
}
if (strcmp(field, "fc") == 0) {
if (card_hi.FacilityCode < 0xFF) {
if (card_hi.FacilityCode < card_descriptor.MaxFC) {
card_hi.FacilityCode++;
} else {
fin_hi = true;
}
} else if (strcmp(field, "cn") == 0) {
if (card_hi.CardNumber < 0xFFFF) {
if (card_hi.CardNumber < card_descriptor.MaxCN) {
card_hi.CardNumber++;
} else {
fin_hi = true;

View file

@ -1499,46 +1499,46 @@ static void hid_print_card(wiegand_card_t *card, const cardformat_t format) {
}
static const cardformat_t FormatTable[] = {
{"H10301", Pack_H10301, Unpack_H10301, "HID H10301 26-bit", {1, 1, 0, 0, 1}}, // imported from old pack/unpack
{"ind26", Pack_ind26, Unpack_ind26, "Indala 26-bit", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"ind27", Pack_ind27, Unpack_ind27, "Indala 27-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"indasc27", Pack_indasc27, Unpack_indasc27, "Indala ASC 27-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"Tecom27", Pack_Tecom27, Unpack_Tecom27, "Tecom 27-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"2804W", Pack_2804W, Unpack_2804W, "2804 Wiegand 28-bit", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"ind29", Pack_ind29, Unpack_ind29, "Indala 29-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"ATSW30", Pack_ATSW30, Unpack_ATSW30, "ATS Wiegand 30-bit", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"ADT31", Pack_ADT31, Unpack_ADT31, "HID ADT 31-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"HCP32", Pack_hcp32, Unpack_hcp32, "HID Check Point 32-bit", {1, 0, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"HPP32", Pack_hpp32, Unpack_hpp32, "HID Hewlett-Packard 32-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"Kastle", Pack_Kastle, Unpack_Kastle, "Kastle 32-bit", {1, 1, 1, 0, 1}}, // from @xilni; PR #23 on RfidResearchGroup/proxmark3
{"Kantech", Pack_Kantech, Unpack_Kantech, "Indala/Kantech KFS 32-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"WIE32", Pack_wie32, Unpack_wie32, "Wiegand 32-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"D10202", Pack_D10202, Unpack_D10202, "HID D10202 33-bit", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"H10306", Pack_H10306, Unpack_H10306, "HID H10306 34-bit", {1, 1, 0, 0, 1}}, // imported from old pack/unpack
{"N10002", Pack_N10002, Unpack_N10002, "Honeywell/Northern N10002 34-bit", {1, 1, 0, 0, 1}}, // from proxclone.com
{"Optus34", Pack_Optus, Unpack_Optus, "Indala Optus 34-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"SMP34", Pack_Smartpass, Unpack_Smartpass, "Cardkey Smartpass 34-bit", {1, 1, 1, 0, 0}}, // from cardinfo.barkweb.com.au
{"BQT34", Pack_bqt34, Unpack_bqt34, "BQT 34-bit", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"C1k35s", Pack_C1k35s, Unpack_C1k35s, "HID Corporate 1000 35-bit std", {1, 1, 0, 0, 1}}, // imported from old pack/unpack
{"C15001", Pack_C15001, Unpack_C15001, "HID KeyScan 36-bit", {1, 1, 0, 1, 1}}, // from Proxmark forums
{"S12906", Pack_S12906, Unpack_S12906, "HID Simplex 36-bit", {1, 1, 1, 0, 1}}, // from cardinfo.barkweb.com.au
{"Sie36", Pack_Sie36, Unpack_Sie36, "HID 36-bit Siemens", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"H10320", Pack_H10320, Unpack_H10320, "HID H10320 37-bit BCD", {1, 0, 0, 0, 1}}, // from Proxmark forums
{"H10302", Pack_H10302, Unpack_H10302, "HID H10302 37-bit huge ID", {1, 0, 0, 0, 1}}, // from Proxmark forums
{"H10304", Pack_H10304, Unpack_H10304, "HID H10304 37-bit", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"P10004", Pack_P10004, Unpack_P10004, "HID P10004 37-bit PCSC", {1, 1, 0, 0, 0}}, // from @bthedorff; PR #1559
{"HGen37", Pack_HGeneric37, Unpack_HGeneric37, "HID Generic 37-bit", {1, 0, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"MDI37", Pack_MDI37, Unpack_MDI37, "PointGuard MDI 37-bit", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"BQT38", Pack_bqt38, Unpack_bqt38, "BQT 38-bit", {1, 1, 1, 0, 1}}, // from cardinfo.barkweb.com.au
{"ISCS", Pack_iscs38, Unpack_iscs38, "ISCS 38-bit", {1, 1, 0, 1, 1}}, // from cardinfo.barkweb.com.au
{"PW39", Pack_pw39, Unpack_pw39, "Pyramid 39-bit wiegand format", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au
{"P10001", Pack_P10001, Unpack_P10001, "HID P10001 Honeywell 40-bit", {1, 1, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"Casi40", Pack_CasiRusco40, Unpack_CasiRusco40, "Casi-Rusco 40-bit", {1, 0, 0, 0, 0}}, // from cardinfo.barkweb.com.au
{"C1k48s", Pack_C1k48s, Unpack_C1k48s, "HID Corporate 1000 48-bit std", {1, 1, 0, 0, 1}}, // imported from old pack/unpack
{"BC40", Pack_bc40, Unpack_bc40, "Bundy TimeClock 40-bit", {1, 1, 0, 1, 1}}, // from
{"Avig56", Pack_Avig56, Unpack_Avig56, "Avigilon 56-bit", {1, 1, 0, 0, 1}},
{"Defcon32", Pack_Defcon32, Unpack_Defcon32, "Custom Defcon RFCTF 42 BIT format", {1, 1, 1, 0, 1}}, // Created by (@micsen) for the CTF
{NULL, NULL, NULL, NULL, {0, 0, 0, 0, 0}} // Must null terminate array
{"H10301", Pack_H10301, Unpack_H10301, "HID H10301 26-bit", {1, 1, 0, 0, 1, 0xFF, 0xFFFF, 0, 0}}, // imported from old pack/unpack
{"ind26", Pack_ind26, Unpack_ind26, "Indala 26-bit", {1, 1, 0, 0, 1, 0xFFF, 0xFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"ind27", Pack_ind27, Unpack_ind27, "Indala 27-bit", {1, 1, 0, 0, 0, 0x1FFF, 0x3FFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"indasc27", Pack_indasc27, Unpack_indasc27, "Indala ASC 27-bit", {1, 1, 0, 0, 0, 0x1FFF, 0x3FFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"Tecom27", Pack_Tecom27, Unpack_Tecom27, "Tecom 27-bit", {1, 1, 0, 0, 0, 0x7FF, 0xFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"2804W", Pack_2804W, Unpack_2804W, "2804 Wiegand 28-bit", {1, 1, 0, 0, 1, 0xFF, 0x7FFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"ind29", Pack_ind29, Unpack_ind29, "Indala 29-bit", {1, 1, 0, 0, 0, 0x1FFF, 0xFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"ATSW30", Pack_ATSW30, Unpack_ATSW30, "ATS Wiegand 30-bit", {1, 1, 0, 0, 1, 0xFFF, 0xFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"ADT31", Pack_ADT31, Unpack_ADT31, "HID ADT 31-bit", {1, 1, 0, 0, 0, 0xF, 0x7FFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"HCP32", Pack_hcp32, Unpack_hcp32, "HID Check Point 32-bit", {1, 0, 0, 0, 0, 0, 0x3FFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"HPP32", Pack_hpp32, Unpack_hpp32, "HID Hewlett-Packard 32-bit", {1, 1, 0, 0, 0, 0xFFF, 0x1FFFFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"Kastle", Pack_Kastle, Unpack_Kastle, "Kastle 32-bit", {1, 1, 1, 0, 1, 0xFF, 0xFFFF, 0x1F, 0}}, // from @xilni; PR #23 on RfidResearchGroup/proxmark3
{"Kantech", Pack_Kantech, Unpack_Kantech, "Indala/Kantech KFS 32-bit", {1, 1, 0, 0, 0, 0xFF, 0xFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"WIE32", Pack_wie32, Unpack_wie32, "Wiegand 32-bit", {1, 1, 0, 0, 0, 0xFFF, 0xFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"D10202", Pack_D10202, Unpack_D10202, "HID D10202 33-bit", {1, 1, 0, 0, 1, 0x7F, 0xFFFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"H10306", Pack_H10306, Unpack_H10306, "HID H10306 34-bit", {1, 1, 0, 0, 1, 0xFFFF, 0xFFFF, 0, 0}}, // imported from old pack/unpack
{"N10002", Pack_N10002, Unpack_N10002, "Honeywell/Northern N10002 34-bit", {1, 1, 0, 0, 1, 0xFFFF, 0xFFFF, 0, 0}}, // from proxclone.com
{"Optus34", Pack_Optus, Unpack_Optus, "Indala Optus 34-bit", {1, 1, 0, 0, 0, 0x3FF, 0xFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"SMP34", Pack_Smartpass, Unpack_Smartpass, "Cardkey Smartpass 34-bit", {1, 1, 1, 0, 0, 0x3FF, 0xFFFF, 0x7, 0}}, // from cardinfo.barkweb.com.au
{"BQT34", Pack_bqt34, Unpack_bqt34, "BQT 34-bit", {1, 1, 0, 0, 1, 0xFF, 0xFFFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"C1k35s", Pack_C1k35s, Unpack_C1k35s, "HID Corporate 1000 35-bit std", {1, 1, 0, 0, 1, 0xFFF, 0xFFFFF, 0, 0}}, // imported from old pack/unpack
{"C15001", Pack_C15001, Unpack_C15001, "HID KeyScan 36-bit", {1, 1, 0, 1, 1, 0xFF, 0xFFFF, 0, 0x3FF}}, // from Proxmark forums
{"S12906", Pack_S12906, Unpack_S12906, "HID Simplex 36-bit", {1, 1, 1, 0, 1, 0xFF, 0x3, 0xFFFFFF, 0}}, // from cardinfo.barkweb.com.au
{"Sie36", Pack_Sie36, Unpack_Sie36, "HID 36-bit Siemens", {1, 1, 0, 0, 1, 0x3FFFF, 0xFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"H10320", Pack_H10320, Unpack_H10320, "HID H10320 37-bit BCD", {1, 0, 0, 0, 1, 0, 99999999, 0, 0}}, // from Proxmark forums
{"H10302", Pack_H10302, Unpack_H10302, "HID H10302 37-bit huge ID", {1, 0, 0, 0, 1, 0, 0x7FFFFFFFF, 0, 0}}, // from Proxmark forums
{"H10304", Pack_H10304, Unpack_H10304, "HID H10304 37-bit", {1, 1, 0, 0, 1, 0xFFFF, 0x7FFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"P10004", Pack_P10004, Unpack_P10004, "HID P10004 37-bit PCSC", {1, 1, 0, 0, 0, 0x1FFF, 0x3FFFF, 0, 0}}, // from @bthedorff; PR #1559
{"HGen37", Pack_HGeneric37, Unpack_HGeneric37, "HID Generic 37-bit", {1, 0, 0, 0, 1, 0, 0x7FFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"MDI37", Pack_MDI37, Unpack_MDI37, "PointGuard MDI 37-bit", {1, 1, 0, 0, 1, 0xF, 0x1FFFFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"BQT38", Pack_bqt38, Unpack_bqt38, "BQT 38-bit", {1, 1, 1, 0, 1, 0xFFF, 0x3FFFF, 0x7, 0}}, // from cardinfo.barkweb.com.au
{"ISCS", Pack_iscs38, Unpack_iscs38, "ISCS 38-bit", {1, 1, 0, 1, 1, 0x3FF, 0xFFFFFF, 0, 0x7}}, // from cardinfo.barkweb.com.au
{"PW39", Pack_pw39, Unpack_pw39, "Pyramid 39-bit wiegand format", {1, 1, 0, 0, 1, 0xFFFF, 0xFFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"P10001", Pack_P10001, Unpack_P10001, "HID P10001 Honeywell 40-bit", {1, 1, 0, 0, 0, 0xFFF, 0xFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"Casi40", Pack_CasiRusco40, Unpack_CasiRusco40, "Casi-Rusco 40-bit", {1, 0, 0, 0, 0, 0, 0xFFFFFFFFFF, 0, 0}}, // from cardinfo.barkweb.com.au
{"C1k48s", Pack_C1k48s, Unpack_C1k48s, "HID Corporate 1000 48-bit std", {1, 1, 0, 0, 1, 0x003FFFFF, 0x007FFFFF, 0, 0}}, // imported from old pack/unpack
{"BC40", Pack_bc40, Unpack_bc40, "Bundy TimeClock 40-bit", {1, 1, 0, 1, 1, 0xFFF, 0xFFFFF, 0, 0x7F}}, // from
{"Avig56", Pack_Avig56, Unpack_Avig56, "Avigilon 56-bit", {1, 1, 0, 0, 1, 0xFFFFF, 0x3FFFFFFFF, 0, 0}},
{"Defcon32", Pack_Defcon32, Unpack_Defcon32, "Custom Defcon RFCTF 42 BIT format", {1, 1, 1, 0, 1, 0xFFFF, 0xFFFFF, 0xF, 0}}, // Created by (@micsen) for the CTF
{NULL, NULL, NULL, NULL, {0, 0, 0, 0, 0, 0, 0, 0, 0}} // Must null terminate array
};
void HIDListFormats(void) {

View file

@ -36,6 +36,10 @@ typedef struct {
bool hasIssueLevel;
bool hasOEMCode;
bool hasParity;
uint32_t MaxFC; // max Facility Code
uint64_t MaxCN; // max CardNumber
uint32_t MaxIL; // max IssueLevel
uint32_t MaxOEM;// max OEM
} cardformatdescriptor_t;
// Structure for defined Wiegand card formats available for packing/unpacking

133
client/t55_chk.lua Normal file
View file

@ -0,0 +1,133 @@
local os = require("os")
local ac = require('ansicolors')
local getopt = require('getopt')
local dir = os.getenv('HOME') .. '/proxmark3/client/dictionaries/'
local dictionary_path = dir .. 'T5577date.dic'
local cyan = ac.cyan
local res = ac.reset
author = ' Author: jareckib - created 02.02.2025'
version = ' version v1.01'
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
takes about 1 minute and 50 seconds. Date from 1900 to 2100. The script may be
useful if the password is, for example, a date of birth.
]]
usage = [[
script run t55_chk [-s start_year] [-e end_year] [-d | -y]
]]
options = [[
-h Show this help message
-s Starting year (required)
-e Ending year (default: current year)
-d Search method: DDMMYYYY
-y Search method: YYYYMMDD
]]
examples = [[
script run t55_chk -s 1999 -d - start from 1999, end year is current year, method 01011999
script run t55_chk -s 1999 -y - start from 1999, end year is current year, method 19990101
script run t55_chk -s 1999 -e 2001 -y - start from 1999, end year 2001, method 19990101
script run t55_chk -s 1999 -e 2001 -d - start from 1999, end year 2001, method 01011999
]]
local function help()
print(ac.green..author..res)
print(version)
print(desc)
print(cyan..' Usage:'..res)
print(usage)
print(cyan..' Options:'..res)
print(options)
print(cyan..' Examples:'..res)
print(examples)
end
local days_in_month = {
[1] = 31, [2] = 28, [3] = 31, [4] = 30, [5] = 31, [6] = 30,
[7] = 31, [8] = 31, [9] = 30, [10] = 31, [11] = 30, [12] = 31
}
local function generate_dictionary(start_year, end_year, mode)
local file = io.open(dictionary_path, "w")
if not file then
print(ac.yellow .. ' ERROR: ' .. ac.reset .. 'Cannot create T5577date.dic')
return false
end
for year = start_year, end_year do
for month = 1, 12 do
local days_in_current_month = days_in_month[month]
if month == 2 and ((year % 4 == 0 and year % 100 ~= 0) or (year % 400 == 0)) then
days_in_current_month = 29
end
for day = 1, days_in_current_month do
local month_str = string.format("%02d", month)
local day_str = string.format("%02d", day)
local year_str = tostring(year)
local entry = (mode == "1") and (year_str .. month_str .. day_str) or (day_str .. month_str .. year_str)
file:write(entry .. "\n")
end
end
end
file:close()
return true
end
local function oops(err)
core.console('clear')
print( string.rep('--',39) )
print( string.rep('--',39) )
print(ac.red..' ERROR:'..res.. err)
print( string.rep('--',39) )
print( string.rep('--',39) )
return nil, err
end
local function main(args)
if #args == 0 then return help() end
local start_year, end_year, mode = nil, nil, nil
local current_year = tonumber(os.date("%Y"))
for o, a in getopt.getopt(args, 'hs:e:dy') do
if o == 'h' then return help() end
if o == 's' then
start_year = tonumber(a)
if not start_year then return oops('Invalid start year') end
end
if o == 'e' then
end_year = tonumber(a)
if not end_year then return oops('Invalid end year (-e)') end
end
if o == 'd' then mode = "d" end
if o == 'y' then mode = "y" end
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')
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')
end
if end_year < start_year then return oops('End year cannot be earlier than start year') end
if not mode then return oops('You must select searching method'..cyan..' -d'..res.. ' or '..cyan.. '-y'..res) end
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)
else
return oops('Problem saving the file')
end
end
main(args)

View file

@ -29,6 +29,7 @@ Always use the latest repository commits from *master* branch. There are always
- [Qt Session management error](#qt-session-management-error)
- [found architecture 'x86\_64' required architecture 'arm64' error](#found-architecture-x86_64-required-architecture-arm64-error)
- [wrong permissions on runtime directory /run/user/1000](#wrong-permissions-on-runtime-directory-runuser1000)
- [proxspace `file not found or locked` on Windows 11](#proxspace-file-not-found-or-locked-on-windows-11)
## `pm3` or `pm3-flash*` doesn't see my Proxmark
@ -360,4 +361,33 @@ export XDG_RUNTIME_DIR=/run/user/1000
or
export XDG_RUNTIME_DIR=/var/run/user/1000
```
```
## proxspace 'file not found or locked' on Windows 11
^[Top](#top)
if you receive an error "file not found or locked" for any operation that needs to write a file.
The cause is that Windows locks down many folders as 'read only', and you can't easily change this setting.
How to fix (use this at your own risk):
```
Open your Windows Settings Control Panel
Then select "Privacy and security"
Then select "Windows Security"
Then select "Virus & threat protection"
Then scroll down and select "Manage ransomware protection"
Then select "Allow an app through Controlled folder access"
Answer "Yes" to allow this app to make changes to your system
Then select "Add an allowed app" to select the proper "proxmark3.exe" in the client folder.
Potentially also do:
Select "Recently blocked apps"
Then select the most recent "proxmark3.exe" by pressing the "+" next to it.
Then select "Close".
Side note:
You may also be able to choose "Browse all apps" and find your specific proxmark3.exe in the client folder but
be sure to choose the proper location and specific file in case you have more than one stored on your PC somewhere.
```

View file

@ -6,7 +6,7 @@ RUN zypper --non-interactive install --no-recommends shadow sudo git patterns-de
RUN zypper addrepo https://download.opensuse.org/repositories/home:wkazubski/15.6/home:wkazubski.repo && \
zypper --gpg-auto-import-keys refresh && \
zypper --non-interactive install cross-arm-none-eabi-gcc13 cross-arm-none-eabi-newlib
zypper --non-interactive install cross-arm-none-eabi-gcc14 cross-arm-none-eabi-newlib
RUN zypper --non-interactive install cmake python3 python3-pip && \
python3 -m pip install ansicolors sslcrypto