File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -696,6 +696,14 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT):
696
696
"""
697
697
REST-JSON API client
698
698
"""
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
+
699
707
addr = "http://%s:%d" % (host , port )
700
708
logger .info ("Starting REST-JSON API client to '%s'..." % addr )
701
709
You can’t perform that action at this time.
0 commit comments