STEAM GROUP
水たまりハック - ハック
STEAM GROUP
水たまりハック - ハック
0
IN-GAME
0
ONLINE
Founded
9 June, 2023
Language
English
ABOUT 水たまりハック

Trash Aim

import subprocess

def ping_host(host_ip):
⠀⠀try:
⠀⠀⠀⠀ping_process = subprocess.Popen(
⠀⠀⠀⠀⠀['ping', '-c', '4', host_ip],
⠀⠀⠀⠀⠀stdout=subprocess.PIPE,
⠀⠀⠀⠀⠀stderr=subprocess.PIPE
⠀⠀⠀⠀)
⠀⠀⠀⠀ping_output, ping_error = ping_process.communicate()

⠀⠀⠀⠀if ping_process.returncode == 0:
⠀⠀⠀⠀⠀print(f"Host {host_ip} is reachable.")
⠀⠀⠀⠀else:
⠀⠀⠀⠀⠀print(f"Host {host_ip} is unreachable.")

⠀⠀⠀⠀# Print the ping output
⠀⠀⠀⠀print("Ping Output:")
⠀⠀⠀⠀print(ping_output.decode())

⠀⠀⠀# Print the ping error if any
⠀⠀⠀if ping_error:
⠀⠀⠀⠀⠀print("Ping Error:")
⠀⠀⠀⠀⠀print(ping_error.decode())

⠀⠀except Exception as e:
⠀⠀⠀print(f"An error occurred while pinging the host: {e}")

# Provide the IP address or hostname you want to ping
host_ip = "127.0.0.1"

ping_host(host_ip)
POPULAR DISCUSSIONS
VIEW ALL (2)
GROUP MEMBERS
Administrators
Members
0
IN-GAME
0
ONLINE
0 IN CHAT
Enter chat room
Founded
9 June, 2023
Language
English