GithubHelp home page GithubHelp logo

fabriziosalmi / websites-monitor Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 3.0 336 KB

Websites monitoring via GitHub Actions (expiration, security, performances, privacy, SEO)

Python 100.00%
github-actions pagespeed pagespeed-insights pagespeed-insights-api performance performance-analysis performance-metrics performance-monitoring performance-testing content-security-policy domain-expiration headers-checker headers-security monitoring website websites certificate-monitoring ssl-expiry website-monitor website-monitoring

websites-monitor's Introduction

Websites Monitor

Project Description

This project aims to continuously monitor various aspects of specified websites. It runs a variety of checks, ranging from performance to security considerations. The GitHub Action is scheduled to run once per day, updating this README with the latest results.

Static Badge

How to Use

  1. Fork this repository.
  2. Add the websites you want to monitor in the websites.txt file, one per line.
  3. Enable GitHub Actions if not already enabled.
  4. The README will be automatically updated with the latest check results once a day.

Monitoring Checks

Create report

Check Type audiolibri.org get.domainsblacklists.com example.com
Domain breach ๐Ÿ”˜ ๐Ÿ”˜ ๐Ÿ”˜
Domain Expiration ๐ŸŸข (253 days left) ๐ŸŸข (341 days left) ๐ŸŸข (355 days left)
SSL Expiration ๐ŸŸข (80 days left) ๐ŸŸข (54 days left) ๐ŸŸข (191 days left)
DNS Blacklists (Spamhaus + Spamcop) ๐ŸŸข ๐ŸŸข ๐ŸŸข
DNS Blacklist (DomainsBlacklists) ๐ŸŸข ๐ŸŸข ๐ŸŸข
HSTS ๐ŸŸข ๐ŸŸข ๐Ÿ”ด
XSS Protection ๐ŸŸข ๐ŸŸข ๐Ÿ”ด
Redirect chains ๐ŸŸข ๐ŸŸ  ๐ŸŸข
Pagespeed Performances 98 99 100
Website Load Time ๐ŸŸข ๐ŸŸข ๐ŸŸข
Rate limited ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด
CDN ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด
Brotli ๐ŸŸข ๐Ÿ”ด ๐Ÿ”ด
Deprecated libs ๐ŸŸข ๐ŸŸข ๐ŸŸข
Client rendering ๐Ÿ”ด ๐Ÿ”ด ๐ŸŸข
Mixed content ๐Ÿ”ด ๐ŸŸข ๐ŸŸข
Content-Type headers ๐ŸŸข ๐ŸŸข ๐ŸŸข
Internationalization โšช โšช โšช
FLOC ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด
AMP ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด
Robots.txt ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด
Sitemap ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด
Favicon ๐ŸŸข ๐ŸŸข ๐Ÿ”ด
Alt Tags ๐ŸŸข ๐ŸŸข ๐Ÿ”ด
Open Graph Protocol ๐ŸŸข ๐Ÿ”ด ๐ŸŸข
Semantic Markup ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด
Ad and tracking ๐ŸŸข ๐ŸŸข ๐ŸŸข
Privacy-Protected Whois ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด
Privacy Exposure ๐Ÿ”ด ๐Ÿ”ด ๐ŸŸข

Last Updated: 2024-08-22 04:03:54

websites-monitor's People

Contributors

actions-user avatar fabriziosalmi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

websites-monitor's Issues

Check server software

import requests

def check_server_software(website):
    """
    Detect the web server software of the website.
    
    Args:
    - website (str): URL of the website to be checked.
    
    Returns:
    - str: "๐ŸŸข" if server software is suppressed or not easily identifiable,
           "๐Ÿ”ด" if server software is openly exposed,
           "โšช" for any errors.
    """

    try:
        response = requests.get(website)
        server_header = response.headers.get("Server")

        if server_header:
            print(f"Server software identified: {server_header}")
            return "๐Ÿ”ด"
        else:
            return "๐ŸŸข"

    except Exception as e:
        print(f"Error occurred: {e}")
        return "โšช"

print(check_server_software("https://example.com"))

v2

main.py

from datetime import datetime

# Import checks
from checks import (
    check_domain_breach, check_domain_expiration, check_ssl_cert, check_dns_blacklist,
    check_domainsblacklists_blacklist, check_hsts, check_xss_protection, check_redirect_chains,
    check_pagespeed_performances, check_website_load_time, check_rate_limiting, check_cdn,
    check_brotli_compression, check_deprecated_libraries, check_clientside_rendering,
    check_mixed_content, check_content_type_headers, check_internationalization, check_floc,
    check_amp_compatibility, check_robot_txt, check_sitemap, check_favicon, check_alt_tags,
    check_open_graph_protocol, check_semantic_markup, check_ad_and_tracking, check_privacy_protected_whois,
    check_privacy_exposure
)

# Initialize an error log
error_log = []


def log_error(message):
    """A simple function to log errors for later use."""
    error_log.append(message)
    print(message)  # This will also print the error in the console


# Read websites from external file
with open('websites.txt', 'r') as f:
    websites = [line.strip() for line in f.readlines()]

# Initialize Markdown report
report_md = "# Websites Monitor\n"

# Read the project description and usage instructions
with open('project_description.md', 'r') as f:
    report_md += f"{f.read()}\n"

with open('usage_instructions.md', 'r') as f:
    report_md += f"{f.read()}\n"

# Initialize the table
report_md += "\n## Monitoring Checks\n"
report_md += "| Check Type | " + " | ".join(websites) + " |\n"
report_md += "|------------|" + "---|" * len(websites) + "\n"

# List of check functions and their human-readable names
check_functions = [
    ("Domain breach", check_domain_breach),
    # ... [other checks]
    ("Privacy Exposure", check_privacy_exposure),
]

# Populate the table with check results
for check_name, check_func in check_functions:
    report_md += f"| {check_name} | "
    for website in websites:
        try:
            result = check_func(website)
            report_md += f"{result} | "
        except Exception as e:
            err_msg = f"Error occurred with {check_name} for {website}: {e}"
            log_error(err_msg)
            report_md += "โšช | "  # Add a default grey indicator for errors
    report_md += "\n"

# Timestamp
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
report_md += f"\n---\nLast Updated: {current_time}\n"

# Write the Markdown report to a file
with open("README.md", "w") as f:
    f.write(report_md)

# Exit with a non-zero code if errors were encountered
if error_log:
    exit(1)

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.