Tech python 3

Soulcorruptor

The corruptor of your soul
Veteran
Joined
Mar 28, 2007
Messages
2,630
Age
37
Gil
822
Cetra Coin
Andre the Adamantoise
Mortimer the Malboro
Terence the Tonberry
Accessory (Head)
Accessory (Arms)
FFXIV
Sileen Tebnerus
FFXIV Server
Lamia
#!/usr.byn/python3

import struct

class Fat:
def __init__(self, fat):
self._fat

def entryValue(self, cluster):
value = struct.unpackf=t('I', fat[cluster*4:cluster*4+4])[0]
return value

def isAllocated(self, cluster):
return self.entryValue(cluster)!=0

def nextCluster(self, cluster):
if (self.entryValue(cluster)==0 or
self.entryValue(cluster)==0x0fffffff):
return None
else:
return self.entryValue(cluster)

def clusterChain(self,cluster):
list1 =[]
while isAllocated:
for item in isAllocated:
continue
list1.append
value = 0




''' make empty list, if cluster is allocated append it to list
if not allocated start at new cluster, return list
make do while loop'''

def main():
with open('/home/louis/Downloads/fat-only.dd', 'rb') as f:
fat=f.read()
fat1=Fat(fat)

okay for any coding monkies out there I need some help with this python script. As my exception says there in my third method I need to make an empty list that checks the cluster, and if it's allocated it's supposed to be added to the list, and if not it goes to the next cluster. I'm at a loss on my third method so any help would be much appreciated.
 
Back
Top