1. fixed (it seems) readline behavior. Now there is no proxmark3 prompts on the data.

2. emulator goes into beta stage.
works:
- work with 4BUID and 7BUID dumps
- load/save/grab dumps
- emulate select
- emulate authentication (with nested)
- emulate read/write blocks
- emulate NACK-ACK ping-pong
This commit is contained in:
Merlokbr@gmail.com 2011-06-23 16:49:39 +00:00
commit 51969283ec
4 changed files with 111 additions and 77 deletions

View file

@ -38,15 +38,7 @@ static void *usb_receiver(void *targ)
while (arg->run) {
if (ReceiveCommandPoll(&cmdbuf)) {
for (int i = 0; i < strlen(PROXPROMPT); i++)
putchar(0x08);
UsbCommandReceived(&cmdbuf);
// there is a big bug )
if (cmdbuf.cmd >= 0x0100 && cmdbuf.cmd <= 0x0110) { // debug commands
printf(">");
// rl_on_new_line_with_prompt();
// rl_forced_update_display();
}
fflush(NULL);
}
}
@ -76,7 +68,6 @@ static void *main_loop(void *targ)
if (cmd[0] != 0x00) {
if (strncmp(cmd, "quit", 4) == 0) {
write_history(".history");
break;
}
@ -90,6 +81,8 @@ static void *main_loop(void *targ)
}
}
write_history(".history");
if (arg->usb_present == 1) {
rarg.run = 0;
pthread_join(reader_thread, NULL);