Giter Club home page Giter Club logo

scoper's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.