I am trying to ping a host using os.system('ping x.x.x.x -c 1')
and I'm trying to make an if statement incase if the ping doesnt work, such as, if the host disables icmp requests or the host was not found. The structure of code im looking for is the following:
if pingcommand == not working:
print("ICMP Not Working")
else:
print("Working")
(P.S I am ONLY asking to use os.system() NOT subproccess) Operating System: Kali Linux (Recent) Python Version: 3.9