Skip to main content

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

Metadata

Release files for scoper 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scoper 1.1.0
File Size Uploaded
scoper-1.1.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scoper 1.1.0
File Interpreter ABI Platform
scoper-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / scoper-1.1.0.tar.gz

Download URL scoper-1.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
27b921d8d41506fceb776c92a738bc0353da2b4b41a04b58f879fa4f685a7312
BLAKE2b-256 checksum
How to use checksums
e92f4b4fe4e862084293ea2413bb0e54c08127f7bea95d9b6b240a58a50bfacb
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / scoper-1.1.0-py3-none-any.whl

Download URL scoper-1.1.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ca28c3f245015893482b64b48333fc9e533117e8721359291ebb5b959db3240
BLAKE2b-256 checksum
How to use checksums
ea2c5ad0b17f725da66afe0cffccfd857e48d4c43811773b06e6d960c8a359a5
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.21

2 release files

1.0.0

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