Python code for display incoming request from port 80 and port 443

Python code for display incoming request from port HTTPS and port HTTPS

#!/usr/bin/python

import os


try:
    treq443 = os.popen('sudo netstat -anp |grep 443 | wc -l').read()[:-1]
    req80 = os.popen('sudo netstat -anp |grep 80 | wc -l').read()[:-1]
    print("%s %s\r\n" % (treq443, req80))   
except IOError as ex:
    print ("I/O error({0}): {1}",ex)

Discover more from Soa Technology | Aditya Website Development Designing Company

Subscribe to get the latest posts sent to your email.



Leave a Reply

Discover more from Soa Technology | Aditya Website Development Designing Company

Subscribe now to keep reading and get access to the full archive.

Continue reading