Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2fa2f30

Browse files
committed
slighlty better, still not optimal
1 parent 477c66a commit 2fa2f30

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

lib/request/inject.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,6 @@ def getValue(expression, blind=True, union=True, error=True, time=True, fromUser
413413
warnMsg += "a switch '--no-cast' and/or switch '--hex'"
414414
singleTimeWarnMessage(warnMsg)
415415

416-
if kb.partRun:
417-
kb.partRun = None
418-
419416
return extractExpectedValue(value, expected)
420417

421418
def goStacked(expression, silent=False):

lib/utils/api.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ def initialize_options(self, taskid):
114114
self.options.taskid = taskid
115115
self.options.database = db_filepath
116116

117-
# Enforce batch mode and disable coloring
117+
# Enforce batch mode and disable coloring and ETA
118118
self.options.batch = True
119119
self.options.disableColoring = True
120+
self.options.eta = False
120121

121122
def set_option(self, option, value):
122123
self.options[option] = value
@@ -193,6 +194,9 @@ def write(self, value, status=CONTENT_STATUS.IN_PROGRESS, content_type=None):
193194
if status == CONTENT_STATUS.COMPLETE and len(output) > 0:
194195
conf.database_cursor.execute("DELETE FROM data WHERE id=?", (output[0][0],))
195196

197+
if kb.partRun:
198+
kb.partRun = None
199+
196200
if status == CONTENT_STATUS.IN_PROGRESS:
197201
if len(output) == 0:
198202
conf.database_cursor.execute("INSERT INTO data VALUES(NULL, ?, ?, ?, ?)",
@@ -587,5 +591,5 @@ def client(host=RESTAPI_SERVER_HOST, port=RESTAPI_SERVER_PORT):
587591
logger.error("Not yet implemented, use curl from command line instead for now, for example:")
588592
print "\n\t$ curl http://%s:%d/task/new" % (host, port)
589593
print "\t$ curl -H \"Content-Type: application/json\" -X POST -d '{\"url\": \"http://testphp.vulnweb.com/artists.php?artist=1\"}' http://%s:%d/scan/:taskid/start" % (host, port)
590-
print "\t$ curl http://%s:%d/scan/:taskid/output" % (host, port)
594+
print "\t$ curl http://%s:%d/scan/:taskid/data" % (host, port)
591595
print "\t$ curl http://%s:%d/scan/:taskid/log\n" % (host, port)

0 commit comments

Comments
 (0)