Skip to main content

test a single URL, or a list of URLs, against a Burp Suite-style JSON configuration file to determine in/out-of-scope status

Project description

scoper

test a single URL, or a list of URLs, against a Burp Suite-style JSON configuration file to determine in/out-of-scope status

installation (GitHub / PyPi)

pip install scoper

importing and loading the external Burp-style configuration file

  • imports and loading the configuration file in your script
import json
from scoper import ScoperList, ScoperSingle
with open("test-burp-config.json", "r") as conf:
	c = json.load(conf)
conf.close()

ScoperSingle

  • check a single URL (provide a string)
#s = ScoperSingle(config="/path/to/config.json", url="http://test.google.com/admin/stuff") # pass in a string path to the config file
s = ScoperSingle(config=c, url="http://test.google.com/admin/stuff") # note "c" is the config loaded above
print(s.output) # single dict
print(s.json) # single JSON string
print(s.color) # single colorized string
# if passing in a dict for the config, loop over a list of URLs etc while only opening the config once
  • loop over multiple URLs "inputUrls" and process them one at a time
for i in inputUrls:
	#sss = ScoperSingle(config="/path/to/config.json", url="http://test.google.com/admin/stuff") # pass in a string path to the config file
	sss = ScoperSingle(config=c, url="http://test.google.com/admin/stuff") # note "c" is the config loaded above
	print(sss.output) # single dict
	print(sss.json) # single JSON string
	print(sss.colors) # single colorized string

ScoperList

  • bulk-process multiple URLs (provide a list)
l = ScoperList(config=c, urls=inputUrls) # note "c" is the config loaded above, inputUrls is a list object
# dict object, NOT the same format as ScoperSingle
print(l.output)
# JSON object, NOT the same format as ScoperSingle
print(l.json)
# generator, dict output in the SAME format as ScoperSingle
for x in l.output_generator():
	print(x)
# generator, JSON output in the SAME format as ScoperSingle
for x in l.json_generator():
	print(x)
# large colorized string with newline characters for on-screen viewing
print(l.color)

example output

example scoper output

Release Notes

  • v1.1.0
    • major overhaul to streamline code
    • made output functions in ScoperList into generators
    • fixed some logic that determines inside/outside of scope
  • v1.0.21
    • simplified import structure
    • minor typo fixes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scoper-1.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scoper-1.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file scoper-1.1.0.tar.gz.

File metadata

  • Download URL: scoper-1.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9

File hashes

Hashes for scoper-1.1.0.tar.gz
Algorithm Hash digest
SHA256 27b921d8d41506fceb776c92a738bc0353da2b4b41a04b58f879fa4f685a7312
MD5 494b1ef25791969e667d5cb4eb8e9544
BLAKE2b-256 e92f4b4fe4e862084293ea2413bb0e54c08127f7bea95d9b6b240a58a50bfacb

See more details on using hashes here.

File details

Details for the file scoper-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: scoper-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9

File hashes

Hashes for scoper-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ca28c3f245015893482b64b48333fc9e533117e8721359291ebb5b959db3240
MD5 055ed65830b982f527a67b5e8f5a709e
BLAKE2b-256 ea2c5ad0b17f725da66afe0cffccfd857e48d4c43811773b06e6d960c8a359a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page