Skip to content

Commit

Permalink
Release 1.0.5 - Auto Decode Common Keypads
Browse files Browse the repository at this point in the history
Attempt to auto detect and decode common entries from a keypad
  • Loading branch information
exploitagency committed Feb 11, 2018
1 parent a3b10f2 commit 0c9bf1f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
48 changes: 47 additions & 1 deletion Source Code/esprfidtool/esprfidtool.ino
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ void LogWiegand(WiegandNG tempwg) {

File f = SPIFFS.open("/"+String(logname), "a"); //Open the log in append mode to store capture
int preambleLen;
if (unknown==true) {
if (unknown==true && countedBits!=4) {
f.print(F("Unknown "));
preambleLen=0;
}
Expand All @@ -379,6 +379,10 @@ void LogWiegand(WiegandNG tempwg) {

f.print(String()+countedBits+F(" bit card,"));

if (countedBits==4) {
f.print(F("possible keypad entry,"));
}

if (unknown!=true) {
f.print(String()+preambleLen+F(" bit preamble,"));
}
Expand Down Expand Up @@ -458,6 +462,48 @@ void LogWiegand(WiegandNG tempwg) {
//f.print(" "); //debug line
f.println(cardChunk2, HEX);
}
else if (countedBits==4) {
f.print(",Keypad Code:");
if (binChunk1 == 0B0000) {
f.println("0");
}
else if (binChunk1 == 0B0001) {
f.println("1");
}
else if (binChunk1 == 0B0010) {
f.println("2");
}
else if (binChunk1 == 0B0011) {
f.println("3");
}
else if (binChunk1 == 0B0100) {
f.println("4");
}
else if (binChunk1 == 0B0101) {
f.println("5");
}
else if (binChunk1 == 0B0110) {
f.println("6");
}
else if (binChunk1 == 0B0111) {
f.println("7");
}
else if (binChunk1 == 0B1000) {
f.println("8");
}
else if (binChunk1 == 0B1001) {
f.println("9");
}
else if (binChunk1 == 0B1010) {
f.println("*");
}
else if (binChunk1 == 0B1011) {
f.println("#");
}
else {
f.println("?");
}
}
else {
f.println("");
}
Expand Down
2 changes: 1 addition & 1 deletion Source Code/esprfidtool/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
String version = "1.0.4a";
String version = "1.0.5";

0 comments on commit 0c9bf1f

Please sign in to comment.