minor adjustements

This commit is contained in:
iceman1001 2018-02-22 15:13:43 +01:00
parent 87b3df94c1
commit 22715e7a99
2 changed files with 18 additions and 18 deletions
armsrc/Standalone

View file

@ -56,7 +56,7 @@ void RunMod() {
LED(LED_RED2, 0); LED(LED_RED2, 0);
// record // record
DbpString("Starting recording"); DbpString("[+] starting recording");
// wait for button to be released // wait for button to be released
while(BUTTON_PRESS()) while(BUTTON_PRESS())
@ -66,7 +66,7 @@ void RunMod() {
SpinDelay(500); SpinDelay(500);
CmdHIDdemodFSK(1, &high[selected], &low[selected], 0); CmdHIDdemodFSK(1, &high[selected], &low[selected], 0);
Dbprintf("Recorded %x %x %08x", selected, high[selected], low[selected]); Dbprintf("[+] recorded %x %x %08x", selected, high[selected], low[selected]);
LEDsoff(); LEDsoff();
LED(selected + 1, 0); LED(selected + 1, 0);
@ -82,7 +82,7 @@ void RunMod() {
LED(LED_ORANGE, 0); LED(LED_ORANGE, 0);
// record // record
Dbprintf("Cloning %x %x %08x", selected, high[selected], low[selected]); Dbprintf("[+] cloning %x %x %08x", selected, high[selected], low[selected]);
// wait for button to be released // wait for button to be released
while(BUTTON_PRESS()) while(BUTTON_PRESS())
@ -92,7 +92,7 @@ void RunMod() {
SpinDelay(500); SpinDelay(500);
CopyHIDtoT55x7(0, high[selected], low[selected], 0); CopyHIDtoT55x7(0, high[selected], low[selected], 0);
Dbprintf("Cloned %x %x %08x", selected, high[selected], low[selected]); Dbprintf("[+] cloned %x %x %08x", selected, high[selected], low[selected]);
LEDsoff(); LEDsoff();
LED(selected + 1, 0); LED(selected + 1, 0);
@ -118,18 +118,18 @@ void RunMod() {
if (playing && selected != 2) { if (playing && selected != 2) {
LED(LED_GREEN, 0); LED(LED_GREEN, 0);
DbpString("Playing"); DbpString("[+] playing");
// wait for button to be released // wait for button to be released
while (BUTTON_PRESS()) while (BUTTON_PRESS())
WDT_HIT(); WDT_HIT();
Dbprintf("%x %x %08x", selected, high[selected], low[selected]); Dbprintf("[+] %x %x %08x", selected, high[selected], low[selected]);
CmdHIDsimTAG(high[selected], low[selected], 0); CmdHIDsimTAG(high[selected], low[selected], 0);
DbpString("Done playing"); DbpString("[+] done playing");
if (BUTTON_HELD(1000) > 0) { if (BUTTON_HELD(1000) > 0) {
DbpString("Exiting"); DbpString("[+] exiting");
LEDsoff(); LEDsoff();
return; return;
} }
@ -151,12 +151,12 @@ void RunMod() {
// Brute force code // Brute force code
// Check if the badge is an HID Corporate 1000 // Check if the badge is an HID Corporate 1000
if( (high[selected] & 0xFFFFFFF8) != 0x28 ) { if( (high[selected] & 0xFFFFFFF8) != 0x28 ) {
DbpString("Card is not a HID Corporate 1000. Skipping bruteforce."); DbpString("[-] Card is not a HID Corporate 1000. Skipping bruteforce.");
continue; continue;
} }
LED(LED_GREEN, 0); LED(LED_GREEN, 0);
DbpString("Entering bruteforce mode"); DbpString("[=] entering bruteforce mode");
// wait for button to be released // wait for button to be released
while (BUTTON_PRESS()) while (BUTTON_PRESS())
WDT_HIT(); WDT_HIT();
@ -166,14 +166,14 @@ void RunMod() {
uint32_t fc = ((high[selected] & 1 ) << 11 ) | (low[selected] >> 21); uint32_t fc = ((high[selected] & 1 ) << 11 ) | (low[selected] >> 21);
uint32_t original_cardnum = cardnum; uint32_t original_cardnum = cardnum;
Dbprintf("Proxbrute - starting decrementing card number"); Dbprintf("[+] Proxbrute - starting decrementing card number");
while (cardnum >= 0) { while (cardnum >= 0) {
// Needed for exiting from proxbrute when button is pressed // Needed for exiting from proxbrute when button is pressed
if (BUTTON_PRESS()) { if (BUTTON_PRESS()) {
if (BUTTON_HELD(1000) > 0) { if (BUTTON_HELD(1000) > 0) {
DbpString("Exiting"); DbpString("[+] exiting");
LEDsoff(); LEDsoff();
return; return;
} else { } else {
@ -189,21 +189,21 @@ void RunMod() {
hid_corporate_1000_calculate_checksum_and_set(&high[selected], &low[selected], cardnum, fc); hid_corporate_1000_calculate_checksum_and_set(&high[selected], &low[selected], cardnum, fc);
// Print actual code to brute // Print actual code to brute
Dbprintf("TAG ID: %x%08x (%d) - FC: %u - Card: %u", high[selected], low[selected], (low[selected] >> 1) & 0xFFFF, fc, cardnum); Dbprintf("[+] TAG ID: %x%08x (%d) - FC: %u - Card: %u", high[selected], low[selected], (low[selected] >> 1) & 0xFFFF, fc, cardnum);
CmdHIDsimTAGEx(high[selected], low[selected], 1, 50000); CmdHIDsimTAGEx(high[selected], low[selected], 1, 50000);
} }
cardnum = original_cardnum; cardnum = original_cardnum;
Dbprintf("Proxbrute - starting incrementing card number"); Dbprintf("[+] Proxbrute - starting incrementing card number");
while (cardnum <= 0xFFFFF) { while (cardnum <= 0xFFFFF) {
// Needed for exiting from proxbrute when button is pressed // Needed for exiting from proxbrute when button is pressed
if (BUTTON_PRESS()) { if (BUTTON_PRESS()) {
if (BUTTON_HELD(1000) > 0) { if (BUTTON_HELD(1000) > 0) {
DbpString("Exiting"); DbpString("[+] exiting");
LEDsoff(); LEDsoff();
return; return;
} else { } else {
@ -219,12 +219,12 @@ void RunMod() {
hid_corporate_1000_calculate_checksum_and_set(&high[selected], &low[selected], cardnum, fc); hid_corporate_1000_calculate_checksum_and_set(&high[selected], &low[selected], cardnum, fc);
// Print actual code to brute // Print actual code to brute
Dbprintf("TAG ID: %x%08x (%d) - FC: %u - Card: %u", high[selected], low[selected], (low[selected] >> 1) & 0xFFFF, fc, cardnum); Dbprintf("[+] TAG ID: %x%08x (%d) - FC: %u - Card: %u", high[selected], low[selected], (low[selected] >> 1) & 0xFFFF, fc, cardnum);
CmdHIDsimTAGEx(high[selected], low[selected], 1, 50000); CmdHIDsimTAGEx(high[selected], low[selected], 1, 50000);
} }
DbpString("Done brute"); DbpString("[+] done bruteforcing");
if (BUTTON_HELD(1000) > 0) { if (BUTTON_HELD(1000) > 0) {
DbpString("Exiting"); DbpString("Exiting");
LEDsoff(); LEDsoff();

View file

@ -107,7 +107,7 @@ void RunMod() {
WDT_HIT(); WDT_HIT();
Dbprintf("[+] %x %x %08x", selected, high[selected], low[selected]); Dbprintf("[+] %x %x %08x", selected, high[selected], low[selected]);
CmdHIDsimTAG(high[selected], low[selected], 0); CmdHIDsimTAG(high[selected], low[selected], false);
DbpString("[+] done playing"); DbpString("[+] done playing");
if (BUTTON_HELD(1000) > 0) { if (BUTTON_HELD(1000) > 0) {