diff --git a/Source Code/esprfidtool/esprfidtool.ino b/Source Code/esprfidtool/esprfidtool.ino
index 7b11e9b..ea4b258 100644
--- a/Source Code/esprfidtool/esprfidtool.ino
+++ b/Source Code/esprfidtool/esprfidtool.ino
@@ -524,16 +524,22 @@ void LogWiegand(WiegandNG &tempwg) {
f.println("9");
}
else if (binChunk1 == 0B1010||binChunk1 == 0b01011010) {
- f.println("*");
+ f.println("* or A");
}
else if (binChunk1 == 0B1011||binChunk1 == 0b01001011) {
- f.println("#");
+ f.println("# or B");
}
- else if (binChunk1 == 0b00111100) {
- f.println("F1");
+ else if (binChunk1 == 0b1100||binChunk1 == 0b00111100) {
+ f.println("F1 or C");
}
- else if (binChunk1 == 0b00101101) {
- f.println("F2");
+ else if (binChunk1 == 0b1101||binChunk1 == 0b00101101) {
+ f.println("F2 or D");
+ }
+ else if (binChunk1 == 0b1110||binChunk1 == 0b00011110) {
+ f.println("F3 or E");
+ }
+ else if (binChunk1 == 0b1111||binChunk1 == 0b00001111) {
+ f.println("F4 or F");
}
else {
f.println("?");
@@ -1283,25 +1289,13 @@ void setup() {
digitalWrite(DATA1, HIGH);
pinMode(DATA1,OUTPUT);
- if (pinBITS==4) {
- pinHTML.replace("F1","");
- pinHTML.replace("F2","");
- pinHTML.replace("F","");
- }
- if (pinBITS==8) {
- pinHTML.replace("F1","X");
- pinHTML.replace("F2","Y");
- pinHTML.replace("F","");
- pinHTML.replace("X","(F1)");
- pinHTML.replace("Y","(F2)");
- }
+ pinHTML.replace("F1","C");
+ pinHTML.replace("F2","D");
+ pinHTML.replace("F3","E");
+ pinHTML.replace("F4","F");
experimentalStatus=String()+"Transmitting "+pinBITS+"bit Wiegand Format PIN: "+pinHTML+" with a "+pinHTMLDELAY+"ms delay between \"keypresses\"";
-
- if (pinBITS==8) {
- pinHTML.replace("(F1)","X");
- pinHTML.replace("(F2)","Y");
- }
+ delay(50);
int bruteSTART;
int bruteEND;
@@ -1328,29 +1322,18 @@ void setup() {
String bruteENDchar="";
if (server.hasArg("bruteSTARTchar")&&(server.arg("bruteSTARTchar")!="")) {
bruteSTARTchar=(server.arg("bruteSTARTchar"));
- if (pinBITS==4) {
- bruteSTARTchar.replace("F1","");
- bruteSTARTchar.replace("F2","");
- bruteSTARTchar.replace("F","");
- }
- if (pinBITS==8) {
- bruteSTARTchar.replace("F1","X");
- bruteSTARTchar.replace("F2","Y");
- bruteSTARTchar.replace("F","");
- }
+ bruteSTARTchar.replace("F1","C");
+ bruteSTARTchar.replace("F2","D");
+ bruteSTARTchar.replace("F3","E");
+ bruteSTARTchar.replace("F4","F");
}
if (server.hasArg("bruteENDchar")&&(server.arg("bruteENDchar")!="")) {
bruteENDchar=(server.arg("bruteENDchar"));
- if (pinBITS==4) {
- bruteENDchar.replace("F1","");
- bruteENDchar.replace("F2","");
- bruteENDchar.replace("F","");
- }
- if (pinBITS==8) {
- bruteENDchar.replace("F1","X");
- bruteENDchar.replace("F2","Y");
- bruteENDchar.replace("F","");
- }
+ bruteENDchar=(server.arg("bruteENDchar"));
+ bruteENDchar.replace("F1","C");
+ bruteENDchar.replace("F2","D");
+ bruteENDchar.replace("F3","E");
+ bruteENDchar.replace("F4","F");
}
unsigned long bruteFAILdelay=0;
@@ -1464,7 +1447,7 @@ void setup() {
pinSEND(pinHTMLDELAY,"01101001");
}
}
- else if (pinHTML.charAt(i) == '*') {
+ else if ((pinHTML.charAt(i) == '*')||(pinHTML.charAt(i) == 'A')) {
if (pinBITS==4) {
pinSEND(pinHTMLDELAY,"1010");
}
@@ -1472,7 +1455,7 @@ void setup() {
pinSEND(pinHTMLDELAY,"01011010");
}
}
- else if (pinHTML.charAt(i) == '#') {
+ else if ((pinHTML.charAt(i) == '#')||(pinHTML.charAt(i) == 'B')) {
if (pinBITS==4) {
pinSEND(pinHTMLDELAY,"1011");
}
@@ -1480,16 +1463,38 @@ void setup() {
pinSEND(pinHTMLDELAY,"01001011");
}
}
- else if (pinHTML.charAt(i) == 'X') { //F1
- if (pinBITS==8) {
+ else if (pinHTML.charAt(i) == 'C') { //F1
+ if (pinBITS==4) {
+ pinSEND(pinHTMLDELAY,"1100");
+ }
+ else if (pinBITS==8) {
pinSEND(pinHTMLDELAY,"00111100");
}
}
- else if (pinHTML.charAt(i) == 'Y') { //F2
- if (pinBITS==8) {
+ else if (pinHTML.charAt(i) == 'D') { //F2
+ if (pinBITS==4) {
+ pinSEND(pinHTMLDELAY,"1101");
+ }
+ else if (pinBITS==8) {
pinSEND(pinHTMLDELAY,"00101101");
}
}
+ else if (pinHTML.charAt(i) == 'E') { //F3
+ if (pinBITS==4) {
+ pinSEND(pinHTMLDELAY,"1110");
+ }
+ else if (pinBITS==8) {
+ pinSEND(pinHTMLDELAY,"00011110");
+ }
+ }
+ else if (pinHTML.charAt(i) == 'F') { //F4
+ if (pinBITS==4) {
+ pinSEND(pinHTMLDELAY,"1111");
+ }
+ else if (pinBITS==8) {
+ pinSEND(pinHTMLDELAY,"00001111");
+ }
+ }
}
server.handleClient();
@@ -1726,8 +1731,6 @@ void setup() {
if (pinHTML!="") {
String currentPIN=pinHTML;
- currentPIN.replace("X","(F1)");
- currentPIN.replace("Y","(F2)");
activeTX="Brute forcing PIN: "+currentPIN+"
";
currentPIN="";
}
@@ -1777,8 +1780,8 @@ void setup() {
"
"
"