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());