(This post was last modified: 2 weeks ago by Sfinx.)
Hello guys.i made this little script with python.it is pinging site and then scanning it.i hope you like it.
Code:
import os
import nmap3

os.system('clear')

#print("#" * 60)
ip_to_check = input("IP to Check: ")

if " " in ip_to_check:
    print("you can not use space!")
else:
    #pirnt("-" * 60)
    os.system("ping -c 4 {}".format(ip_to_check))

    #print("-" * 60)
    input("\nPress any Key to continue...")

    nmap = nmap3.Nmap()
    results = nmap.scan_top_ports(ip_to_check)

    print(results)

    input("\nPress any Key to continue...")

guys i forgot something...you must install nmap3 module first.
Code:
pip install python3-nmap

and then it will work :)