Esempio n. 1
0
	def setLanguage(self, lang, delay = True):
		""" Call this function to change the game languge
		    Setting delay to True will delay the change to
		    next gamemode change """
		if delay:
			self.delayedSetLangued = lang
		else:
			self.currentLanguage = lang
			self.strings = strings.getStrings(self.currentLanguage)
Esempio n. 2
0
gdbserver.close()
pwnPy.close()

runGdb = open("gdbRun","w")
runGdbSvr = open("gdbServerRun","w")
runGdb.write(runGdbTempleate)
runGdbSvr.write(runGdbSvrTemplate)
runGdb.close()
runGdbSvr.close()

#chmod
os.chmod("gdbServer",0755)
os.chmod("gdbServerRun",0755)
os.chmod("gdbRun",0755)
os.chmod("exploit.py",0755)

if fileName[0:2] == "./":
    fileName = fileName[2:]
os.chmod(fileName,0755)

stringsTxt = open("strings.txt","w")
str,maxLen = strings.getStrings(elf.file)

# length sort (default : address sort)
str = sorted(str,key=attrgetter('len'))
for s in str:
    tab = " "*(1+int(math.log10(maxLen))-int(math.log10(s.len)))
    stringsTxt.write("%x(%d)%s: %s\n"%(s.addr+elf.load_addr,s.len,tab,s.data))

stringsTxt.close()