ptyhon
 
 
  Joined: 06 Jan 2010 Posts: 15
 
  | 
		
			
				 Posted: Mon Mar 15, 2010 9:47 am    Post subject: Question about file_apdu data structure. | 
				     | 
			 
			
				
  | 
			 
			
				Hi,  
 
 
I cannot get this compare statement to work? I looked at the appleshaft and fakesim code and this is what they did to capture the IMSI event.
 
 
Below is my log file from the TP. Did i miss out some things? It seems like my ME send out 2 seperate packet to SIM. The command packet first follow by the data packet. 
 
 
Thanks alot.
 
 
void handle_sim_file (File_apdu_data *data)
 
{
 
  //Before i compare i print out the value of EF and INS
 
  dbsp("EF: ");
 
  dbih(fa->ef);
 
  dbsp(" INS: ");
 
  dbih(fa->ins);
 
  dbsp("\n");
 
 
  if (fa->ef == EF_IMSI && fa->ins == ME_CMD_SELECT)
 
  {
 
      dbsp("fake\n");
 
      fa->p1 = 0xde;
 
      fa->p2 = 0xad;
 
      sim (fa->ins, fa->p1, fa->p2, fa->p3, fa->data);
 
    } else {
 
      sim (fa->ins, fa->p1, fa->p2, fa->p3, fa->data);
 
    }
 
}
 
 
--------My TP log file---------------
 
FROM ME:  a0 a4 00 00 02 --> ME_CMD_SELECT
 
FROM ME:  6f 07 -->EF_IMSI
 
EF: 6f38 INS: 00a4 --- print by me, the EF value should be 6f07 
 
TO SIM:   a0 a4 00 00 02
 
TO SIM:   6f 07 
 
FROM SIM: 9f 0f 
 
TO ME:    9f 0f | 
			 
		  |