Beispiel #1
0
 def affichage(self):
     print ("------------------ Analyse du Master Boot Record (MBR) ------------------")
     print ("Affichag Ascii du Boot code dans le MBR:")
     print(Affichage.dumpAscii(self.BootCode))
     print()
     print ("La signature du disque : "+Affichage.dumpHex(self.signature))
     for i in range(4):
         self.partEntrys[i].affichage()
     print()
     print ("Vérification de la signature MBR(55AA) : "+Affichage.dumpHex(self.MagiqueNumber))
Beispiel #2
0
 def __init__(self, mbrReader):
     self.mbr = mbrReader
     self.partitsLIst = {}
     for i in range(4):
         if self.mbr.partEntrys[
                 i].PartitionType == b'\x0b':  # si c'est un fat32
             self.partitsLIst[i] = Fat32(self.mbr.partEntrys[i],
                                         self.mbr.offsetFirstSector,
                                         self.mbr.file)
             curentP = self.partitsLIst[i]
             print(Affichage.dumpHex(curentP.boot_sec1))
             print()
             print(Affichage.dumpAscii(curentP.boot_sec1))
             print(curentP.bytes_per_sector)
             print(curentP.sectors_by_cluster)
             print(curentP.reserved_sector)
             print(curentP.number_of_fat_copis)
             print(curentP.type_media)
             print(curentP.number_of_root_directory_entry)
             print(curentP.total_sectors_by_filesystem)
             print(Affichage.dumpAscii(curentP.system_fichier))
             print(curentP.fileSystem_version)
             print(Affichage.dumpHex(curentP.extended_signature))
             print(curentP.serial_numberOfPartit)
             print(Affichage.dumpAscii(curentP.volume_label))
             print(Affichage.dumpAscii(curentP.fileSystem_type))
             print()
             print(Affichage.dumpAscii(curentP.fileSystemInfo))
             print(Affichage.dumpAscii(curentP.marqueRra))
             print(curentP.nbrOctetsLibre)
             print(curentP.premier_cluster_disponible)