File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -696,6 +696,14 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT):
696696 """
697697 REST-JSON API client
698698 """
699+
700+ dbgMsg = "Example client access from command line:"
701+ dbgMsg += "\n \t $ taskid=$(curl http://%s:%d/task/new 2>1 | grep -o -I '[a-f0-9]\{16\}') && echo $taskid" % (host , port )
702+ dbgMsg += "\n \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 )
703+ dbgMsg += "\n \t $ curl http://%s:%d/scan/$taskid/data" % (host , port )
704+ dbgMsg += "\n \t $ curl http://%s:%d/scan/$taskid/log" % (host , port )
705+ logger .debug (dbgMsg )
706+
699707 addr = "http://%s:%d" % (host , port )
700708 logger .info ("Starting REST-JSON API client to '%s'..." % addr )
701709
You can’t perform that action at this time.
0 commit comments