コード例 #1
0
ファイル: fuzzer.py プロジェクト: craSH/toolbox
 def log(self, request, response=None):
     """add data to log along with time, sequence, hash, and other metadata"""
     reqSha = toolbox.sha1sum(request)
     respSha = toolbox.sha1sum(str(response))
     self.logs.append((len(self.logs), toolbox.time(), reqSha, respSha, request, response))
     if self.verbose:
         print "sha1(REQUEST): %s\tsha1(RESPONSE): %s" % (reqSha, respSha)
コード例 #2
0
ファイル: fuzzer.py プロジェクト: rodrigoieh/toolbox
 def log(self, request, response=None):
     """add data to log along with time, sequence, hash, and other metadata"""
     reqSha = toolbox.sha1sum(request)
     respSha = toolbox.sha1sum(str(response))
     self.logs.append((len(self.logs), toolbox.time(), reqSha, respSha,
                       request, response))
     if self.verbose:
         print "sha1(REQUEST): %s\tsha1(RESPONSE): %s" % (reqSha, respSha)
コード例 #3
0
ファイル: fuzzer.py プロジェクト: craSH/toolbox
 def logFileSetup(self, baseLogDir):
     """ create file/directory structure for logs, do this once """
     self.logPath = os.path.join(baseLogDir, toolbox.time())
     os.makedirs(self.logPath)
     self.metaLogPath = os.path.join(self.logPath, self.metaLogFileName)
     # write header to metaLogFile
     metaLogFile = open(self.metaLogPath, "w")
     metaLogFile.write("%s\t%s\t\t%s\t\t%s\n" % ("Run", "Time", "sha1sum(Request)", "sha1sum(Response)"))
     metaLogFile.close()
コード例 #4
0
ファイル: fuzzer.py プロジェクト: rodrigoieh/toolbox
 def logFileSetup(self, baseLogDir):
     """ create file/directory structure for logs, do this once """
     self.logPath = os.path.join(baseLogDir, toolbox.time())
     os.makedirs(self.logPath)
     self.metaLogPath = os.path.join(self.logPath, self.metaLogFileName)
     # write header to metaLogFile
     metaLogFile = open(self.metaLogPath, "w")
     metaLogFile.write(
         "%s\t%s\t\t%s\t\t%s\n" %
         ("Run", "Time", "sha1sum(Request)", "sha1sum(Response)"))
     metaLogFile.close()