An interface to Netsparker REST API
Project description
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
pip
oreasy_install
, execute:python setup.py sdist
- The resulting build will be in
$PWD/dist/Netsparker_Rest_API-<version>.tar.gz
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
netsparker_api-0.2.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file netsparker_api-0.2.tar.gz
.
File metadata
- Download URL: netsparker_api-0.2.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f083b4068e15e1302696f1f802f2557c230af325e5225ff34b97ecc5b6687df2 |
|
MD5 | 6d75efe06bbd4ceaa753e24e00603e16 |
|
BLAKE2b-256 | c684a5d91c91717570d8a121078056a61e8d5200d8e4a15fec0c41655e038a2c |
File details
Details for the file netsparker_api-0.2-py3-none-any.whl
.
File metadata
- Download URL: netsparker_api-0.2-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d34e8f6b3f235938a757e0ffa7b55a84fef898d14d9f364601d3271ffb9e35ac |
|
MD5 | 8e0404b211628278badb11550743d274 |
|
BLAKE2b-256 | dc9735c6238257ff115e568dab70394f2765112d441af736c33af34b8bf7a945 |