iceman1001 / proxmark3

[Deprecated] Iceman Fork, the most totally wicked fork around if you are into proxmark3
http://www.icedev.se/pm3.aspx
GNU General Public License v2.0
465 stars 116 forks source link

CHG: 'hf mf dump' now use hf-mf-UID-key.bin and hf-mf-UID-data.bin in… #164

Closed brianpow closed 6 years ago

brianpow commented 6 years ago

CHG: 'hf mf dump' now use hf-mf-UID-key.bin and hf-mf-UID-data.bin instead of dumpkey.bin and dumpdata.bin as default name

brianpow commented 6 years ago

Hi.

My changes only added algorithm to generate filename for mifare card. The saving algorithm is not touched.

It will be good if we can use saveFile() and saveFileEml() in the next code cleanup. But when dumping mifare card, it requires loading the key file, which needs the filename generation algorithm to be taken out from saveFile()/saveFileEml().

brianpow commented 6 years ago

Sorry, give me a minute to look at the code again

iceman1001 commented 6 years ago

Take your time, this PR will not be merged unless changed.

brianpow commented 6 years ago

FillFileNameByUID() is being used now. Also for "hf 15 dump"

iceman1001 commented 6 years ago

so, assumption is to use card-uid when not called with params?

I rather have the fallback to "dumpbin" etc when command is not called with filename. and add a param -u to indicate usage of card-uid.

brianpow commented 6 years ago

I got this idea from 'hf 15 dump', which use uid as filename by default

iceman1001 commented 6 years ago

I agree, for dumping that is ok. but for restoring no.

brianpow commented 6 years ago

Agree, I will add a option to let user to specify the file they are going to restore

iceman1001 commented 6 years ago

and yeah, merge with the changes aswell.

iceman1001 commented 6 years ago

hm. i think we didn't see the same here.

hf mf restore - defaults back to dumpdata.bin / dumpkeys.bin hf mf restore u - tries to read uid from card hf mf restore f nnn k mmm - use nnn as datafile, mmm as keyfile

  1. Not sure we need the hf-mf- prefix, elsewhere we just use UID.bin or UID.eml
  2. param U doesn't need to input. I think that will be more simpler and intuative.
  3. when skipping k, or f, it should fallback to dumpdata / dumpkeys.

What do you think?

brianpow commented 6 years ago
  1. I used uid.bin as filename for my dump before but forgot which tag type it is later. So I decided to put tag type in the filename too.

  2. Sometimes, I may restore tag from other uid dump but I am lazy to type the full name.

  3. Will think of it. But I feel we should encourage user to use the new filename format, for better file management, as what you already done in 'hf 15 dump'.

iceman1001 commented 6 years ago

Its growing bigger. Are you going to change all filename handling now? Im impressed.

iceman1001 commented 6 years ago

But also, the total remake of different commands input parameter, make s this PR a bit too big. We can start with the filename for some command, .. the remake of nonces.bin is not important, not very often its used. The dump-files and keyfiles I agree with.

brianpow commented 6 years ago

I think all file handing part for mifare should be done.

iceman1001 commented 6 years ago

I like your spirit!

iceman1001 commented 6 years ago

Nice that you want to change every help text, but keep that in a seperate PR. Don't not make this a monster PR, which I will close down. Drop the help text in another PR and I'll merge it in a wiff

brianpow commented 6 years ago

just synced and resolve the conflicts with your branch, so you can rebase them easily