Skip to main content

A package for scanning subdomains and collecting website information.

Project description

subweb

subweb is a Python package designed for finding subdomains of a given domain. It allows you to load subdomains from a file and check if they exist for a specific domain.

Features

  • Load subdomains from a text file.
  • Check if subdomains exist for a given domain.
  • Print only valid subdomains or handle both valid and invalid ones.
  • Easy to use and install.

Installation

pip install subweb

This will install the package along with the required dependencies.

Usage

You can use subweb in your Python scripts after installation.

Example 1: Print valid or wrong subdomains

This example checks subdomains for a domain and prints whether they are valid or wrong:

import subweb

# Load subdomains from a file
subdomains = subweb.load_subdomains('subdomains.txt')

# Find subdomains for the given domain
scanning_result = subweb.find_subdomains('example.com', subdomains)

# Loop through results and print valid or wrong subdomain URLs
for subdomain_url, result in scanning_result.items():
    if result == 'valid':
        print(f"found_subdomain: {subdomain_url}")
    else:
        print(f"wrong subdomain: {subdomain_url}")

Example 2: Print only valid subdomains

This example checks subdomains for a domain and prints only the valid ones:

import subweb

# Load subdomains from a file
subdomains = subweb.load_subdomains('subdomains.txt')

# Find subdomains for the given domain
scanning_result = subweb.find_subdomains('example.com', subdomains)

# Loop through results and print only valid subdomain URLs
for subdomain_url, result in scanning_result.items():
    if result == 'valid':
        print(f"found_subdomains: {subdomain_url}")

Example 3: Custom subdomain list in the code

If you prefer, you can also define the subdomains directly in your script instead of loading them from a file:

import subweb

# Define subdomains directly
subdomains = ['www', 'mail', 'dev', 'help']

# Find subdomains for the given domain
scanning_result = subweb.find_subdomains('example.com', subdomains)

# Print the results
for subdomain_url, result in scanning_result.items():
    if result == 'valid':
        print(f"found_subdomains: {subdomain_url}")
    else:
        print(f"wrong subdomain: {subdomain_url}")

License

This project is licensed under the MIT License. See the LICENSE file for more details.


Made with ❤️ by Fidal and ByteBreach.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

subweb-2.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

subweb-2.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file subweb-2.0.1.tar.gz.

File metadata

  • Download URL: subweb-2.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for subweb-2.0.1.tar.gz
Algorithm Hash digest
SHA256 61d7b9cdcf3ebc02791b1375e721760c839762b3ca9de8c190644afb832f3ada
MD5 5b6b40bde924af1b03e82f55a2799dd3
BLAKE2b-256 a6f0dcbc1afaa43bbbce576d39dc088c6d9ae68690ed0a293be25566ab2b6de8

See more details on using hashes here.

File details

Details for the file subweb-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: subweb-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for subweb-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 85d4198a8c7c40b629ce396cd19aac155380e2009186b143a0efc8a6ffffb86e
MD5 70c032a677d2a0ed3ee3bdc940431847
BLAKE2b-256 e5e85605bea29eda3db18e108cab775d8acf8a2cfd695684efd23f0bcaf00f5e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page