Git Product home page Git Product logo

xhttp's Introduction

XHTTP

This is a simple command line utility that allows you to check if a given list of domains and ports are open or closed. It uses the aiohttp library to asynchronously check the ports, making it much faster than a traditional synchronous approach.

Installation

To use this utility, you will need to have Python 3.5 or above and aiohttp library installed. You can install aiohttp by running the following command:

pip install aiohttp

Usage

You can run the script using the following command:

python xhttp.py -d domain1.com domain2.com -p 80 443 -t 5 -e json -o results.json

The script accepts the following arguments:

Argument Required Description
-d, --domains No List of domains to check.
-f, --file No File containing a list of domains, one per line.
-p, --ports No Ports to check. Default: 80 and 443.
-t, --timeout No Timeout for each request. Default: 5 seconds.
-e, --format No Format to export the results. Default: "text".
-o, --output No File to save the results.
-s, --secure No Check for HTTPS connections. Default: False.
-b, --banner No Get banner from response. Default: False.

You can provide either the -d or -f argument, but not both.

Examples

Check ports 80 and 443 on the domains example1.com and example2.com and export the results as text:

python xhttp.py -d example1.com example2.com -p 80 443

Check ports 80, 443, and 22 on the domains in domains.txt and export the results as json:

python xhttp.py -f domains.txt -p 80 443 22 -e json

Check ports 80 and 443 on the domains example1.com and example2.com and export the results as json and save the result in results.json:

python xhttp.py -d example1.com example2.com -p 80 443 -e json -o results.json

Check ports 80 and 443 on the domains example1.com and example2.com and export the results as json and save the result in results.json and also check for secure flag in http headers

python xhttp.py -d example1.com example2.com -p 80 443 -e json -o results.json -s 

Features

  • Asynchronously check for open connections on multiple domains and ports using the asyncio and aiohttp libraries.
  • Retrieve banner from response when specified.
  • Option to use HTTPS connections.
  • Print or save results in either text or JSON format.
  • Read list of domains from a file.
  • Use of argparse library for easy customization via command-line arguments.
  • Default timeout and ports provided.
  • Suitable for bug hunters.
  • Easy to use and customize.
  • Efficient and fast.
  • Can be used as a security tool.

License

This utility is released under the MIT License.

xhttp's People

Contributors

chmodx 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.