Skip to content

50Fifty/website-analyzer-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Website Analyzer Flask App Python 3.11.2 License Status

A Flask-based service to retrieve domain-specific information.

Table of Contents

  1. Features
  2. Dependencies
  3. Setup
  4. Usage
  5. Running the Server
  6. Limitations and Caveats
  7. Testing
  8. License

Features

  1. Query domain info via a GET request.
  2. Interactive WebSocket for domain data.
  3. Built-in URL validation.
  4. Multi-threaded for concurrent requests.

Dependencies

  1. Python 3.11.2
  2. Refer to requirements.txt for the full list of dependencies.

Setup

  1. Ensure Python is installed.
  2. Create a virtual environment: python -m venv venv
  3. Install necessary packages in the virtual environment: pip install -r requirements.txt
  4. Get an API key from https://www.whoisxmlapi.com/.
  5. Set the environment variable (or in the .env file) API_KEY to the API key.

Usage

RESTful Endpoint

Retrieve domain info: GET /?url=<DOMAIN_NAME>

Replace <DOMAIN_NAME> with the target domain.

WebSocket Service

  1. Connect to the /ws endpoint.
  2. Initiate a domain session with a JSON containing the url key.
  3. Send operations using the operation key in the message:
    • get_info for basic details.
      {
          "operation": "get_info"
      }
      
    • get_subdomains for subdomains.
      {
          "operation": "get_subdomains"
      }
      
    • get_asset_domains for asset domains.
      {
          "operation": "get_asset_domains"
      }
      

Running the Server

Launch the server with:

python <filename>.py Access at http://localhost:5000/.

Limitations and Caveats

No authentication or rate-limiting; not advisable for production usage. Errors are JSON-formatted with the error key.

Testing

Run the test suite with: python -m pytest

License

Open source. See the LICENSE file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages