Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

NetWarn 🚀

Perl Icon Network Icon Security Icon Terminal Icon Telegram Icon

NetWarn is a sophisticated Perl script designed to enhance your network security by scanning server ports and sending real-time alerts via Telegram. Tailored for IT professionals and businesses aiming to fortify their network monitoring and security protocols.


🎯 Features

  • 🔍 Single & Bulk Scanning: Effortlessly scan individual servers or multiple servers listed in a file.
  • 📲 Telegram Notifications: Receive detailed, real-time updates about open ports directly on Telegram.
  • ⏱️ Customizable Intervals: Adjust scan intervals to suit your monitoring needs (default is 24 hours).
  • 🌈 Color-Coded Output: Enjoy clear, color-enhanced terminal output for easy readability.

🚀 Why NetWarn?

  • ⚡ Real-Time Monitoring: Quickly identify open ports and potential security vulnerabilities on your servers.
  • 🔧 Flexible Configuration: Customize your scan settings to fit your specific requirements.
  • 📈 Easy Integration: Receive updates in your Telegram chat, minimizing the need for constant terminal checks.
  • 🔍 Comprehensive Coverage: Detailed port descriptions and automatic recurring scans ensure thorough monitoring.

📦 Installation

1. Clone the Repository

git clone https://github.com/yourusername/netwarn.git
cd netwarn

2. Install Required Perl Modules

cpan IO::Socket::INET
cpan Getopt::Long
cpan Time::HiRes
cpan LWP::UserAgent
cpan JSON

🛠️ Usage

Command-Line Options

  • -s <server>: Scan a single server.
  • -f <file>: Scan servers from a file (one per line).
  • -i <interval>: Set scan interval in seconds (default is 86400 seconds).

Examples

  • Single Server Scan:

    perl netwarn.pl -s example.com
  • Bulk Scan from File:

    perl netwarn.pl -f servers.txt
  • Custom Interval Scan:

    perl netwarn.pl -f servers.txt -i 3600

⚙️ Configuration

  • Telegram Bot Setup:

    Update your Telegram bot token and chat ID in the script:

    my $TELEGRAM_BOT_TOKEN = 'your_bot_token';
    my $TELEGRAM_CHAT_ID   = 'your_chat_id';
  • Port Descriptions:

    Modify the %port_descriptions hash to update or add port descriptions as needed.


🖼️ Example Output

Terminal Output

[i] Scanning server: example.com
[+] Port 80 (HTTP) is open.
[+] Port 443 (HTTPS) is open.
[-] No other open ports found on example.com.

Telegram Notification

[info] : Scanning server: example.com

[+] Port 80: HTTP
[+] Port 443: HTTPS

[+] No other open ports found.

Upcoming Scan Notification

[+] Next scan in 23 hours, 45 minutes, 30 seconds

📢 Note

NetWarn is an educational project. For customization requests or specific tool requirements, please reach out to me directly.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

👤 Author

Lunar Lumos
Contact Me | GitHub Profile


About

NetWarn is a sophisticated Perl script designed to enhance your network security by scanning server ports and sending real-time alerts via Telegram. Tailored for IT professionals and businesses aiming to fortify their network monitoring and security protocols.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages