Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make output close to original mfoc tool #23

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added the -B option for extract B keys first
  • Loading branch information
unkernet committed Aug 7, 2023
commit 7f0d0a9e4ff6a71e87d76cb0bec0ee90d2835119
10 changes: 7 additions & 3 deletions src/mfoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int main(int argc, char *const argv[])
struct slre_cap caps[2];

// Parse command line arguments
while ((ch = getopt(argc, argv, "hCZFP:T:O:k:f:")) != -1) {
while ((ch = getopt(argc, argv, "hCZBFP:T:O:k:f:")) != -1) {
switch (ch) {
case 'C':
use_default_key=false;
Expand Down Expand Up @@ -241,8 +241,11 @@ int main(int argc, char *const argv[])
}
// fprintf(stdout, "Output file: %s\n", optarg);
break;
case 'B':
dumpKeysA = false;
break;
case 'h':
usage(stdout, 0);
usage(stderr, 0);
break;
default:
usage(stderr, 1);
Expand Down Expand Up @@ -665,7 +668,7 @@ int main(int argc, char *const argv[])
}
}
}
dumpKeysA = false;
dumpKeysA = !dumpKeysA;
}


Expand Down Expand Up @@ -788,6 +791,7 @@ void usage(FILE *stream, uint8_t errnr)
fprintf(stream, " P number of probes per sector, instead of default of 20\n");
fprintf(stream, " T nonce tolerance half-range, instead of default of 20\n (i.e., 40 for the total range, in both directions)\n");
fprintf(stream, " O file in which the card contents will be written\n");
fprintf(stream, " B extract B keys first\n");
fprintf(stream, "\n");
fprintf(stream, "Example: mfoc-hardnested -O mycard.mfd\n");
fprintf(stream, "Example: mfoc-hardnested -k ffffeeeedddd -O mycard.mfd\n");
Expand Down