📅  最后修改于: 2022-03-11 14:46:58.176000             🧑  作者: Mango
import subprocess
def main():
host = input("Enter Host: ")
packet = int(input("\nEnter Packet: "))
print("\n")
ping = subprocess.getoutput(f"ping -w {packet} {host}")
print(ping)
main()