In this default rules.json example, the tag 9f26 (ARQC, length 0x08) value is replaced with aabbccdd11223344, and the tag 77 (Card Template) length is extended from 0x24 to 0x28, and a new tag 9a, length 02, value ff00 is added at the beginning of the template.
Response before:
<<77249F3602004D9F260825E9C3FD004B3CD082020040570E1016434962031044D2402201807F9000
After the rules are applied:
<<77289a02ff009F3602004D9F2608aabbccdd1122334482020040570E1016434962031044D2402201807F9000
The rules indicated in the file apply to requests and responses but only once in each APDU. Feel free to modify the code on Raspberry Pi to adjust the rules and make them more complex!
Now you can launch POSsim.py, and it should receive the data from the card that's being processed by the badge
3.5 Running the Point of Sales Simulator
To access the help menu, run: POSSim.py -h
POSsim.py -h
Card Hacking Challenge / Virtual POS / Relay Emulator
options:
-h, --help show this help message and exit
-H, --hook-data Use data hook function for data processing
-R READER_VALUE, --reader READER_VALUE
Reader ID
-I {contact,cless}, --interface {contact,cless}
Interface type (contact or contactless)
-A AMOUNT_VALUE, --amount AMOUNT_VALUE
Transaction amount without (,) E.g. for $10.01, enter 1001
-F, --faulty Faulty terminal, generates static UN
Check that the POSSim is working and able to see the ACR122U/SCR3310 reader:
C:\Users\yunus>"C:\Users\yunus\Documents\DC32\POSSim\POSSim DC32.py"
0: ACS ACR122 0
1: Identive SCR33xx v2.0 USB SC Reader 0
2: JAVACOS Virtual Contact Reader 0
3: JAVACOS Virtual Contactless Reader 1
4: SCM Microsystems Inc. SCR3310 USB Smart Card Reader 0
Select reader:
Run:
POSsim.py -A 100 -I cless -R 0 -F
If everything works successfully, you will get a message showing that it has been processed in our infrastructure: