Implemented a better way to deal with % characters in parameters' value. Minor code restyle.

This commit is contained in:
Bernardo Damele
2008-10-16 15:31:02 +00:00
parent d664f0387e
commit a5b2366033
8 changed files with 30 additions and 40 deletions

View File

@@ -55,8 +55,7 @@ def __getFieldsProxy(expression):
def __goInference(payload, expression):
start = time.time()
if conf.sessionFile:
dataToSessionFile("[%s][%s][%s][%s][" % (conf.url, kb.injPlace, conf.parameters[kb.injPlace], expression))
dataToSessionFile("[%s][%s][%s][%s][" % (conf.url, kb.injPlace, conf.parameters[kb.injPlace], expression))
if ( conf.eta or conf.threads > 1 ) and kb.dbms:
_, length, _ = queryOutputLength(expression, payload)
@@ -326,7 +325,7 @@ def __goInband(expression):
output = re.findall(regExpr, output, re.S)
if conf.sessionFile and ( partial or not condition ):
if partial or not condition:
logOutput = "".join(["__START__%s__STOP__" % replaceNewlineTabs(value) for value in output])
dataToSessionFile("[%s][%s][%s][%s][%s]\n" % (conf.url, kb.injPlace, conf.parameters[kb.injPlace], expression, logOutput))