Skip to content

Commit 6c0fbbf

Browse files
authored
updated relevant parts of the documentation (#1064)
* updated relevant parts of the documentation * updated request header
1 parent 0c2d214 commit 6c0fbbf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/API.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ At the first, you must send an API key through the request each time you send a
7575
To submit a new scan follow this step.
7676

7777
```python
78-
>>> r = requests.post('https://127.0.0.1:5000/new/scan', data={"key": "8370bd0a0b9a98ac25b341833fb0fb07", "targets": "127.0.0.1,owasp.org", "scan_method": "port_scan"})
78+
>>> r = requests.post('https://127.0.0.1:5000/new/scan', data={"key": "8370bd0a0b9a98ac25b341833fb0fb07", "targets": "127.0.0.1,owasp.org", "selected_modules": "port_scan", "report_path_filename": "/home/test.html"})
7979
>>> r.status_code
8080
200
8181
>>> import json
@@ -120,7 +120,7 @@ To submit a new scan follow this step.
120120
}
121121
```
122122

123-
Please note, `targets` and `scan_method` are **necessary** to submit a new scan unless you modify the config file before! The `scan_method` could be empty if you define the `profile`.
123+
Please note, `targets` and `selected_modules` are **necessary** to submit a new scan unless you modify the config file before! The `selected_modules` could be empty if you define the `profile`.
124124

125125
```python
126126
>>> r = requests.post('https://127.0.0.1:5000/new/scan', data={"key": "8370bd0a0b9a98ac25b341833fb0fb07"})
@@ -131,7 +131,7 @@ Please note, `targets` and `scan_method` are **necessary** to submit a new scan
131131
>>> r.content
132132
u'{"msg":"please choose your scan method!","status":"error"}\n'
133133

134-
>>> r = requests.post('https://127.0.0.1:5000/new/scan', data={"key": "09877e92c75f6afdca6ae61ad3f53727", "targets": "127.0.0.1", "scan_method": "dir_scan,port_scan"})
134+
>>> r = requests.post('https://127.0.0.1:5000/new/scan', data={"key": "09877e92c75f6afdca6ae61ad3f53727", "targets": "127.0.0.1", "selected_modules": "dir_scan,port_scan", "report_path_filename": "/home/test.html"})
135135
>>> print json.dumps(json.loads(r.content), sort_keys=True, indent=4)
136136
{
137137
"backup_ports": null,
@@ -429,7 +429,7 @@ To enable session-based requests, like (e.g. Python `requests.session()` or brow
429429
</div>
430430
<style type="text/css">
431431

432-
.header{
432+
.header{
433433
margin:2%;
434434
text-align:center;
435435
}
@@ -665,7 +665,7 @@ To enable session-based requests, like (e.g. Python `requests.session()` or brow
665665
```
666666
## Generate a HTML Scan Result for a Host
667667
```python
668-
>>> r = s.get("https://localhost:5000/logs/get_html?host=127.0.0.1")
668+
>>> r = s.get("https://localhost:5000/logs/get_html?target=127.0.0.1&key=<your_api_key>")
669669
>>> print r.content[:1000]
670670
<!DOCTYPE html>
671671
<!-- THIS PAGE COPIED AND MODIFIED FROM http://bl.ocks.org/robschmuecker/7880033-->
@@ -677,7 +677,7 @@ To enable session-based requests, like (e.g. Python `requests.session()` or brow
677677
</div>
678678
<style type="text/css">
679679

680-
.header{
680+
.header{
681681
margin:2%;
682682
text-align:center;
683683
}
@@ -706,7 +706,7 @@ To enable session-based requests, like (e.g. Python `requests.session()` or brow
706706

707707
### Get the Scan Result in JSON Type
708708
```python
709-
>>> r = s.get("https://localhost:5000/logs/get_json?host=owasp.org")
709+
>>> r = s.get("https://localhost:5000/logs/get_json?target=owasp.org&key=<your_api_key>")
710710
>>> print(json.dumps(json.loads(r.content), sort_keys=True, indent=4))
711711
[
712712
{

0 commit comments

Comments
 (0)