Git Product home page Git Product logo

scopie's Introduction

README

Overview

This script is designed to update a list of subdomains to match a specified scope configuration. It filters the provided list of subdomains based on the hosts in the scope file and checks if the subdomains are alive by attempting to resolve the hostname to an IP address and connecting to the IP address on port 80 (HTTP) and 443 (HTTPS). The resulting list of alive subdomains is written to an output file.

Prerequisites

  • Python 3.5 or higher
  • argparse library
  • json library
  • re library

Usage

The script requires the following arguments to be passed:

--subs: path to a file containing a list of subdomains to check --scope: path to a JSON file containing the scope configuration --output: path to the output file to write the list of alive subdomains --timeout: (optional) timeout for the response in seconds (default: 5) Example usage: python scopie.py --subs subs.txt --scope scope.json --output alive_subs.txt --timeout 10

Inputs

Subdomains File

The --subs argument is used to specify the path to a file containing a list of subdomains to check. Each subdomain should be on a separate line. For example:

subdomain1.example.com
subdomain2.example.com
subdomain3.example.com

Scope File

The --scope argument is used to specify the path to a JSON file containing the scope configuration. The file should have the following format:

{
    "target": {
        "scope": {
            "include": [
                {
                    "host": "example.com"
                },
                {
                    "host": "subdomain1.example.com"
                }
            ]
        }
    }
}

The script will extract the hosts from the include section and use them to filter the subdomains.

Output File

The --output argument is used to specify the path to the output file to write the list of alive subdomains. If the file already exists, the script will append the new subdomains to the end of the file.

Outputs

The script will output a list of alive subdomains to the output file in the following format:

subdomain1.example.com
subdomain2.example.com

Options

The --timeout option is used to specify the timeout for the response in seconds. If not specified, the default timeout of 5 seconds will be used.

scopie's People

Contributors

tavgar avatar

Watchers

 avatar

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.