Socket
Socket
Sign inDemoInstall

sitesniffer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sitesniffer

This is a Python script that can extract various information about a website, including its IP address, SSL certificate information, domain information, page load time, and other useful insights.


Maintainers
1

Site Sniffer in Python 🐽

PyPi version Python 3.11 PyPi downloads Github commits Github contributors Code size License: MIT

Site Sniffer is a Python package designed to extract information about a website by providing its URL. It is useful for individuals who need to perform website analysis, including web developers, SEO specialists, and website owners. The package extracts various details such as the IP address, HTTP status code, SSL certificate information, domain registration details, load time, meta description, keywords, and a list of links on the page.

Installation

Install sitesniffer with pip:

pip install sitesniffer

Alternativly:

pip install git+https://github.com/thisisjsimon/SiteSniffer.git

Usage

Make sure that you have installed Python 3.11 before proceeding.

To use SiteSniffer, you need to import it first:

from sitesniffer import SiteSniffer

Then, create an instance of the SiteSniffer class by providing the URL of the website you want to analyze:

sniffer = SiteSniffer('https://example.com')

You can then call the methods of the SiteSniffer object to get various details about the website:

print(sniffer.ip_address())
print(sniffer.domain_info())
print(sniffer.status_code())
# See docs for full list

Each of the methods in this package returns the corresponding detail of the website. For example, get_ip_address() returns the IP address of the website.

Example

from sitesniffer import SiteSniffer

sniffer = SiteSniffer('https://google.com')
print(sniffer.ip_address())

Output

'142.250.185.110'

Essential Python Libraries for Web Scraping and HTTP Requests

The following Python libraries are essential for working with the sitesniffer package:

# standard library
import re
import socket
import ssl
import time
import typing
import urllib.parse
import dataclasses

# third party
import bs4
import idna
import requests
import whois

Docs

The defined functions included in SiteSniffer

Function NameFunction Description
extract_protocolExtracts the protocol from the URL.
extract_hostnameExtracts the hostname from the URL.
extract_pathExtracts the path from the URL.
ip_addressReturns the IP address of the domain.
domain_infoReturns the domain information for the website.
status_codeReturns the HTTP status code of the website.
ssl_infoReturns the SSL certificate information for the website.
load_timeReturns the website's load time.
linksReturns a list of links found on the website.
is_mobile_friendlyChecks if the website is mobile-friendly.
has_responsive_designChecks if the website has a responsive design.
has_cookiesChecks if the website uses cookies.
has_google_analyticsChecks if the website has Google Analytics installed.
page_meta_descriptionReturns the website's meta description.
has_meta_descriptionChecks if the website has a meta description.
page_keywordsReturns the website's keywords.
has_keywordsChecks if the website has keywords.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc