MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / option_set

Function option_set

lib/utils/api.py:478–495  ·  view source on GitHub ↗

Set value of option(s) for a certain task ID

(taskid)

Source from the content-addressed store, hash-verified

476
477@post("/option/<taskid>/set")
478def option_set(taskid):
479 """
480 Set value of option(s) for a certain task ID
481 """
482
483 if taskid not in DataStore.tasks:
484 logger.warning("[%s] Invalid task ID provided to option_set()" % taskid)
485 return jsonize({"success": False, "message": "Invalid task ID"})
486
487 if request.json is None:
488 logger.warning("[%s] Invalid JSON options provided to option_set()" % taskid)
489 return jsonize({"success": False, "message": "Invalid JSON options"})
490
491 for option, value in request.json.items():
492 DataStore.tasks[taskid].set_option(option, value)
493
494 logger.debug("(%s) Requested to set options" % taskid)
495 return jsonize({"success": True})
496
497# Handle scans
498@post("/scan/<taskid>/start")

Callers

nothing calls this directly

Calls 4

jsonizeFunction · 0.90
itemsMethod · 0.80
set_optionMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…