Skip to main content

A REST interface to Netsparker

PyPI Version

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 or easy_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)

Source distribution for netsparker-api 0.2
File Size Uploaded
netsparker_api-0.2.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netsparker-api 0.2
File Interpreter ABI Platform
netsparker_api-0.2-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page