Пример #1
0
def analysedudmark(mark, data):
    print mark
    print "dudmark", hex(ord(data[mark]))
    themark = data[mark]
    if struct.unpack('B',themark)[0] == 0xFE:
        # If id-field is truncated: sectid = dict()
        sectid = floppytrack.addressdecode(mark,data)
    else:
        sectid = dict()
    sector = Sector(metadata=sectid, data=themark)
    return sector
Пример #2
0
def analysesector(sidetrck, mark, data):
    #If it's a pair the id-field should always exits - but may be faulty
    sectid = floppytrack.addressdecode(mark[0],data)
    data, datainfo = floppytrack.dataextract(mark[1],sectid['size'],data)
    sector = Sector(metadata=dict(sectid.items() + datainfo.items()), data=Silentstring(data))
    return sector