-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 1.0.8 - Improved Magstripe Decoding
of ABA Track 2
- Loading branch information
1 parent
9854059
commit e4531f6
Showing
4 changed files
with
57 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
String aba2str (String magstripe, int magStart, int magEnd, String swipeDirection) { | ||
//f.println(String()+"Start pos:"+magStart); | ||
//f.println(String()+"Start pos:"+magEnd); | ||
String ABA=""; | ||
String aba2str=""; | ||
int magCount=abs(magEnd-magStart); | ||
//f.println(String()+"magCount:"+magCount); | ||
aba2str=(String()+"\"Cleaned\" Binary:"+magstripe.substring(magStart,magEnd)+"\n"); | ||
aba2str+=(String()+" * Possible "+swipeDirection+" Card Data\(ASCII\):"); | ||
while (magCount>0) { | ||
ABA=magstripe.substring(magStart,magStart+4); | ||
if (ABA=="1101") {aba2str+=(";");} | ||
else if (ABA=="0000") {aba2str+=("0");} | ||
else if (ABA=="1000") {aba2str+=("1");} | ||
else if (ABA=="0100") {aba2str+=("2");} | ||
else if (ABA=="1100") {aba2str+=("3");} | ||
else if (ABA=="0010") {aba2str+=("4");} | ||
else if (ABA=="1010") {aba2str+=("5");} | ||
else if (ABA=="0110") {aba2str+=("6");} | ||
else if (ABA=="1110") {aba2str+=("7");} | ||
else if (ABA=="0001") {aba2str+=("8");} | ||
else if (ABA=="1001") {aba2str+=("9");} | ||
else if (ABA=="0011") {aba2str+=("<");} | ||
else if (ABA=="0111") {aba2str+=(">");} | ||
else if (ABA=="0101") {aba2str+=(":");} | ||
else if (ABA=="1011") {aba2str+=("=");} | ||
else if (ABA=="1111") {aba2str+=("?");} | ||
else {aba2str+=("_UNKNOWN-CHARACTER_");} | ||
magStart=magStart+5; | ||
magCount=magCount-5; | ||
} | ||
return aba2str; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
String version = "1.0.7"; | ||
String version = "1.0.8"; |