A REST interface to Netsparker
Dependencies:
- Netsparker Team or Enterprise License (Not working with standard license)
- Python 3.3+
- requests module (install via pip)
- The dependencies can be satisfied via
pip install -r requirements.txt
Quick Install
pip install netsparker-api
API Documentations:
https://www.netsparkercloud.com/docs/index
Some examples:
- Get your account information.
from netsparker_api import Netsparker_Account
credentials = {
"API_ROOT": "https://www.netsparkercloud.com/api/1.0/%s",
"USER_ID": "NETSPARKER CLOUD API USER_ID GOES HERE",
"API_TOKEN": "NETSPARKER CLOUD API API_TOKEN GOES HERE"
}
my_info = Netsparker_Account.Account.me(credentials)
print(my_info)
- Schedules a scan to be launched in the future.
from netsparker_api import Netsparker_Scans
credentials = {
"API_ROOT": "https://www.netsparkercloud.com/api/1.0/%s",
"USER_ID": "NETSPARKER CLOUD API USER_ID GOES HERE",
"API_TOKEN": "NETSPARKER CLOUD API API_TOKEN GOES HERE"
}
data = {
"Name": "Scheduled Scan-1",
"NextExecutionTime": "15/05/2020 10:20 PM",
"ScheduleRunType": "Weekly",
"CustomRecurrence": {
"RepeatType": "Weeks",
"Interval": 1,
"EndingType": "Never",
"DaysOfWeek": [
"Friday"
],
"EndOn": "21/07/2022 10:42 PM"
},
"TargetUri": "http://php.testsparker.com/",
"Cookies": "name1=value1; name2=value2",
"CrawlAndAttack": "true",
"EnableHeuristicChecksInCustomUrlRewrite": "true",
}
schedule_scan = Netsparker_Scans.Scans.schedule(credentials, data)
print(schedule_scan)
- Returns the custom report of a scan in the specified format.
from netsparker_api import Netsparker_Scans
credentials = {
"API_ROOT": "https://www.netsparkercloud.com/api/1.0/%s",
"USER_ID": "NETSPARKER CLOUD API USER_ID GOES HERE",
"API_TOKEN": "NETSPARKER CLOUD API API_TOKEN GOES HERE"
}
data = {
"id": "8705818b4fc644a33957ab9c01765d06",
"reportName": "ScheduledScan-1Report ",
"onlyConfirmedVulnerabilities": "false",
"excludeIgnoreds": "false",
"reportFormat": "Json"
}
report_csv = Netsparker_Scans.Scans.custom_report(credentials, data)
print(report_csv)
Building modules:
- To build a package to install via
piporeasy_install, execute:python setup.py sdist
- The resulting build will be in
$PWD/dist/Netsparker_Rest_API-<version>.tar.gz
Metadata
Release files for netsparker-api 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| netsparker_api-0.2.tar.gz | 7.6 kB | Without provenance | Details for netsparker_api-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netsparker_api-0.2-py3-none-any.whl | Python 3 | none | any | Details for netsparker_api-0.2-py3-none-any.whl |
Total release size: 22.0 kB
Release files / netsparker_api-0.2.tar.gz
| Download URL | netsparker_api-0.2.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f083b4068e15e1302696f1f802f2557c230af325e5225ff34b97ecc5b6687df2
|
|
BLAKE2b-256 checksum How to use checksums |
c684a5d91c91717570d8a121078056a61e8d5200d8e4a15fec0c41655e038a2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
|
Release files / netsparker_api-0.2-py3-none-any.whl
| Download URL | netsparker_api-0.2-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d34e8f6b3f235938a757e0ffa7b55a84fef898d14d9f364601d3271ffb9e35ac
|
|
BLAKE2b-256 checksum How to use checksums |
dc9735c6238257ff115e568dab70394f2765112d441af736c33af34b8bf7a945
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
|
Security for netsparker-api 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.