[WINSCARD]
# DEFAULT: FALSE, SET TO TRUE IF APPLICATION IS NOT ABLE TO HANDLE GET DATA (00 0c 00 00 lc) COMMAND ON ITS OWN 
AUTO_REQUEST_DATA = 1

# DEFAULT: FALSE, SET TO TRUE IF SOME APPLICATION IS BLOCKING CARD
FORCE_CONNECT_SHARED_MODE = 1

# DEFAULT: FALSE, SET TO TRUE IF APPLET HAVE PROBLEM TO RETURN DATA (apdu.setOutgoingAndSend()) WHEN NO PREVIOUS setIncomingAndReceive() WAS CALLED. 
FORCE_APDU_NONZERO_INPUT_DATA = 1

# DEFAULT: FALSE, SET TO TRUE IF LOGGING OF APDU DATA IS REQUIRED
LOG_EXCHANGED_APDU = 1

# DEFAULT: CURRENT DIRECTORY
LOG_BASE_PATH = d:\

# DEFAULT: FALSE, SET TO TRUE IF YOU LIKE TO APPLY ONLINE MODIFICATION RULES TO COMMUNICATION. 
MODIFY_APDU_BY_RULES = 1

# DEFAULT: FALSE, SET TO TRUE IF YOU LIKE TO LOG INFORMATION ABOUT CALLED FUNCTIONS. 
LOG_FUNCTIONS_CALLS = 1

# NAME OF FIRST READER   OUTPUTED BY SCardListReaders() FUNCTION (USE WHEN APPLICATION IS UNABLE TO WORK WITH MULTIPLE READERS AND TAKES ONLY FIRST (AND UNWANTED) ONE)
#READER_ORDERED_FIRST = Schlumberger e-gate 0
READER_ORDERED_FIRST = VirtOpenPGP

#
# FORMAT OF PACKET MATCHING/CHANGING FUNCTIONALITY
#
#[RULE1] # unique name for the rule, starting with string RULE followed by unique number within this file
# MATCH= key starting with key MATCH followed by number, starting from 1 (can be more of them), MATCH1, MATCH2....
#   Match pattern consists from following values, separated by symbol ';': 
#   value in= specifies match on input (in=1;) vs. response apdu (in=0;)  
#   value t=  specifies ordinary number of apdu packet in history buffer. E.g. t=0 specifies matching on current apdu currently in transmission. t=1 specifies apdu transmitted just before current apdu, t=7 specifies apdu transmitted 7 packets back
#   value cla= specifies value of CLA byte in APDU header (hexadecimal). E.g., cla=88 means CLA == 0x88
#   value ins= specifies value of INS byte in APDU header (hexadecimal). 
#   value p1= specifies value of P1 byte in APDU header (hexadecimal). 
#   value p2= specifies value of P2 byte in APDU header (hexadecimal). 
#   value lc= specifies value of LC byte in APDU header (hexadecimal). 
#   value le= specifies value of LE byte in APDU header (hexadecimal). 
#   value dataX= specifies value of one or more bytes in data section of APDU command (hexadecimal), starting with Xth byte. 
#      E.g., data0=11 0F 31; will match on APDU packet with data part of APDU starting with bytes 0x11 0xf0 0x31 
#      E.g., data1=11 0F 31; will match on APDU packet with arbitrary first byte in data part of packet, second to fourth data bytes equal to 0x11 0xf0 0x31 
# ACTION= key specifying the action taken when incoming apdu matches the pattern specified in MATCH keys 
# APDUIN= key specifying, when should be this rule evaluated. If true (1), this rule will be evaluated on all incoming apdu packets. If false (0) it will be evaluated on reponse apdu.
# DELAY= key specifying delay in milisecond that will be introduced before the action is taken. Use for example when packet to smart card is dropped and replaced with forged response apdu, but application is monitoring expected computational time, therefore quick forget reponse would be detected. 
# USAGE= if true (1), this rule will be used, if false (0) it will be skipped. Used as swicth to quickly turn RULE on or off without inserting/removing rule description from the script file 
#  

# EXAMPLE:
#[RULE1] 
#MATCH1=in=1;t=1;cla=88;ins=10;p1=01;p2=01;  
#MATCH2=in=1;t=0;cla=c0;ins=c0;
#ACTION=in=0;data0=1D A2 FF FF FF FF FF FF 90 00;le=0a;
#USAGE=1
#APDUIN=0
#DELAY=100



[RULE1]
MATCH1=in=1;t=0;cla=00;ins=a4;data1=11 0F 31;
ACTION=in=0;data0=90 00;le=02;
USAGE=1
APDUIN=0
[RULE2]
MATCH1=in=1;t=0;cla=88;ins=10;p1=01;p2=01;
ACTION=in=0;data0=61 08;le=02;
USAGE=1
APDUIN=0
[RULE3]
MATCH1=in=1;t=1;cla=88;ins=10;p1=01;p2=01;
MATCH2=in=1;t=0;cla=c0;ins=c0;
ACTION=in=0;data0=1D A2 FF FF FF FF FF FF 90 00;le=0a;
USAGE=1
APDUIN=0
[RULE4]
MATCH1=in=1;t=0;cla=88;ins=10;p1=01;p2=7f;
ACTION=in=0;data0=61 02;le=02;
USAGE=1
APDUIN=0
DELAY=100
[RULE5]
MATCH1=in=1;t=1;cla=88;ins=10;p1=01;p2=7f;
MATCH2=in=1;t=0;cla=c0;ins=c0;
ACTION=in=0;data0=01 08 90 00;le=04;
USAGE=1
APDUIN=0


