Skip to main content

PyIpBlocker

This Python script allows you to block and unblock IP addresses or domain names in the system's hosts file. It works by adding entries for specified IP addresses or domain names to redirect them to the loopback IP (127.0.0.1), effectively blocking them.

Features

  • Block IPs or Domains: Add entries to the hosts file to prevent access to specified IP addresses or domains.
  • Unblock IPs or Domains: Remove entries from the hosts file to restore access to specified IP addresses or domains.
  • Automatic Check: Before blocking, checks if an IP or domain is already blocked to avoid duplicate entries.
  • Error Handling: Provides informative error messages for permission issues and other exceptions.

Prerequisites

  • Python 3.6+: This script requires Python 3.6 or higher.
  • Administrator Privileges: Modifying the hosts file requires administrator or root privileges.

Installation

  1. From pypi !:
    pip install PyIpBlocker
    

Metadata

Release files for PyIpBlocker 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyIpBlocker 0.0.4
File Size Uploaded Provenance Actions
pyipblocker-0.0.4.tar.gz 3.9 kB Without provenance Details for pyipblocker-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PyIpBlocker 0.0.4
File Interpreter ABI Platform Actions
PyIpBlocker-0.0.4-py3-none-any.whl Python 3 none any Details for PyIpBlocker-0.0.4-py3-none-any.whl

Total release size: 8.2 kB

Release files / pyipblocker-0.0.4.tar.gz

Download URL pyipblocker-0.0.4.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
226519e3225bd93fb75878c2b2b36874688c12cfffeeb0df0358b29d78d9f38c
BLAKE2b-256 checksum
How to use checksums
5eb2755a92ae718869896f33b0d3ecfa5dc5ce146e367a5a9c6d0514bc3ec6f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release files / PyIpBlocker-0.0.4-py3-none-any.whl

Download URL PyIpBlocker-0.0.4-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5fddfe2a4ab0b0282cdbb513024a187c768938ddc7222953b8ed6c265b8f2d9
BLAKE2b-256 checksum
How to use checksums
8d373c894fabd2e5a61115d5eabb14605076b0857a65237ac80f421b48d8384b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Security for PyIpBlocker 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page