mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
Merge branch 'master' of https://github.com/Proxmark/proxmark3
Conflicts: armsrc/Makefile armsrc/appmain.c armsrc/apps.h armsrc/epa.c armsrc/iclass.c armsrc/iso14443a.c armsrc/iso14443a.h armsrc/iso15693.c armsrc/lfops.c armsrc/mifarecmd.c armsrc/mifareutil.c armsrc/mifareutil.h armsrc/string.h armsrc/util.h bootrom/bootrom.c client/Makefile client/cmddata.c client/cmddata.h client/cmdhf.c client/cmdhf14a.c client/cmdhf14b.c client/cmdhf15.c client/cmdhficlass.c client/cmdhfmf.c client/cmdhfmfu.c client/cmdlf.c client/cmdlfem4x.c client/cmdlfhid.c client/cmdlfhitag.c client/cmdlfio.c client/cmdmain.c client/data.h client/flash.c client/graph.c client/graph.h client/loclass/elite_crack.c client/loclass/fileutils.c client/lualibs/commands.lua client/lualibs/html_dumplib.lua client/lualibs/mf_default_keys.lua client/lualibs/utils.lua client/mifarehost.c client/nonce2key/crapto1.c client/proxmark3.c client/scripting.c client/scripts/tnp3dump.lua client/scripts/tnp3sim.lua client/scripts/tracetest.lua common/Makefile.common common/cmd.c common/cmd.h common/lfdemod.c common/lfdemod.h common/usb_cdc.c common/usb_cdc.h include/usb_cmd.h
This commit is contained in:
commit
64d1b4efc9
104 changed files with 462574 additions and 5340 deletions
|
@ -48,7 +48,7 @@ local _commands = {
|
|||
CMD_EM4X_READ_WORD = 0x0218,
|
||||
CMD_EM4X_WRITE_WORD = 0x0219,
|
||||
CMD_IO_DEMOD_FSK = 0x021A,
|
||||
CMD_IO_CLONE_TAG = 0x021B,
|
||||
CMD_IO_CLONE_TAG = 0x021B,
|
||||
CMD_EM410X_DEMOD = 0x021c,
|
||||
--/* CMD_SET_ADC_MUX: ext1 is 0 for lopkd, 1 for loraw, 2 for hipkd, 3 for hiraw */
|
||||
|
||||
|
@ -109,7 +109,7 @@ local _commands = {
|
|||
CMD_MIFARE_CSETBLOCK = 0x0605,
|
||||
CMD_MIFARE_CGETBLOCK = 0x0606,
|
||||
CMD_MIFARE_CIDENT = 0x0607,
|
||||
|
||||
|
||||
CMD_SIMULATE_MIFARE_CARD = 0x0610,
|
||||
|
||||
CMD_READER_MIFARE = 0x0611,
|
||||
|
@ -212,7 +212,6 @@ function Command:getBytes()
|
|||
local data = self.data
|
||||
local cmd = self.cmd
|
||||
local arg1, arg2, arg3 = self.arg1, self.arg2, self.arg3
|
||||
|
||||
return bin.pack("LLLLH",cmd, arg1, arg2, arg3,data);
|
||||
end
|
||||
return _commands
|
|
@ -49,7 +49,7 @@ end
|
|||
|
||||
local function save_TEXT(data,filename)
|
||||
-- Open the output file
|
||||
local outfile = io.open(filename, "wb")
|
||||
local outfile = io.open(filename, "w")
|
||||
if outfile == nil then
|
||||
return oops(string.format("Could not write to file %s",tostring(filename)))
|
||||
end
|
||||
|
@ -195,4 +195,6 @@ return {
|
|||
convert_eml_to_bin = convert_eml_to_bin,
|
||||
SaveAsBinary = save_BIN,
|
||||
SaveAsText = save_TEXT,
|
||||
SaveAsBinary = save_BIN,
|
||||
SaveAsText = save_TEXT,
|
||||
}
|
||||
|
|
|
@ -158,6 +158,20 @@ local _keys = {
|
|||
'eff603e1efe9',
|
||||
'644672bd4afe',
|
||||
|
||||
'b5ff67cba951',
|
||||
}
|
||||
|
||||
--[[
|
||||
Kiev metro cards
|
||||
--]]
|
||||
'8fe644038790',
|
||||
'f14ee7cae863',
|
||||
'632193be1c3c',
|
||||
'569369c5a0e5',
|
||||
'9de89e070277',
|
||||
'eff603e1efe9',
|
||||
'644672bd4afe',
|
||||
|
||||
'b5ff67cba951',
|
||||
}
|
||||
|
||||
|
|
|
@ -108,6 +108,24 @@ local Utils =
|
|||
return retval
|
||||
end,
|
||||
|
||||
-- input parameter is a string
|
||||
-- Swaps the endianess and returns a string,
|
||||
-- IE: 'cd7a' -> '7acd' -> 0x7acd
|
||||
SwapEndiannessStr = function(s, len)
|
||||
if s == nil then return nil end
|
||||
if #s == 0 then return '' end
|
||||
if type(s) ~= 'string' then return nil end
|
||||
|
||||
local retval
|
||||
if len == 16 then
|
||||
retval = s:sub(3,4)..s:sub(1,2)
|
||||
elseif len == 24 then
|
||||
retval = s:sub(5,6)..s:sub(3,4)..s:sub(1,2)
|
||||
elseif len == 32 then
|
||||
retval = s:sub(7,8)..s:sub(5,6)..s:sub(3,4)..s:sub(1,2)
|
||||
end
|
||||
return retval
|
||||
end,
|
||||
------------ CONVERSIONS
|
||||
|
||||
--
|
||||
|
@ -116,7 +134,7 @@ local Utils =
|
|||
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
|
||||
while IN>0 do
|
||||
I=I+1
|
||||
IN,D=math.floor(IN/B),math.mod(IN,B)+1
|
||||
IN , D = math.floor(IN/B), math.modf(IN,B)+1
|
||||
OUT=string.sub(K,D,D)..OUT
|
||||
end
|
||||
return OUT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue