{"id":18562502,"url":"https://github.com/root4loot/scope","last_synced_at":"2025-05-15T17:35:58.076Z","repository":{"id":192580338,"uuid":"673312244","full_name":"root4loot/scope","owner":"root4loot","description":"Go library for managing scopes of hosts and IPv4 addresses","archived":false,"fork":false,"pushed_at":"2025-03-02T02:13:47.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T03:21:00.703Z","etag":null,"topics":["scope"],"latest_commit_sha":null,"homepage":"","language":"Go","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/root4loot.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-01T10:51:15.000Z","updated_at":"2025-03-02T02:13:50.000Z","dependencies_parsed_at":"2024-12-26T11:25:33.658Z","dependency_job_id":"6c167810-f3e6-4cc5-8e62-3d3eab5f0b0a","html_url":"https://github.com/root4loot/scope","commit_stats":null,"previous_names":["root4loot/goscope","root4loot/scope"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root4loot%2Fscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root4loot%2Fscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root4loot%2Fscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root4loot%2Fscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/root4loot","download_url":"https://codeload.github.com/root4loot/scope/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254388436,"owners_count":22063054,"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":["scope"],"created_at":"2024-11-06T22:09:54.961Z","updated_at":"2025-05-15T17:35:58.059Z","avatar_url":"https://github.com/root4loot.png","language":"Go","readme":"# scope\n\nSimple library for managing scopes of hosts and IPv4 addresses, ideal for penetration testing tools and other network-related Go applications.\n\n## Installation\n\n```bash\ngo get github.com/root4loot/scope@latest\n```\n\n## Simple Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/root4loot/scope\"\n)\n\nfunc main() {\n\t// Initialize a new scope instance\n\tsc := scope.NewScope()\n\n\t// Explicit scope mode: Only defined includes are in scope\n\tsc.AddInclude(\"example.com\")\n\tsc.AddInclude(\"192.168.1.1\")\n\n\t// Add excludes\n\tsc.AddExclude(\"example.com:8080\")\n\tsc.AddExclude(\"http://192.168.1.1\")\n\n\t// Check if a domain is in scope\n\tfmt.Println(sc.IsInScope(\"example.com\"))       // Output: true\n\tfmt.Println(sc.IsInScope(\"example.com:8080\"))  // Output: false\n\n\t// Check if an IP is in scope\n\tfmt.Println(sc.IsInScope(\"192.168.1.1\"))        // Output: false\n\tfmt.Println(sc.IsInScope(\"10.0.0.1\"))           // Output: true\n\n\t// Implicit scope mode: Everything is in scope unless explicitly excluded\n\tsc2 := scope.NewScope()\n\tsc2.AddExclude(\"blocked.com\")\n\tfmt.Println(sc2.IsInScope(\"random.com\"))       // Output: true\n\tfmt.Println(sc2.IsInScope(\"blocked.com\"))     // Output: false\n\n\t// Get active scope\n\tactiveScope := sc.GetScope()\n\tfmt.Printf(\"Active scope: %v\\n\", activeScope)\n}\n```\n\n### **Scope Behavior**\n- If no includes are defined, **everything is in scope** unless explicitly excluded.\n- If includes are defined, only those targets are in scope, and everything else is out of scope by default.\n- Exclusions always take priority over inclusions.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot4loot%2Fscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froot4loot%2Fscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot4loot%2Fscope/lists"}