Esempio n. 1
0
	def loadProject(self) :
		projXML = projectXml(self.window)
		result = projXML.getProjectXmlContent(self.path)
		if (not result) :
			return False
		(name, description, author, iterationCount, startRecordingClient, startRecordingServer, 
		 strategy, params, seedEnabled, seed, seedIteration, startFuzzingClient, startFuzzingServer) = result
		self.name = name
		self.description = description
		self.author = author
		self.iterationCount = iterationCount
		self.startRecordingClient = startRecordingClient.contains("True")
		self.startRecordingServer = startRecordingServer.contains("True")
		self.strategy = strategy
		self.params = params
		self.seedEnabled = seedEnabled.contains("True", Qt.CaseInsensitive)
		self.seed = seed.toInt()[0]
		self.seedIteration = seedIteration.toInt()[0]
		self.startFuzzingClient = startFuzzingClient.contains("True")
		self.startFuzzingServer = startFuzzingServer.contains("True")
		self.window.setWindowTitle("HotFuzz v" + HotFuzzGUIGlobals.programVersion +  " - " + name + " (" + self.getPath() + ")")
		self.window.statusbar.showMessage("Project \"" + name + "\" successfully loaded form \"" + self.getPath() + "\".")
		for stack in self.window.undoGroup.stacks() :
		 	stack.clear()
		return True
Esempio n. 2
0
	def storeProject(self) :
		self.updateFromGUI()
		projXML = projectXml(self.window)
		result = projXML.storeProjectXmlContent(self.path, self.name, self.description, self.author, 
			self.iterationCount, self.startRecordingClient, self.startRecordingServer, self.strategy, 
			self.params, self.seedEnabled, self.seed, self.seedIteration, self.startFuzzingClient, 
			self.startFuzzingServer)
		if (result) :
			self.window.statusbar.showMessage("Project \"" + self.name + "\" successfully stored to \"" + self.getPath() + "\".")

		return result