Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

ping with python

import subprocess

def main():
    host = input("Enter Host: ")
    packet = int(input("
Enter Packet: "))
    print("
")
    ping = subprocess.getoutput(f"ping -w {packet} {host}")
    print(ping)

main()
Source by github.com #
 
PREVIOUS NEXT
Tagged: #ping #python
ADD COMMENT
Topic
Name
3+1 =