def setname(self, lname): localfile = os.path.join(self.lootpath, self.luuid, "name") tlocalfile = tmpname.get(localfile) f = open(tlocalfile[1], "w") f.write(lname) f.close() tools.rename(tlocalfile[1], tlocalfile[0]) # self is added for the same forban doing the announce # and the discovery myid = fid.manage(dynpath=self.dynpath) if myid.get() == self.luuid: localfile = os.path.join(self.lootpath, self.luuid, "self") tlocalfile = tmpname.get(localfile) f = open(tlocalfile[1], "w") f.write("") f.close() tools.rename(tlocalfile[1], tlocalfile[0])
def whoami(self): lfid = fid.manage(dynpath=self.dynpath) return lfid.get()
def gen(self): self.payload = "forban;name;" + self.name + ";" myid = fid.manage(dynpath=self.dynpath) self.payload = self.payload + "uuid;" + myid.get()
def gen (self): self.payload = "forban;name;" + self.name + ";" myid = fid.manage(dynpath=self.dynpath) self.payload = self.payload + "uuid;" + myid.get()