fortify/WebInspectAutomation

Input issue

Saisriramkolli opened this issue · 1 comments

Hi team
I am new to python and webinspect
I am trying the code please help me on what input i need to provide in scanmode

Python hello.py crawlandaudit c://user http://locahost

Query

What we need to give in the scanmode
In 89 line i am getting the payload not defined how to define and where we need to define

Please help
Thanks in advance

If you look at the TXT samples included in the project, you will see that they are essentially JSON constructs. These are identical to what you might see in the WebInspect REST API screen, or if you were creating the HTTP Request in POSTman. It is always possible there is an error in this project, but the Payload setting requires that you have provided a secondary file housing the WebInspect CLI scan options you desire. Try the standard URL scan option before moving to this more complicated scan type. Line 26 is where the Payload is defined/requested.

#Grab the Payload file location from the command line arguments
if "DefaultFilePath" in arguments:
DefaultFilePath = arguments[arguments.index("DefaultFilePath") + 1]
print ("Default path for PayloadFile.txt and results: " + DefaultFilePath, flush=True)

First, always make certain you are running the Windows service for WebInspect API, as that is the tool being called by this Python project.

Next, review the Swagger endpoints and samples included within the WebInspect API:
http://localhost:8083/webinspect/api

For running a new scan, you will want to focus on this endpoint and can even trigger the scan there in your browser.
http://localhost:8083/webinspect/swagger/ui/index#!/Scanner/Scanner_StartScan