Skip to content

Python-based port monitoring tool built in Termux/Kali. Logs real-time status changes of common network ports. python, cybersecurity, termux, port-scanning, linux

License

Notifications You must be signed in to change notification settings

okedeleoea/portscan_event

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Python-Based Network Port Monitoring Tool

Overview

This project is a Python-based network port monitoring tool designed to continuously track the status of commonly used TCP ports and log real-time changes.

The tool simulates a Security Operations Center (SOC) monitoring use case by detecting when services unexpectedly open or close on a host system.

Why This Project Matters

In real-world environments, attackers often expose new services or open ports after gaining access. Continuous monitoring helps security teams quickly detect these changes.

This tool demonstrates:

  • Defensive security thinking
  • Python automation for cybersecurity
  • Real-time change detection
  • SOC-style monitoring logic

Features

  • Monitors common TCP ports (e.g., 22, 80, 443, 3306)
  • Logs port status changes (OPEN ↔ CLOSED)
  • Runs in Linux and Termux environments
  • Lightweight and easy to extend

Technologies Used

  • Python 3
  • Linux / Termux
  • Socket programming
  • Logging mechanisms

Example Use Case

  • Detect unauthorized service exposure
  • Monitor system hardening effectiveness
  • Support incident response investigations
  • Baseline vs deviation analysis

Skills Demonstrated

  • Python scripting for security
  • Network fundamentals
  • Continuous monitoring
  • Defensive cybersecurity practices
  • Linux command-line usage

πŸ“‚ Project Structure projects/ β”œβ”€β”€ bin/ # Executable scripts (Python, Bash) β”œβ”€β”€ logs/ # Output logs from scans β”œβ”€β”€ config/ # Configuration files and backups β”œβ”€β”€ notes/ # Documentation and markdown notes └── tests/ # Experimental code or temporary files

πŸš€ Usage

  1. Clone the repository: bash git clone https://github.com/okedeleoea/portscan_event.git cd portscan_event

  2. Run the script: bash python3 bin/portscan_event.py

  3. View logs: bash tail -f logs/ports_event.log

πŸ“– Example Output 2026-01-15 10:59:00: Port 22 (SSH) changed to CLOSED 2026-01-15 10:59:00: Port 80 (HTTP) changed to CLOSED 2026-01-15 10:59:00: Port 443 (HTTPS) changed to CLOSED 1000229079 1000229066 1000229034 1000229026

Future Improvements

  • Email or Telegram alerts
  • JSON/CSV log export
  • Configurable port lists
  • Integration with SIEM tools

✨ Author Olanrewaju Emmanuel Okedele
Learning by doing β€” exploring Linux, Python, and cybersecurity through hands-on projects.

Disclaimer

This tool is intended for educational and defensive security purposes only.

About

Python-based port monitoring tool built in Termux/Kali. Logs real-time status changes of common network ports. python, cybersecurity, termux, port-scanning, linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published