Solve Problems by Coding Solutions - A Complete solution for python programming
Python programt for finding ports opened in the website domain
import socket;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
result = sock.connect_ex(('www.example.com', port number))
if result == 0:
print ("Port is open")
else:
print ("Port is not open")
Python program to print date and time
import datetime;
print("Today Date & Time:\n");
print(datetime.datetime.today());
print("Today Date & Time:\n");
print(datetime.datetime.today());
Subscribe to:
Posts (Atom)