예제 #1
0
파일: SIM.py 프로젝트: 12019/card
 def explore_fs(self, filename='sim_fs', depth=True, emul=False):
     '''
     self.explore_fs(self, filename='sim_fs') -> void
         filename: file to write in information found
         depth: depth in recursivity, True=infinite
     
     brute force all file addresses from MF recursively 
     (until no more DF are found)
     write information on existing DF and file in the output file
     '''
     simfs_entries = MF_FS.keys()
     if not emul:
         self.explore_DF([], None, depth)
     
     fd = open(filename, 'w')
     fd.write('\n### MF ###\n')
     f = self.select()
     write_dict(f, fd)
     fd.write('\n')
     #
     for f in self.FS:
         path = tuple(f['Absolut Path'])
         if path in simfs_entries:
             f['Name'] = MF_FS[path]
         write_dict(f, fd)
         fd.write('\n')
     
     fd.close()
예제 #2
0
파일: SIM.py 프로젝트: biker-ron/sim-card
 def explore_fs(self, filename='sim_fs', depth=True, emul=False):
     '''
     self.explore_fs(self, filename='sim_fs') -> void
         filename: file to write in information found
         depth: depth in recursivity, True=infinite
     
     brute force all file addresses from MF recursively 
     (until no more DF are found)
     write information on existing DF and file in the output file
     '''
     simfs_entries = MF_FS.keys()
     if not emul:
         self.explore_DF([], None, depth)
     
     fd = open(filename, 'w')
     fd.write('\n### MF ###\n')
     f = self.select()
     write_dict(f, fd)
     fd.write('\n')
     #
     for f in self.FS:
         path = tuple(f['Absolut Path'])
         if path in simfs_entries:
             f['Name'] = MF_FS[path]
         write_dict(f, fd)
         fd.write('\n')
     
     fd.close()