mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-31 12:00:10 -07:00
added nexwatch demod & iceman lua
added nexwatch demod (also added to lf search) added iceman's lua script adjustments
This commit is contained in:
parent
322f7eb111
commit
411105e036
9 changed files with 431 additions and 227 deletions
|
@ -1547,11 +1547,49 @@ int CmdIndalaDecode(const char *Cmd)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CmdPSKNexWatch(const char *Cmd)
|
||||||
|
{
|
||||||
|
if (!PSKDemod("", false)) return 0;
|
||||||
|
uint8_t preamble[28] = {0,0,0,0,0,1,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||||
|
size_t startIdx = 0, size = DemodBufferLen;
|
||||||
|
bool invert = false;
|
||||||
|
if (!preambleSearch(DemodBuffer, preamble, sizeof(preamble), &size, &startIdx)){
|
||||||
|
// if didn't find preamble try again inverting
|
||||||
|
if (!PSKDemod("1", false)) return 0;
|
||||||
|
size = DemodBufferLen;
|
||||||
|
if (!preambleSearch(DemodBuffer, preamble, sizeof(preamble), &size, &startIdx)) return 0;
|
||||||
|
invert = true;
|
||||||
|
}
|
||||||
|
if (size != 128) return 0;
|
||||||
|
setDemodBuf(DemodBuffer, size, startIdx+4);
|
||||||
|
startIdx = 8+32; //4 = extra i added, 8 = preamble, 32 = reserved bits (always 0)
|
||||||
|
//get ID
|
||||||
|
uint32_t ID = 0;
|
||||||
|
for (uint8_t wordIdx=0; wordIdx<4; wordIdx++){
|
||||||
|
for (uint8_t idx=0; idx<8; idx++){
|
||||||
|
ID = (ID << 1) | DemodBuffer[startIdx+wordIdx+(idx*4)];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//parity check (TBD)
|
||||||
|
|
||||||
|
//checksum check (TBD)
|
||||||
|
|
||||||
|
//output
|
||||||
|
PrintAndLog("NexWatch ID: %d", ID);
|
||||||
|
if (invert){
|
||||||
|
PrintAndLog("Had to Invert - probably NexKey");
|
||||||
|
for (uint8_t idx=0; idx<size; idx++)
|
||||||
|
DemodBuffer[idx] ^= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
CmdPrintDemodBuff("x");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// by marshmellow
|
// by marshmellow
|
||||||
// takes 3 arguments - clock, invert, maxErr as integers
|
// takes 3 arguments - clock, invert, maxErr as integers
|
||||||
// attempts to demodulate nrz only
|
// attempts to demodulate nrz only
|
||||||
// prints binary found and saves in demodbuffer for further commands
|
// prints binary found and saves in demodbuffer for further commands
|
||||||
|
|
||||||
int NRZrawDemod(const char *Cmd, bool verbose)
|
int NRZrawDemod(const char *Cmd, bool verbose)
|
||||||
{
|
{
|
||||||
int invert=0;
|
int invert=0;
|
||||||
|
@ -2146,6 +2184,7 @@ static command_t CommandTable[] =
|
||||||
{"plot", CmdPlot, 1, "Show graph window (hit 'h' in window for keystroke help)"},
|
{"plot", CmdPlot, 1, "Show graph window (hit 'h' in window for keystroke help)"},
|
||||||
{"printdemodbuffer",CmdPrintDemodBuff, 1, "[x] -- print the data in the DemodBuffer - 'x' for hex output"},
|
{"printdemodbuffer",CmdPrintDemodBuff, 1, "[x] -- print the data in the DemodBuffer - 'x' for hex output"},
|
||||||
{"pskindalademod", CmdIndalaDecode, 1, "[clock] [invert<0|1>] -- Demodulate an indala tag (PSK1) from GraphBuffer (args optional)"},
|
{"pskindalademod", CmdIndalaDecode, 1, "[clock] [invert<0|1>] -- Demodulate an indala tag (PSK1) from GraphBuffer (args optional)"},
|
||||||
|
{"psknexwatchdemod",CmdPSKNexWatch, 1, "Demodulate a NexWatch tag (nexkey, quadrakey) (PSK1) from GraphBuffer"},
|
||||||
{"rawdemod", CmdRawDemod, 1, "[modulation] ... <options> -see help (h option) -- Demodulate the data in the GraphBuffer and output binary"},
|
{"rawdemod", CmdRawDemod, 1, "[modulation] ... <options> -see help (h option) -- Demodulate the data in the GraphBuffer and output binary"},
|
||||||
{"samples", CmdSamples, 0, "[512 - 40000] -- Get raw samples for graph window (GraphBuffer)"},
|
{"samples", CmdSamples, 0, "[512 - 40000] -- Get raw samples for graph window (GraphBuffer)"},
|
||||||
{"save", CmdSave, 1, "<filename> -- Save trace (from graph window)"},
|
{"save", CmdSave, 1, "<filename> -- Save trace (from graph window)"},
|
||||||
|
|
|
@ -1077,6 +1077,13 @@ int CmdLFfind(const char *Cmd)
|
||||||
PrintAndLog("\nValid EM4x50 ID Found!");
|
PrintAndLog("\nValid EM4x50 ID Found!");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ans=CmdPSKNexWatch("");
|
||||||
|
if (ans>0) {
|
||||||
|
PrintAndLog("\nValid NexWatch ID Found!");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
PrintAndLog("\nNo Known Tags Found!\n");
|
PrintAndLog("\nNo Known Tags Found!\n");
|
||||||
if (testRaw=='u' || testRaw=='U'){
|
if (testRaw=='u' || testRaw=='U'){
|
||||||
//test unknown tag formats (raw mode)
|
//test unknown tag formats (raw mode)
|
||||||
|
|
|
@ -370,28 +370,28 @@ bool tryDetectModulation(){
|
||||||
if (clk>0) {
|
if (clk>0) {
|
||||||
sprintf(cmdStr,"%d", clk/2);
|
sprintf(cmdStr,"%d", clk/2);
|
||||||
CmdLtrim(cmdStr);
|
CmdLtrim(cmdStr);
|
||||||
if ( ASKDemod("0 0 1", FALSE, FALSE, 1) && test(DEMOD_ASK, &tests[hits].offset, &bitRate)) {
|
if ( ASKDemod("0 0 0", FALSE, FALSE, 1) && test(DEMOD_ASK, &tests[hits].offset, &bitRate)) {
|
||||||
tests[hits].modulation = DEMOD_ASK;
|
tests[hits].modulation = DEMOD_ASK;
|
||||||
tests[hits].bitrate = bitRate;
|
tests[hits].bitrate = bitRate;
|
||||||
tests[hits].inverted = FALSE;
|
tests[hits].inverted = FALSE;
|
||||||
tests[hits].block0 = PackBits(tests[hits].offset, 32, DemodBuffer);
|
tests[hits].block0 = PackBits(tests[hits].offset, 32, DemodBuffer);
|
||||||
++hits;
|
++hits;
|
||||||
}
|
}
|
||||||
if ( ASKDemod("0 1 1", FALSE, FALSE, 1) && test(DEMOD_ASK, &tests[hits].offset, &bitRate)) {
|
if ( ASKDemod("0 1 0", FALSE, FALSE, 1) && test(DEMOD_ASK, &tests[hits].offset, &bitRate)) {
|
||||||
tests[hits].modulation = DEMOD_ASK;
|
tests[hits].modulation = DEMOD_ASK;
|
||||||
tests[hits].bitrate = bitRate;
|
tests[hits].bitrate = bitRate;
|
||||||
tests[hits].inverted = TRUE;
|
tests[hits].inverted = TRUE;
|
||||||
tests[hits].block0 = PackBits(tests[hits].offset, 32, DemodBuffer);
|
tests[hits].block0 = PackBits(tests[hits].offset, 32, DemodBuffer);
|
||||||
++hits;
|
++hits;
|
||||||
}
|
}
|
||||||
if ( ASKbiphaseDemod("0 0 0 1", FALSE) && test(DEMOD_BI, &tests[hits].offset, &bitRate) ) {
|
if ( ASKbiphaseDemod("0 0 0 0", FALSE) && test(DEMOD_BI, &tests[hits].offset, &bitRate) ) {
|
||||||
tests[hits].modulation = DEMOD_BI;
|
tests[hits].modulation = DEMOD_BI;
|
||||||
tests[hits].bitrate = bitRate;
|
tests[hits].bitrate = bitRate;
|
||||||
tests[hits].inverted = FALSE;
|
tests[hits].inverted = FALSE;
|
||||||
tests[hits].block0 = PackBits(tests[hits].offset, 32, DemodBuffer);
|
tests[hits].block0 = PackBits(tests[hits].offset, 32, DemodBuffer);
|
||||||
++hits;
|
++hits;
|
||||||
}
|
}
|
||||||
if ( ASKbiphaseDemod("0 0 1 1", FALSE) && test(DEMOD_BIa, &tests[hits].offset, &bitRate) ) {
|
if ( ASKbiphaseDemod("0 0 1 0", FALSE) && test(DEMOD_BIa, &tests[hits].offset, &bitRate) ) {
|
||||||
tests[hits].modulation = DEMOD_BIa;
|
tests[hits].modulation = DEMOD_BIa;
|
||||||
tests[hits].bitrate = bitRate;
|
tests[hits].bitrate = bitRate;
|
||||||
tests[hits].inverted = TRUE;
|
tests[hits].inverted = TRUE;
|
||||||
|
|
|
@ -138,6 +138,8 @@ local _commands = {
|
||||||
CMD_MIFAREUC_AUTH1 = 0x0724,
|
CMD_MIFAREUC_AUTH1 = 0x0724,
|
||||||
CMD_MIFAREUC_AUTH2 = 0x0725,
|
CMD_MIFAREUC_AUTH2 = 0x0725,
|
||||||
CMD_MIFAREUC_READCARD = 0x0726,
|
CMD_MIFAREUC_READCARD = 0x0726,
|
||||||
|
CMD_MIFAREUC_SETPWD = 0x0727,
|
||||||
|
CMD_MIFAREU_SETUID = 0x0728,
|
||||||
|
|
||||||
--// mifare desfire
|
--// mifare desfire
|
||||||
CMD_MIFARE_DESFIRE_READBL = 0x0728,
|
CMD_MIFARE_DESFIRE_READBL = 0x0728,
|
||||||
|
@ -153,10 +155,10 @@ local _commands = {
|
||||||
|
|
||||||
|
|
||||||
local _reverse_lookup,k,v = {}
|
local _reverse_lookup,k,v = {}
|
||||||
for k, v in pairs(_commands) do
|
for k, v in pairs(_commands) do
|
||||||
_reverse_lookup[v] = k
|
_reverse_lookup[v] = k
|
||||||
end
|
end
|
||||||
_commands.tostring = function(command)
|
_commands.tostring = function(command)
|
||||||
if(type(command) == 'number') then
|
if(type(command) == 'number') then
|
||||||
return ("%s (%d)"):format(_reverse_lookup[command]or "ERROR UNDEFINED!", command)
|
return ("%s (%d)"):format(_reverse_lookup[command]or "ERROR UNDEFINED!", command)
|
||||||
end
|
end
|
||||||
|
@ -217,7 +219,6 @@ function Command:getBytes()
|
||||||
local data = self.data
|
local data = self.data
|
||||||
local cmd = self.cmd
|
local cmd = self.cmd
|
||||||
local arg1, arg2, arg3 = self.arg1, self.arg2, self.arg3
|
local arg1, arg2, arg3 = self.arg1, self.arg2, self.arg3
|
||||||
|
return bin.pack("LLLLH",cmd, arg1, arg2, arg3, data);
|
||||||
return bin.pack("LLLLH",cmd, arg1, arg2, arg3,data);
|
|
||||||
end
|
end
|
||||||
return _commands
|
return _commands
|
||||||
|
|
|
@ -1,196 +1,328 @@
|
||||||
local _names = {
|
local _names = {
|
||||||
--[[
|
--[[ decimal, hexadecimal, ccc, elements, group, name
|
||||||
--]]
|
--]]
|
||||||
["0000"]="WHIRLWIND",
|
{"0", "0000", "0030", "air", "regular", "Whirlwind"},
|
||||||
["0100"]="SONIC BOOM",
|
--{"0", "0000", "0030", "air", "regular", "Elite Whirlwind"},
|
||||||
["0200"]="WARNADO",
|
--{"0", "0000", "0030", "air", "regular", "Polar Whirlwind"},
|
||||||
["0300"]="LIGHTNINGROD",
|
{"1", "0100", "0030", "air", "regular", "Sonic Boom"},
|
||||||
["0400"]="BASH",
|
{"2", "0200", "0030", "air", "regular", "Warnado"},
|
||||||
["0500"]="TERRAFIN",
|
{"3", "0300", "0030", "air", "regular", "Lightning Rod"},
|
||||||
["0600"]="DINORANG" ,
|
{"4", "0400", "0030", "earth", "regular", "Bash"},
|
||||||
["0700"]="LIGHTCORE PRISM BREAK",
|
--{"4", "0400", "0030", "earth", "regular", "Birthday Bash"},
|
||||||
["0800"]="SUNBURN",
|
{"5", "0500", "0030", "earth", "regular", "Terrafin"},
|
||||||
["0900"]="LIGHTCORE ERUPTOR",
|
--{"5", "0500", "0030", "earth", "regular", "Elite Terrafin"},
|
||||||
["0A00"]="IGNITOR",
|
{"6", "0600", "0030", "earth", "regular", "Dino Rang"},
|
||||||
["0B00"]="FLAMESLINGER",
|
{"7", "0700", "0030", "earth", "regular", "Prism Break"}, --lightcore
|
||||||
["0C00"]="ZAP",
|
{"8", "0800", "0030", "fire", "regular", "Sunburn"},
|
||||||
["0D00"]="WHAM SHELL",
|
{"9", "0900", "0030", "fire", "regular", "Eruptor"}, --lightcore
|
||||||
["0E00"]="GILL GRUNT",
|
--{"9", "0900", "0030", "fire", "regular", "Elite Eruptor"},
|
||||||
["0F00"]="SLAMBAM",
|
--{"9", "0900", "0030", "fire", "regular", "Volcanic Eruptor"},
|
||||||
["1000"]="SPYRO",
|
{"10", "0a00", "0030", "fire", "regular", "Ignitor"},
|
||||||
["1100"]="VOODOOD",
|
{"11", "0b00", "0030", "fire", "regular", "Flameslinger"},
|
||||||
["1200"]="DOUBLE TROUBLE",
|
--{"11", "0b00", "0030", "fire", "regular", "Cupid Flameslinger"},
|
||||||
["1300"]="TRIGGER HAPPY",
|
{"12", "0c00", "0030", "water", "regular", "Zap"},
|
||||||
["1400"]="DROBOT",
|
{"13", "0d00", "0030", "water", "regular", "Wham Shell"},
|
||||||
["1500"]="DRILLSERGEANT",
|
{"14", "0e00", "0030", "water", "regular", "Gill Grunt"},
|
||||||
["1600"]="BOOMER",
|
--{"14", "0e00", "0030", "water", "regular", "Elite Gill Grunt"},
|
||||||
["1700"]="WRECKING BALL",
|
{"15", "0f00", "0030", "water", "regular", "Slam Bam"},
|
||||||
["1800"]="CAMO",
|
--{"15", "0f00", "0030", "water", "regular", "Surfer Slam Bam"},
|
||||||
["1900"]="ZOOK",
|
{"16", "1000", "0030", "magic", "regular", "Spyro"},
|
||||||
["1A00"]="STEALTH ELF",
|
{"17", "1100", "0030", "magic", "regular", "Voodood"},
|
||||||
["1B00"]="STUMP SMASH",
|
{"18", "1200", "0030", "magic", "regular", "Double Trouble"},
|
||||||
["1D00"]="HEX",
|
--{"18", "1200", "0030", "magic", "regular", "Royal Double Trouble"},
|
||||||
["1C00"]="DARK SPYRO",
|
{"19", "1300", "0030", "tech", "regular", "Trigger Happy"},
|
||||||
["1E00"]="CHOPCHOP",
|
--{"19", "1300", "0030", "tech", "regular", "Elite Trigger Happy"},
|
||||||
["1F00"]="GHOST ROASTER",
|
--{"19", "1300", "0030", "tech", "regular", "Springtime Trigger Happy"},
|
||||||
["2000"]="CYNDER",
|
{"20", "1400", "0030", "tech", "regular", "Drobot"},
|
||||||
--[[
|
{"21", "1500", "0030", "tech", "regular", "Drill Sergeant"},
|
||||||
GIANTS
|
{"22", "1600", "0030", "tech", "regular", "Boomer"},
|
||||||
--]]
|
--{"22", "1600", "0030", "tech", "regular", "Lucky Boomer"},
|
||||||
["6400"]="GIANT JET-VAC",
|
{"23", "1700", "0030", "magic", "regular", "Wrecking Ball"},
|
||||||
["6500"]="GIANT SWARM",
|
--{"23", "1700", "0030", "magic", "regular", "Buddy Wrecking Ball"},
|
||||||
["6600"]="GIANT CRUSHER",
|
{"24", "1800", "0030", "life", "regular", "Camo"},
|
||||||
["6700"]="GIANT FLASHWING",
|
{"25", "1900", "0030", "life", "regular", "Zook"},
|
||||||
["6800"]="GIANT HOTHEAD",
|
{"26", "1a00", "0030", "life", "regular", "Stealth Elf"},
|
||||||
["6900"]="GIANT HOTDOG",
|
--{"26", "1a00", "0030", "life", "regular", "Elite Stealth Elf"},
|
||||||
["6A00"]="GIANT CHILL",
|
--{"26", "1a00", "0030", "life", "regular", "Dark Stealth Elf"},
|
||||||
["6B00"]="GIANT THUMPBACK",
|
{"27", "1b00", "0030", "life", "regular", "Stump Smash"},
|
||||||
["6C00"]="GIANT POPFIZZ",
|
--{"27", "1b00", "0030", "life", "regular", "Autumn Stump Smash"},
|
||||||
["6D00"]="GIANT NINJINI",
|
{"28", "1c00", "0030", "magic", "regular", "Dark Spyro"},
|
||||||
["6E00"]="GIANT BOUNCER",
|
--{"28", "1c00", "0030", "magic", "regular", "Elite Spyro"},
|
||||||
["6F00"]="GIANT SPROCKET",
|
{"29", "1d00", "0030", "undead", "regular", "Hex"},
|
||||||
["7000"]="GIANT TREE REX",
|
--{"29", "1d00", "0030", "undead", "regular", "Hallows' Eve Hex"},
|
||||||
["7100"]="LIGHTCORE SHROOMBOOM",
|
{"30", "1e00", "0030", "undead", "regular", "Chop Chop"},
|
||||||
["7200"]="GIANT EYEBROAWL",
|
--{"30", "1e00", "0030", "undead", "regular", "Elite Chop Chop"},
|
||||||
["7300"]="GIANT FRIGHTRIDER",
|
--{"30", "1e00", "0030", "undead", "regular", "Grill Master Chop Chop"},
|
||||||
|
{"31", "1f00", "0030", "undead", "regular", "Ghost Roaster"},
|
||||||
|
{"32", "2000", "0030", "undead", "regular", "Cynder"},
|
||||||
|
--{"32", "2000", "0030", "undead", "regular", "Skeletal Cynder"},
|
||||||
|
|
||||||
--[[
|
{"100", "6400", "0030", "air", "giant", "Jet Vac"},
|
||||||
ITEM
|
{"101", "6500", "0030", "air", "giant", "Swarm"},
|
||||||
--]]
|
{"102", "6600", "0030", "earth", "giant", "Crusher"},
|
||||||
["C800"]="ANVIL",
|
{"103", "6700", "0030", "earth", "giant", "Flashwing"},
|
||||||
["C900"]="SECRET STASH",
|
--{"103", "6700", "0030", "earth", "giant", "Jade Flashwing"},
|
||||||
["CA00"]="REGENERATION",
|
{"104", "6800", "0030", "fire", "giant", "Hot Head"},
|
||||||
["CD00"]="SHIELD",
|
{"105", "6900", "0030", "fire", "giant", "Hot Dog"},
|
||||||
["CB00"]="CROSSED SWORDS",
|
--{"105", "6900", "0030", "fire", "giant", "Molten Hot Dog"},
|
||||||
["CC00"]="HOURGLASS",
|
{"106", "6a00", "0030", "water", "giant", "Chill"},
|
||||||
["CE00"]="SPEED BOOTS",
|
{"107", "6b00", "0030", "water", "giant", "Thumpback"},
|
||||||
["CF00"]="SPARX",
|
--{"107", "6b00", "0030", "water", "giant", "Admiral Thumpback"},
|
||||||
["D000"]="CANNON",
|
{"108", "6c00", "0030", "magic", "giant", "Pop Fizz"},
|
||||||
["D100"]="SCORPIONSTRIKER",
|
--{"108", "6c00", "0030", "magic", "giant", "Hoppity Pop Fizz"},
|
||||||
|
--{"108", "6c00", "0030", "magic", "giant", "Love Potion Pop Fizz"},
|
||||||
|
--{"108", "6c00", "0030", "magic", "giant", "Punch Pop Fizz"},
|
||||||
|
{"109", "6d00", "0030", "magic", "giant", "Nin Jini"},
|
||||||
|
{"110", "6e00", "0030", "tech", "giant", "Bouncer"},
|
||||||
|
{"111", "6f00", "0030", "tech", "giant", "Sprocket"},
|
||||||
|
{"112", "7000", "0030", "life", "giant", "Tree Rex"},
|
||||||
|
--{"112", "7000", "0030", "life", "giant", "Gnarly Tree Rex"},
|
||||||
|
{"113", "7100", "0030", "life", "giant", "Shroomboom"}, --lightcore
|
||||||
|
{"114", "7200", "0030", "undead", "giant", "Eye Broawl"},
|
||||||
|
{"115", "7300", "0030", "undead", "giant", "Fright Rider"},
|
||||||
|
|
||||||
--[[
|
{"200", "c800", "0030", "", "item", "Anvil Rain"},
|
||||||
ITEM TRAPS
|
{"201", "c900", "0030", "", "item", "Platinum Treasure Chest"},
|
||||||
--]]
|
{"202", "ca00", "0030", "", "item", "Healing Elixer"},
|
||||||
["D200"]="MAGIC TRAP",
|
{"203", "cb00", "0030", "", "item", "Ghost Pirate Swords"},
|
||||||
["D300"]="WATER TRAP",
|
{"204", "cc00", "0030", "", "item", "Time Twist Hourglass"},
|
||||||
["D400"]="AIR TRAP",
|
{"205", "cd00", "0030", "", "item", "Sky Iron Shield"},
|
||||||
["D500"]="UNDEAD TRAP",
|
{"206", "ce00", "0030", "", "item", "Winged Boots"},
|
||||||
["D600"]="TECH TRAP",
|
{"207", "cf00", "0030", "", "item", "Sparx"},
|
||||||
["D700"]="FIRE TRAP",
|
{"208", "d000", "0030", "", "item", "Cannon"},
|
||||||
["D800"]="EARTH TRAP",
|
{"209", "d100", "0030", "", "item", "Scorpion Striker"},
|
||||||
["D900"]="LIFE TRAP",
|
|
||||||
["DA00"]="DARK TRAP",
|
|
||||||
["DB00"]="LIGHT TRAP",
|
|
||||||
["DC00"]="KAOS TRAP",
|
|
||||||
|
|
||||||
--[[
|
{"210", "d200", "0230", "magic", "trap", "Biter's Bane"},
|
||||||
ITEM
|
{"210", "d200", "0830", "magic", "trap", "Sorcerous Skull"},
|
||||||
--]]
|
-- legendary Sorcerous Skull?
|
||||||
["E600"]="HAND OF FATE",
|
{"210", "d200", "0b30", "magic", "trap", "Axe Of Illusion"},
|
||||||
["E700"]="PIGGYBANK",
|
{"210", "d200", "0e30", "magic", "trap", "Arcane Hourglass"},
|
||||||
["E800"]="ROCKET RAM",
|
{"210", "d200", "1230", "magic", "trap", "Spell Slapper"},
|
||||||
["E900"]="TIKI SPEAKY",
|
{"210", "d200", "1430", "magic", "trap", "Rune Rocket"},
|
||||||
|
|
||||||
|
{"211", "d300", "0130", "water", "trap", "Tidal Tiki"},
|
||||||
|
{"211", "d300", "0230", "water", "trap", "Wet Walter"},
|
||||||
|
{"211", "d300", "0630", "water", "trap", "Flood Flask"},
|
||||||
|
-- legendary flood flask?
|
||||||
|
{"211", "d300", "0730", "water", "trap", "Soaking Staff"},
|
||||||
|
{"211", "d300", "0b30", "water", "trap", "Aqua Axe"},
|
||||||
|
{"211", "d300", "1630", "water", "trap", "Frost Helm"},
|
||||||
|
|
||||||
|
{"212", "d400", "0330", "air", "trap", "Breezy Bird"},
|
||||||
|
{"212", "d400", "0630", "air", "trap", "Drafty Decanter"},
|
||||||
|
{"212", "d400", "0d30", "air", "trap", "Tempest Timer"},
|
||||||
|
{"212", "d400", "1030", "air", "trap", "Cloudy Cobra"},
|
||||||
|
{"212", "d400", "1130", "air", "trap", "Storm Warning"},
|
||||||
|
{"212", "d400", "1830", "air", "trap", "Cycone Saber"},
|
||||||
|
|
||||||
|
{"213", "d500", "0430", "undead", "trap", "Spirit Sphere"},
|
||||||
|
{"213", "d500", "0830", "undead", "trap", "Spectral Skull"},
|
||||||
|
{"213", "d500", "0b30", "undead", "trap", "Haunted Hatchet"},
|
||||||
|
{"213", "d500", "0c30", "undead", "trap", "Grim Gripper"},
|
||||||
|
{"213", "d500", "1030", "undead", "trap", "Spooky Snake"},
|
||||||
|
{"213", "d500", "1730", "undead", "trap", "Dream Piercer"},
|
||||||
|
|
||||||
|
{"214", "d600", "0030", "tech", "trap", "tech Totem"},
|
||||||
|
{"214", "d600", "0730", "tech", "trap", "Automatic Angel"},
|
||||||
|
{"214", "d600", "0930", "tech", "trap", "Factory Flower"},
|
||||||
|
{"214", "d600", "0c30", "tech", "trap", "Grabbing Gadget"},
|
||||||
|
{"214", "d600", "1630", "tech", "trap", "Makers Mana"},
|
||||||
|
{"214", "d600", "1a30", "tech", "trap", "Topsy techy"},
|
||||||
|
|
||||||
|
{"215", "d700", "0530", "fire", "trap", "Eternal Flame"},
|
||||||
|
{"215", "d700", "0930", "fire", "trap", "fire Flower"},
|
||||||
|
{"215", "d700", "1130", "fire", "trap", "Scorching Stopper"},
|
||||||
|
{"215", "d700", "1230", "fire", "trap", "Searing Spinner"},
|
||||||
|
{"215", "d700", "1730", "fire", "trap", "Spark Spear"},
|
||||||
|
{"215", "d700", "1b30", "fire", "trap", "Blazing Belch"},
|
||||||
|
|
||||||
|
{"216", "d800", "0030", "earth", "trap", "Banded Boulder"},
|
||||||
|
{"216", "d800", "0330", "earth", "trap", "Rock Hawk"},
|
||||||
|
{"216", "d800", "0a30", "earth", "trap", "Slag Hammer"},
|
||||||
|
{"216", "d800", "0e30", "earth", "trap", "Dust Of Time"},
|
||||||
|
{"216", "d800", "1330", "earth", "trap", "Spinning Sandstorm"},
|
||||||
|
{"216", "d800", "1a30", "earth", "trap", "Rubble Trouble"},
|
||||||
|
|
||||||
|
{"217", "d900", "0330", "life", "trap", "Oak Eagle"},
|
||||||
|
{"217", "d900", "0530", "life", "trap", "Emerald Energy"},
|
||||||
|
{"217", "d900", "0a30", "life", "trap", "Weed Whacker"},
|
||||||
|
{"217", "d900", "1030", "life", "trap", "Seed Serpent"},
|
||||||
|
{"217", "d900", "1830", "life", "trap", "Jade Blade"},
|
||||||
|
{"217", "d900", "1b30", "life", "trap", "Shrub Shrieker"},
|
||||||
|
|
||||||
|
{"218", "da00", "0030", "dark", "trap", "dark Dagger"},
|
||||||
|
{"218", "da00", "1430", "dark", "trap", "Shadow Spider"},
|
||||||
|
{"218", "da00", "1a30", "dark", "trap", "Ghastly Grimace"},
|
||||||
|
|
||||||
|
{"219", "db00", "0030", "light", "trap", "Shining Ship"},
|
||||||
|
{"219", "db00", "0f30", "light", "trap", "Heavenly Hawk"},
|
||||||
|
{"219", "db00", "1b30", "light", "trap", "Beam Scream"},
|
||||||
|
|
||||||
|
{"220", "dc00", "3030", "kaos", "trap", "Kaos trap!"},
|
||||||
|
--{"220", "dc00", "3130", "kaos", "trap", "Ultimate Kaos trap!"}, ?
|
||||||
|
|
||||||
|
|
||||||
--[[
|
{"230", "e600", "0030", "none", "item", "Hand Of Fate"},
|
||||||
EXPANSION
|
{"231", "e700", "0030", "none", "item", "Piggy Bank"},
|
||||||
--]]
|
{"232", "e800", "0030", "none", "item", "Rocket Ram"},
|
||||||
["012C"]="DRAGONS PEAK",
|
{"233", "e900", "0030", "none", "item", "Tiki Speaky"},
|
||||||
["012D"]="EMPIRE OF ICE",
|
|
||||||
["012E"]="PIRATE SEAS",
|
{"300", "2c01", "0030", "none", "location", "Dragons Peak"},
|
||||||
["012F"]="DARKLIGHT CRYPT",
|
{"301", "2d01", "0030", "none", "location", "Empire Of Ice"},
|
||||||
["0130"]="VOLCANIC VAULT",
|
{"302", "2e01", "0030", "none", "location", "Pirate Seas"},
|
||||||
["0131"]="MIRROR OF MYSTERY",
|
{"303", "2f01", "0030", "none", "location", "darklight Crypt"},
|
||||||
["0132"]="NIGHTMARE EXPRESS",
|
{"304", "3001", "0030", "none", "location", "Volcanic Vault"},
|
||||||
["0133"]="SUNSCRAPER SPIRE",
|
{"305", "3101", "0030", "none", "location", "Mirror Of Mystery"},
|
||||||
["0134"]="MIDNIGHT MUSEUM",
|
{"306", "3201", "0030", "none", "location", "Nightmare Express"},
|
||||||
|
{"307", "3301", "0030", "none", "location", "Sunscraper Spire"},
|
||||||
|
{"308", "3401", "0030", "none", "location", "Midnight Museum"},
|
||||||
|
|
||||||
|
{"404", "9401", "0030", "earth", "legendary","Bash"},
|
||||||
|
{"416", "a001", "0030", "magic", "legendary", "Spyro"},
|
||||||
|
--{"", "", "0030", "magic", "legendary", "Deja Vu"},
|
||||||
|
{"419", "a301", "0030", "tech", "legendary", "Trigger Happy"},
|
||||||
|
--{"", "", "0030", "tech", "legendary", "bouncer"},
|
||||||
|
--{"", "", "0030", "tech", "legendary", "jawbreaker"},
|
||||||
|
{"430", "ae01", "0030", "undead", "legendary", "Chop Chop"},
|
||||||
|
--{"", "", "0030", "undead", "legendary", "grim creeper"},
|
||||||
|
--{"", "", "0030", "undead", "legendary", "night shift"},
|
||||||
|
|
||||||
--[[
|
--{"", "", "0030", "air", "legendary", "blades"},
|
||||||
LEGENDARY
|
--{"", "", "0030", "air", "legendary", "jet vac"},
|
||||||
--]]
|
--{"", "", "0030", "air", "legendary", "Free Ranger"},
|
||||||
["0194"]="LEGENDARY BASH",
|
--{"", "", "0030", "life", "legendary", "stealth elf"},
|
||||||
["01A0"]="LEGENDARY SPYRO",
|
--{"", "", "0030", "life", "legendary", "Bushwhack"},
|
||||||
["01A3"]="LEGENDARY TRIGGER HAPPY",
|
--{"", "", "0030", "fire", "legendary", "ignitor"},
|
||||||
["01AE"]="LEGENDARY CHOPCHOP",
|
--{"", "", "0030", "water", "legendary", "slam bam"},
|
||||||
|
--{"", "", "0030", "water", "legendary", "chill"},
|
||||||
|
|
||||||
|
--{"", "", "0030", "", "legendary", "zoo lou"},
|
||||||
|
|
||||||
--[[
|
{"450", "c201", "0030", "air", "trapmaster", "Gusto"},
|
||||||
TRAPTEAM
|
--{"450", "c201", "0234", "air", "trapmaster", "Special Gusto"},
|
||||||
--]]
|
{"451", "c301", "0030", "air", "trapmaster", "Thunderbolt"},
|
||||||
["01C2"]="TRAPTEAM GUSTO",
|
--{"451", "c301", "0234", "air", "trapmaster", "Special Thunderbolt"},
|
||||||
["01C3"]="TRAPTEAM THUNDERBOLT",
|
{"452", "c401", "0030", "air", "regular", "Fling Kong"},
|
||||||
["01C4"]="TRAPTEAM FLING KONG",
|
{"453", "c501", "0030", "air", "regular", "Blades"},
|
||||||
["01C5"]="TRAPTEAM BLADES",
|
{"454", "c601", "0030", "earth", "trapmaster", "Wallop"},
|
||||||
["01C6"]="TRAPTEAM WALLOP",
|
--{"454", "c601", "0234", "earth", "trapmaster", "Special Wallop"},
|
||||||
["01C7"]="TRAPTEAM HEAD RUSH",
|
{"455", "c701", "0030", "earth", "trapmaster", "Head Rush"},
|
||||||
["01C8"]="TRAPTEAM FIST BUMP",
|
{"455", "c701", "0234", "earth", "trapmaster", "Nitro Head Rush"},
|
||||||
["01C9"]="TRAPTEAM ROCKY ROLL",
|
{"456", "c801", "0030", "earth", "regular", "Fist Bump"},
|
||||||
["01CA"]="TRAPTEAM WILDFIRE",
|
{"457", "c901", "0030", "earth", "regular", "Rocky Roll"},
|
||||||
["01CB"]="TRAPTEAM KA BOOM",
|
--{"457", "c901", "0030", "earth", "regular", "Rocky Egg Roll"},
|
||||||
["01CC"]="TRAPTEAM TRAIL BLAZER",
|
{"458", "ca01", "0030", "fire", "trapmaster", "Wildfire"},
|
||||||
["01CD"]="TRAPTEAM TORCH",
|
{"458", "ca01", "0234", "fire", "trapmaster", "Dark Wildfire"},
|
||||||
["01CE"]="TRAPTEAM SNAP SHOT",
|
{"459", "cb01", "0030", "fire", "trapmaster", "Ka Boom"},
|
||||||
["01CF"]="TRAPTEAM LOB STAR",
|
--{"459", "cb01", "0234", "fire", "trapmaster", "Special Ka Boom"},
|
||||||
["01D0"]="TRAPTEAM FLIP WRECK",
|
{"460", "cc01", "0030", "fire", "regular", "Trail Blazer"},
|
||||||
["01D1"]="TRAPTEAM ECHO",
|
{"461", "cd01", "0030", "fire", "regular", "Torch"},
|
||||||
["01D2"]="TRAPTEAM BLASTERMIND",
|
{"462", "ce01", "0030", "water", "trapmaster", "Snap Shot"},
|
||||||
["01D3"]="TRAPTEAM ENIGMA",
|
{"462", "ce01", "0234", "water", "trapmaster", "Dark Snap Shot"},
|
||||||
["01D4"]="TRAPTEAM DEJA VU",
|
--, "water", "trapmaster", "Instant Snap Shot"},
|
||||||
["01D5"]="TRAPTEAM COBRA CADABRA",
|
--, "water", "trapmaster", "Merry Snap Shot"},
|
||||||
["01D6"]="TRAPTEAM JAWBREAKER",
|
{"463", "cf01", "0030", "water", "trapmaster", "Lob Star"},
|
||||||
["01D7"]="TRAPTEAM GEARSHIFT",
|
{"463", "cf01", "0234", "water", "trapmaster", "Winterfest Lob Star"},
|
||||||
["01D8"]="TRAPTEAM CHOPPER",
|
{"464", "d001", "0030", "water", "regular", "Flip Wreck"},
|
||||||
["01D9"]="TRAPTEAM TREAD HEAD",
|
{"465", "d101", "0030", "water", "regular", "Echo"},
|
||||||
["01DA"]="TRAPTEAM BUSHWHACK",
|
{"466", "d201", "0030", "magic", "trapmaster", "Blastermind"},
|
||||||
["01DB"]="TRAPTEAM TUFF LUCK",
|
--{"466", "d201", "0234", "magic", "trapmaster", "Special Blastermind"},
|
||||||
["01DC"]="TRAPTEAM FOOD FIGHT",
|
{"467", "d301", "0030", "magic", "trapmaster", "Enigma"},
|
||||||
["01DD"]="TRAPTEAM HIGH FIVE",
|
--{"467", "d301", "0234", "magic", "trapmaster", "Special Enigma"},
|
||||||
["01DE"]="TRAPTEAM NITRO KRYPT KING",
|
{"468", "d401", "0030", "magic", "regular", "Deja Vu"},
|
||||||
["01DF"]="TRAPTEAM SHORT CUT",
|
{"469", "d501", "0030", "magic", "regular", "Cobra Cadabra"},
|
||||||
["01E0"]="TRAPTEAM BAT SPIN",
|
--{"469", "d501", "0030", "magic", "regular", "Charming Cobra Cadabra"},
|
||||||
["01E1"]="TRAPTEAM FUNNY BONE",
|
--{"469", "d501", "0030", "magic", "regular", "King Cobra Cadabra"},
|
||||||
["01E2"]="TRAPTEAM KNIGHT LIGHT",
|
{"470", "d601", "0030", "tech", "trapmaster", "Jawbreaker"},
|
||||||
["01E3"]="TRAPTEAM SPOTLIGHT",
|
--{"470", "d601", "0234", "tech", "trapmaster", "Special Jawbreaker"},
|
||||||
["01E4"]="TRAPTEAM KNIGHT MARE",
|
--{"470", "d601", "0234", "tech", "trapmaster", "Knockout Jawbreaker"},
|
||||||
["01E5"]="TRAPTEAM BLACKOUT",
|
{"471", "d701", "0030", "tech", "trapmaster", "Gearshift"},
|
||||||
|
--{"471", "d701", "0234", "tech", "trapmaster", "Special Gearshift"},
|
||||||
|
{"472", "d801", "0030", "tech", "regular", "Chopper"},
|
||||||
|
{"473", "d901", "0030", "tech", "regular", "Tread Head"},
|
||||||
|
{"474", "da01", "0030", "life", "trapmaster", "Bushwhack"},
|
||||||
|
--{"474", "da01", "0234", "life", "trapmaster", "Special Bushwhack"},
|
||||||
|
{"475", "db01", "0030", "life", "trapmaster", "Tuff Luck"},
|
||||||
|
--{"475", "db01", "0234", "life", "trapmaster", "Special Tuff Luck"},
|
||||||
|
{"476", "dc01", "0030", "life", "regular", "Food Fight"},
|
||||||
|
--{"476", "dc01", "0030", "life", "regular", "Dark Food Fight"},
|
||||||
|
--{"476", "dc01", "0030", "life", "regular", "Frosted Food Fight"},
|
||||||
|
--{"476", "dc01", "0030", "life", "regular", "Instant Food Fight"},
|
||||||
|
{"477", "dd01", "0030", "life", "regular", "High Five"},
|
||||||
|
{"478", "de01", "0030", "undead", "trapmaster", "Krypt King"},
|
||||||
|
{"478", "de01", "0234", "undead", "trapmaster", "Nitro Krypt King"},
|
||||||
|
{"479", "df01", "0030", "undead", "trapmaster", "Short Cut"},
|
||||||
|
--{"479", "df01", "0234", "undead", "trapmaster", "Special Short Cut"},
|
||||||
|
{"480", "e001", "0030", "undead", "regular", "Bat Spin"},
|
||||||
|
{"481", "e101", "0030", "undead", "regular", "Funny Bone"},
|
||||||
|
--{"481", "e101", "0030", "undead", "regular", "Fortune Funny Bone"},
|
||||||
|
{"482", "e201", "0030", "light", "trapmaster", "Knight light"},
|
||||||
|
--{"482", "e201", "0234", "light", "trapmaster", "Special Knight light"},
|
||||||
|
{"483", "e301", "0030", "light", "regular", "Spotlight"},
|
||||||
|
--{"483", "e301", "0234", "light", "regular", "Special Spotlight"},
|
||||||
|
{"484", "e401", "0030", "dark", "trapmaster", "Knight Mare"},
|
||||||
|
--{"484", "e401", "0234", "dark", "trapmaster", "Special Knight Mare"},
|
||||||
|
{"485", "e501", "0030", "dark", "regular", "Blackout"},
|
||||||
|
--{"485", "e501", "0234", "dark", "regular", "Special Blackout"},
|
||||||
|
|
||||||
--[[
|
{"502", "f601", "0030", "earth", "mini", "Bop"},
|
||||||
PET
|
{"503", "f701", "0030", "magic", "mini", "Spry"},
|
||||||
--]]
|
{"504", "f801", "0030", "undead", "mini", "Hijinx"},
|
||||||
["01F6"]="PET BOP",
|
{"505", "f901", "0030", "earth", "mini", "Terrabite"},
|
||||||
["01F7"]="PET SPRY",
|
{"506", "fa01", "0030", "air", "mini", "Breeze"},
|
||||||
["01F8"]="PET HIJINX",
|
{"507", "fb01", "0030", "fire", "mini", "Weeruptor"},
|
||||||
["01F9"]="PET TERRAFIN",
|
--{"507", "fb01", "0030", "fire", "mini", "Eggsellent Weeruptor"},
|
||||||
["01FA"]="PET BREEZE",
|
{"508", "fc01", "0030", "air", "mini", "Pet Vac"},
|
||||||
["01FB"]="PET WEERUPTOR",
|
--{"508", "fc01", "0030", "air", "mini", "Power Punch Pet Vac"},
|
||||||
["01FC"]="PET PET VAC",
|
{"509", "fd01", "0030", "fire", "mini", "Small Fry"},
|
||||||
["01FD"]="PET SMALL FRY",
|
{"510", "fe01", "0030", "tech", "mini", "Drobit"},
|
||||||
["01FE"]="PET DROBIT",
|
{"514", "0202", "0030", "water", "mini", "Gill Runt"},
|
||||||
["0202"]="PET GILL GRUNT",
|
{"519", "0702", "0030", "tech", "mini", "Trigger Snappy"},
|
||||||
["0207"]="PET TRIGGER SNAPPY",
|
{"526", "0e02", "0030", "life", "mini", "Whisper Elf"},
|
||||||
["020E"]="PET WHISPER ELF",
|
{"540", "1c02", "0030", "life", "mini", "Barkley"},
|
||||||
["021C"]="PET BARKLEY",
|
--{"540", "1c02", "0030", "life", "mini", "Gnarly Barkley"},
|
||||||
["021D"]="PET THUMPLING",
|
{"541", "1d02", "0030", "water", "mini", "Thumpling"},
|
||||||
["021E"]="PET MINI JINI",
|
{"542", "1e02", "0030", "magic", "mini", "mini Jini"},
|
||||||
["021F"]="PET EYE SMALL",
|
{"543", "1f02", "0030", "undead", "mini", "Eye Small"},
|
||||||
|
|
||||||
--[[
|
{"3000", "b80b", "0030", "air", "SWAPFORCE", "Scratch"},
|
||||||
SWAP FORCE
|
{"3001", "b90b", "0030", "air", "SWAPFORCE", "Pop Thorn"},
|
||||||
--]]
|
--{"3001", "b90b", "0030", "air", "SWAPFORCE", "Buttered Pop Thorn"},
|
||||||
["0BB8"]="SWAPFORCE SCRATCH",
|
{"3002", "ba0b", "0030", "earth", "SWAPFORCE", "Slobber Tooth"},
|
||||||
["0BB9"]="SWAPFORCE POPTHORN",
|
--{"3002", "ba0b", "0030", "earth", "SWAPFORCE", "Dark Slobber Tooth"},
|
||||||
["0BBA"]="SWAPFORCE SLOBBER TOOTH",
|
--{"3002", "ba0b", "0030", "earth", "SWAPFORCE", "Sundae Slobber Tooth"},
|
||||||
["0BBB"]="SWAPFORCE SCORP",
|
{"3003", "bb0b", "0030", "earth", "SWAPFORCE", "Scorp"},
|
||||||
["0BBC"]="SWAPFORCE HOG WILD FRYNO",
|
{"3004", "bc0b", "0138", "fire", "SWAPFORCE", "Hog Wild Fryno"},
|
||||||
["0BBD"]="SWAPFORCE SMOLDER DASH",
|
--{"3004", "bc0b", "0138", "fire", "SWAPFORCE", "Flip flop Fryno"},
|
||||||
["0BBE"]="SWAPFORCE BUMBLE BLAST",
|
{"3005", "bd0b", "0030", "fire", "SWAPFORCE", "Smolderdash"},
|
||||||
["0BBF"]="SWAPFORCE ZOO LOU",
|
{"3006", "be0b", "0030", "life", "SWAPFORCE", "Bumble Blast"},
|
||||||
["0BC0"]="SWAPFORCE DUNE BUG",
|
--{"3006", "be0b", "0030", "life", "SWAPFORCE", "Jolly Bumble Blast"},
|
||||||
["0BC1"]="SWAPFORCE STAR STRIKE",
|
{"3007", "bf0b", "0030", "life", "SWAPFORCE", "Zoo Lou"},
|
||||||
["0BC2"]="SWAPFORCE COUNTDOWN",
|
{"3008", "c00b", "0030", "magic", "SWAPFORCE", "Dune Bug"},
|
||||||
["0BC3"]="SWAPFORCE WIND UP",
|
{"3009", "c10b", "0030", "magic", "SWAPFORCE", "Star Strike"},
|
||||||
["0BC4"]="SWAPFORCE ROLLER BRAWL",
|
--{"3009", "c10b", "0030", "magic", "SWAPFORCE", "Enchanted Star Strike"},
|
||||||
["0BC5"]="SWAPFORCE GRIM CREEPER",
|
--{"3009", "c10b", "0030", "magic", "SWAPFORCE", "Mystic Star Strike"},
|
||||||
["0BC6"]="SWAPFORCE RIP TIDE",
|
{"3010", "c20b", "0030", "tech", "SWAPFORCE", "Countdown"},
|
||||||
["0BC7"]="SWAPFORCE PUNK SHOCK",
|
--{"3010", "c20b", "0030", "tech", "SWAPFORCE", "Kickoff Countdown"},
|
||||||
|
--{"3010", "c20b", "0030", "tech", "SWAPFORCE", "New Year's Countdown"},
|
||||||
|
{"3011", "c30b", "0030", "tech", "SWAPFORCE", "Wind Up"},
|
||||||
|
{"3012", "c40b", "0030", "undead", "SWAPFORCE", "Roller Brawl"},
|
||||||
|
--{"3012", "c40b", "0030", "undead", "SWAPFORCE", "Snowler Roller Brawl"},
|
||||||
|
{"3013", "c50b", "0030", "undead", "SWAPFORCE", "Grim Creeper"},
|
||||||
|
{"3014", "c60b", "0030", "water", "SWAPFORCE", "Rip Tide"},
|
||||||
|
{"3015", "c70b", "0030", "water", "SWAPFORCE", "Punk Shock"},
|
||||||
|
}
|
||||||
|
|
||||||
|
local function find( main, sub)
|
||||||
|
|
||||||
|
for k, v in pairs(_names) do
|
||||||
|
if ( v[2] == main and v[3] == sub) then
|
||||||
|
return v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
Find = find,
|
||||||
}
|
}
|
||||||
return _names
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ local function main( args)
|
||||||
|
|
||||||
-- NDEF compliant?
|
-- NDEF compliant?
|
||||||
if b3chars[1] ~= 0xE1 then
|
if b3chars[1] ~= 0xE1 then
|
||||||
return oops("This tag is not NDEF-Complian")
|
return oops("This tag is not NDEF-Compliant")
|
||||||
end
|
end
|
||||||
|
|
||||||
local ndefVersion = b3chars[2]
|
local ndefVersion = b3chars[2]
|
||||||
|
|
|
@ -3,6 +3,7 @@ local getopt = require('getopt')
|
||||||
local lib14a = require('read14a')
|
local lib14a = require('read14a')
|
||||||
local utils = require('utils')
|
local utils = require('utils')
|
||||||
local pre = require('precalc')
|
local pre = require('precalc')
|
||||||
|
local toys = require('default_toys')
|
||||||
|
|
||||||
local lsh = bit32.lshift
|
local lsh = bit32.lshift
|
||||||
local rsh = bit32.rshift
|
local rsh = bit32.rshift
|
||||||
|
@ -10,19 +11,20 @@ local bor = bit32.bor
|
||||||
local band = bit32.band
|
local band = bit32.band
|
||||||
|
|
||||||
example =[[
|
example =[[
|
||||||
script run tnp3dump
|
script run tnp3clone
|
||||||
script run tnp3dump -h
|
script run tnp3clone -h
|
||||||
script run tnp3dump -t aa00
|
script run tnp3clone -t aa00 -s 0030
|
||||||
|
|
||||||
]]
|
]]
|
||||||
author = "Iceman"
|
author = "Iceman"
|
||||||
usage = "script run tnp3clone -t <toytype>"
|
usage = "script run tnp3clone -t <toytype> -s <subtype>"
|
||||||
desc =[[
|
desc =[[
|
||||||
This script will try making a barebone clone of a tnp3 tag on to a magic generation1 card.
|
This script will try making a barebone clone of a tnp3 tag on to a magic generation1 card.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
-h : this help
|
-h : this help
|
||||||
-k <key> : toytype id, 4 hex symbols.
|
-t <data> : toytype id, 4hex symbols.
|
||||||
|
-s <data> : subtype id, 4hex symbols
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,29 +75,45 @@ end
|
||||||
|
|
||||||
local function main(args)
|
local function main(args)
|
||||||
|
|
||||||
|
print( string.rep('--',20) )
|
||||||
|
print( string.rep('--',20) )
|
||||||
|
|
||||||
local numBlocks = 64
|
local numBlocks = 64
|
||||||
local cset = 'hf mf csetbl '
|
local cset = 'hf mf csetbl '
|
||||||
|
local csetuid = 'hf mf csetuid '
|
||||||
local cget = 'hf mf cgetbl '
|
local cget = 'hf mf cgetbl '
|
||||||
local empty = '00000000000000000000000000000000'
|
local empty = '00000000000000000000000000000000'
|
||||||
local AccAndKeyB = '7F078869000000000000'
|
local AccAndKeyB = '7F078869000000000000'
|
||||||
-- Defaults to Gusto
|
-- Defaults to Gusto
|
||||||
local toytype = 'C201'
|
local toytype = 'C201'
|
||||||
|
local subtype = '0030'
|
||||||
|
local DEBUG = true
|
||||||
|
|
||||||
-- Arguments for the script
|
-- Arguments for the script
|
||||||
for o, a in getopt.getopt(args, 'ht:') do
|
for o, a in getopt.getopt(args, 'ht:s:') do
|
||||||
if o == "h" then return help() end
|
if o == "h" then return help() end
|
||||||
if o == "t" then toytype = a end
|
if o == "t" then toytype = a end
|
||||||
|
if o == "s" then subtype = a end
|
||||||
end
|
end
|
||||||
|
|
||||||
if #toytype ~= 4 then return oops('Wrong size in toytype. (4hex symbols)') end
|
if #toytype ~= 4 then return oops('Wrong size - toytype. (4hex symbols)') end
|
||||||
|
if #subtype ~= 4 then return oops('Wrong size - subtype. (4hex symbols)') end
|
||||||
|
|
||||||
|
-- look up type, find & validate types
|
||||||
|
local item = toys.Find( toytype, subtype)
|
||||||
|
if item then
|
||||||
|
print( (' Looking up input: Found %s - %s (%s)'):format(item[6],item[5], item[4]) )
|
||||||
|
else
|
||||||
|
print('Didn\'t find item type. If you are sure about it, report it in')
|
||||||
|
end
|
||||||
|
--15,16
|
||||||
|
--13-14
|
||||||
|
|
||||||
|
|
||||||
-- find tag
|
-- find tag
|
||||||
result, err = lib14a.read1443a(false)
|
result, err = lib14a.read1443a(false)
|
||||||
if not result then return oops(err) end
|
if not result then return oops(err) end
|
||||||
|
|
||||||
-- Show tag info
|
|
||||||
print((' Found tag %s'):format(result.name))
|
|
||||||
|
|
||||||
-- load keys
|
-- load keys
|
||||||
local akeys = pre.GetAll(result.uid)
|
local akeys = pre.GetAll(result.uid)
|
||||||
local keyA = akeys:sub(1, 12 )
|
local keyA = akeys:sub(1, 12 )
|
||||||
|
@ -111,11 +129,10 @@ local function main(args)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- wipe card.
|
-- wipe card.
|
||||||
local cmd = (cset..' %s 0004 08 w'):format( b0)
|
local cmd = (csetuid..'%s 0004 08 w'):format(result.uid)
|
||||||
core.console(cmd)
|
core.console(cmd)
|
||||||
|
|
||||||
|
|
||||||
local b1 = toytype..'000000000000000000000000'
|
local b1 = toytype..'00000000000000000000'..subtype
|
||||||
local calc = utils.Crc16(b0..b1)
|
local calc = utils.Crc16(b0..b1)
|
||||||
local calcEndian = bor(rsh(calc,8), lsh(band(calc, 0xff), 8))
|
local calcEndian = bor(rsh(calc,8), lsh(band(calc, 0xff), 8))
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,7 @@ local lib14a = require('read14a')
|
||||||
local utils = require('utils')
|
local utils = require('utils')
|
||||||
local md5 = require('md5')
|
local md5 = require('md5')
|
||||||
local dumplib = require('html_dumplib')
|
local dumplib = require('html_dumplib')
|
||||||
local toyNames = require('default_toys')
|
local toys = require('default_toys')
|
||||||
|
|
||||||
|
|
||||||
example =[[
|
example =[[
|
||||||
script run tnp3dump
|
script run tnp3dump
|
||||||
|
@ -129,7 +128,7 @@ local function main(args)
|
||||||
if o == "p" then usePreCalc = true end
|
if o == "p" then usePreCalc = true end
|
||||||
if o == "o" then outputTemplate = a end
|
if o == "o" then outputTemplate = a end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- validate input args.
|
-- validate input args.
|
||||||
keyA = keyA or '4b0b20107ccb'
|
keyA = keyA or '4b0b20107ccb'
|
||||||
if #(keyA) ~= 12 then
|
if #(keyA) ~= 12 then
|
||||||
|
@ -261,13 +260,16 @@ local function main(args)
|
||||||
bindata[#bindata+1] = c
|
bindata[#bindata+1] = c
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print( string.rep('--',20) )
|
||||||
|
|
||||||
|
|
||||||
local uid = block0:sub(1,8)
|
local uid = block0:sub(1,8)
|
||||||
local itemtype = block1:sub(1,4)
|
local toytype = block1:sub(1,4)
|
||||||
local cardidLsw = block1:sub(9,16)
|
local cardidLsw = block1:sub(9,16)
|
||||||
local cardidMsw = block1:sub(16,24)
|
local cardidMsw = block1:sub(16,24)
|
||||||
local cardid = block1:sub(9,24)
|
local cardid = block1:sub(9,24)
|
||||||
local traptype = block1:sub(25,28)
|
local subtype = block1:sub(25,28)
|
||||||
|
|
||||||
-- Write dump to files
|
-- Write dump to files
|
||||||
if not DEBUG then
|
if not DEBUG then
|
||||||
|
@ -277,13 +279,15 @@ local function main(args)
|
||||||
print(("Wrote a EML dump to: %s"):format(bar))
|
print(("Wrote a EML dump to: %s"):format(bar))
|
||||||
end
|
end
|
||||||
|
|
||||||
local itemtypename = toyNames[itemtype]
|
local item = toys.Find(toytype, subtype)
|
||||||
if itemtypename == nil then
|
if item then
|
||||||
itemtypename = toyNames[utils.SwapEndiannessStr(itemtype,16)]
|
local itemStr = ('%s - %s (%s)'):format(item[6],item[5], item[4])
|
||||||
|
print(' ITEM TYPE : '..itemStr )
|
||||||
|
else
|
||||||
|
print((' ITEM TYPE : 0x%s 0x%s'):format(toytype, subtype))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Show info
|
-- Show info
|
||||||
print( string.rep('--',20) )
|
|
||||||
print( (' ITEM TYPE : 0x%s - %s'):format(itemtype, itemtypename) )
|
|
||||||
print( (' Alter ego / traptype : 0x%s'):format(traptype) )
|
print( (' Alter ego / traptype : 0x%s'):format(traptype) )
|
||||||
print( (' UID : 0x%s'):format(uid) )
|
print( (' UID : 0x%s'):format(uid) )
|
||||||
print( (' CARDID : 0x%s'):format(cardid ) )
|
print( (' CARDID : 0x%s'):format(cardid ) )
|
||||||
|
|
|
@ -4,7 +4,7 @@ local bin = require('bin')
|
||||||
local lib14a = require('read14a')
|
local lib14a = require('read14a')
|
||||||
local utils = require('utils')
|
local utils = require('utils')
|
||||||
local md5 = require('md5')
|
local md5 = require('md5')
|
||||||
local toyNames = require('default_toys')
|
local toys = require('default_toys')
|
||||||
|
|
||||||
example =[[
|
example =[[
|
||||||
1. script run tnp3sim
|
1. script run tnp3sim
|
||||||
|
@ -382,18 +382,22 @@ local function main(args)
|
||||||
print( string.rep('--',20) )
|
print( string.rep('--',20) )
|
||||||
print(' Gathering info')
|
print(' Gathering info')
|
||||||
local uid = blocks[0]:sub(1,8)
|
local uid = blocks[0]:sub(1,8)
|
||||||
local itemtype = blocks[1]:sub(1,4)
|
local toytype = blocks[1]:sub(1,4)
|
||||||
local cardidLsw = blocks[1]:sub(9,16)
|
local cardidLsw = blocks[1]:sub(9,16)
|
||||||
local cardidMsw = blocks[1]:sub(17,24)
|
local cardidMsw = blocks[1]:sub(17,24)
|
||||||
|
local subtype = blocks[1]:sub(25,28)
|
||||||
|
|
||||||
local itemtypename = toyNames[itemtype]
|
|
||||||
if itemtypename == nil then
|
|
||||||
itemtypename = toyNames[utils.SwapEndiannessStr(itemtype,16)]
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Show info
|
-- Show info
|
||||||
print( string.rep('--',20) )
|
print( string.rep('--',20) )
|
||||||
print( (' ITEM TYPE : 0x%s - %s'):format(itemtype, itemtypename) )
|
|
||||||
|
local item = toys.Find( toytype, subtype)
|
||||||
|
if item then
|
||||||
|
local itemStr = ('%s - %s (%s)'):format(item[6],item[5], item[4])
|
||||||
|
print(' ITEM TYPE :'..itemStr )
|
||||||
|
else
|
||||||
|
print( (' ITEM TYPE : 0x%s 0x%s'):format(toytype, subtype) )
|
||||||
|
end
|
||||||
|
|
||||||
print( (' UID : 0x%s'):format(uid) )
|
print( (' UID : 0x%s'):format(uid) )
|
||||||
print( (' CARDID : 0x%s %s [%s]'):format(
|
print( (' CARDID : 0x%s %s [%s]'):format(
|
||||||
cardidMsw,cardidLsw,
|
cardidMsw,cardidLsw,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue