Skip to content
View AiricAlchemy's full-sized avatar

Block or report AiricAlchemy

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
AiricAlchemy/README.md

import subprocess

def ip_sweep(base_ip, start, end): """Performs an IP sweep within a given range.

Args: base_ip: The base IP address (e.g., '192.168.1'). start: The starting number for the last octet. end: The ending number for the last octet. """

active_ips = [] for i in range(start, end + 1): ip = f"{base_ip}.{i}" try: subprocess.check_output(["ping", "-c", "1", ip], timeout=1) active_ips.append(ip) print(f"{ip} is active") except subprocess.CalledProcessError: print(f"{ip} is inactive") except subprocess.TimeoutExpired: print(f"{ip} timed out")

return active_ips

if name == "main": base_ip = "192.168.1" start_ip = 1 end_ip = 254 active_ips = ip_sweep(base_ip, start_ip, end_ip) print("Active IPs:", active_ips)

Popular repositories Loading

  1. AiricAlchemy AiricAlchemy Public

    Config files for my GitHub profile.

    1

  2. copilot-codespaces-vscode copilot-codespaces-vscode Public

    1

  3. super-octo-lamp super-octo-lamp Public

    1

  4. git git Public

    Forked from git/git

    Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documen…

    C 1

  5. jubilant-octo-giggle jubilant-octo-giggle Public

  6. python-beginners python-beginners Public

    Forked from OpenTechSchool/python-beginners

    Workshop material for "Introduction to Programming with Python"

    Python