{"id":20827635,"url":"https://github.com/bonifield/scoper","last_synced_at":"2025-05-07T21:04:46.549Z","repository":{"id":57464543,"uuid":"338980493","full_name":"bonifield/scoper","owner":"bonifield","description":"test a single URL, or a list of URLs, against a Burp Suite-style JSON configuration file to determine scope","archived":false,"fork":false,"pushed_at":"2021-05-27T18:08:34.000Z","size":198,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T21:04:40.247Z","etag":null,"topics":["bug-bounty","bug-hunting","burp","burpsuite","json","networking","penetration-testing","python","python3","scope"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bonifield.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-15T05:53:30.000Z","updated_at":"2022-09-16T21:49:53.000Z","dependencies_parsed_at":"2022-08-31T02:00:14.032Z","dependency_job_id":null,"html_url":"https://github.com/bonifield/scoper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonifield%2Fscoper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonifield%2Fscoper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonifield%2Fscoper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonifield%2Fscoper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bonifield","download_url":"https://codeload.github.com/bonifield/scoper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954432,"owners_count":21830903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bug-bounty","bug-hunting","burp","burpsuite","json","networking","penetration-testing","python","python3","scope"],"created_at":"2024-11-17T23:12:35.598Z","updated_at":"2025-05-07T21:04:46.519Z","avatar_url":"https://github.com/bonifield.png","language":"Python","readme":"# scoper\ntest a single URL, or a list of URLs, against a Burp Suite-style JSON configuration file to determine in/out-of-scope status\n\n## installation ([GitHub](https://github.com/bonifield/scoper) / [PyPi](https://pypi.org/project/scoper/))\n```\npip install scoper\n```\n\n## importing and loading the external Burp-style configuration file\n- imports and loading the configuration file in your script\n```\nimport json\nfrom scoper import ScoperList, ScoperSingle\nwith open(\"test-burp-config.json\", \"r\") as conf:\n\tc = json.load(conf)\nconf.close()\n```\n\n## ScoperSingle\n- check a single URL (provide a string)\n```\n#s = ScoperSingle(config=\"/path/to/config.json\", url=\"http://test.google.com/admin/stuff\") # pass in a string path to the config file\ns = ScoperSingle(config=c, url=\"http://test.google.com/admin/stuff\") # note \"c\" is the config loaded above\nprint(s.output) # single dict\nprint(s.json) # single JSON string\nprint(s.color) # single colorized string\n# if passing in a dict for the config, loop over a list of URLs etc while only opening the config once\n```\n- loop over multiple URLs \"inputUrls\" and process them one at a time\n```\nfor i in inputUrls:\n\t#sss = ScoperSingle(config=\"/path/to/config.json\", url=\"http://test.google.com/admin/stuff\") # pass in a string path to the config file\n\tsss = ScoperSingle(config=c, url=\"http://test.google.com/admin/stuff\") # note \"c\" is the config loaded above\n\tprint(sss.output) # single dict\n\tprint(sss.json) # single JSON string\n\tprint(sss.colors) # single colorized string\n```\n\n## ScoperList\n- bulk-process multiple URLs (provide a list)\n```\nl = ScoperList(config=c, urls=inputUrls) # note \"c\" is the config loaded above, inputUrls is a list object\n# dict object, NOT the same format as ScoperSingle\nprint(l.output)\n# JSON object, NOT the same format as ScoperSingle\nprint(l.json)\n# generator, dict output in the SAME format as ScoperSingle\nfor x in l.output_generator():\n\tprint(x)\n# generator, JSON output in the SAME format as ScoperSingle\nfor x in l.json_generator():\n\tprint(x)\n# large colorized string with newline characters for on-screen viewing\nprint(l.color)\n```\n\n## example output\n![example scoper output](https://github.com/bonifield/scoper/raw/main/images/example-scoper-output.PNG)\n\n### Release Notes\n- v1.1.0\n\t- major overhaul to streamline code\n\t- made output functions in ScoperList into generators\n\t- fixed some logic that determines inside/outside of scope\n- v1.0.21\n\t- simplified import structure\n\t- minor typo fixes\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonifield%2Fscoper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonifield%2Fscoper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonifield%2Fscoper/lists"}