mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
chg: adapting luascript to use new filename template for key files.
This commit is contained in:
parent
3b792f8b04
commit
e612ae3de4
5 changed files with 30 additions and 21 deletions
|
@ -76,11 +76,12 @@ local function exitMsg(msg)
|
|||
end
|
||||
--
|
||||
-- dumps all keys to file
|
||||
local function dumptofile(keys)
|
||||
local function dumptofile(uid, keys)
|
||||
dbg('dumping keys to file')
|
||||
|
||||
if utils.confirm('Do you wish to save the keys to dumpfile?') then
|
||||
local destination = utils.input('Select a filename to store to', 'dumpkeys.bin')
|
||||
local filename = ('hf-mf-%s-key.bin'):format(uid);
|
||||
local destination = utils.input('Select a filename to store to', filename)
|
||||
local file = io.open(destination, 'wb')
|
||||
if file == nil then
|
||||
print('Could not write to file ', destination)
|
||||
|
@ -194,7 +195,7 @@ local function main(args)
|
|||
|
||||
local keys, err = createKeys( uid )
|
||||
printKeys( keys )
|
||||
dumptofile( keys )
|
||||
dumptofile( uid, keys )
|
||||
end
|
||||
|
||||
main(args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue