Skip to content

Latest commit

 

History

History
 
 

Ports_Scan

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Port_Scan

A lot of times, a remote host, gets bound to a port and starts running a process on it. This is not only undesirable but also can be dangerous. I made a set of two scripts, in order to solve the mess. One to check the currently active ports, another one to kill the process running on them.

The Script uses psutil module to solve the purpose, unarguably the lsof package provided in Linux is way better. But as it is not cross platform, I have hardcoded using psutil.

Setup instructions

There are 2 scripts.

  1. Setup a Virtual Environment.
  2. Install dependencies using pip3 install -r requirements.txt
  3. Go through the comments and the interactive options.
  4. For ports_kill.py Sample - python3 ports_kill.py <port number>

Output

Sample Outputs -

  • ports_scan.py

Result

  • ports_kill.py

Result

Result

Author(s)

Made by Vybhav Chaturvedi