Skip to content

userIssa/Python-Based-Security-Automation-Toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Security Automation Toolkit

License: MIT Python Version Status

Overview

Python Security Automation Toolkit is a modular, command-line toolkit built with Python for automating common security reconnaissance and scanning tasks.
It is designed for educational purposes to help you learn about network programming, API integration, and security principles in Python.

⚠️ Ethical Use Disclaimer: This tool is intended for educational use only on systems you own or have explicit, written permission to test. Unauthorized scanning of networks or systems is illegal and unethical. The author is not responsible for misuse. Always act responsibly.


Table of Contents


Features

  • Port Scanner — Scans a target host for open TCP ports. Supports specific port lists (e.g. 80,443) and ranges (e.g. 1-1024).
  • Banner Grabbing — Identifies service versions running on open ports.
  • WHOIS Lookup — Fetches domain registration and contact information.
  • Interactive & Scriptable — Use interactively with prompts or script via command-line arguments.
  • File Output — Save scan results to a text file for analysis and record-keeping.
  • User-Friendly Interface — Built with Typer and enhanced with rich for a clean UI, progress bars, and colored output.

Installation

Clone the repository and install dependencies in a virtual environment.

# Clone the repository
git clone https://github.com/your-username/security-toolkit.git
cd security-toolkit

Create and activate a virtual environment:

# Linux / macOS
python3 -m venv venv
source venv/bin/activate

# Windows (PowerShell)
python -m venv venv
.\venv\Scripts\Activate.ps1

# Windows (cmd)
.\venv\Scripts\activate

Install required packages:

pip install -r requirements.txt

Usage

All commands are run through main.py. View the help menu for available commands and options:

python main.py --help

Port Scanning

Scan the top 1024 ports (default):

python main.py scan scanme.nmap.org

Scan specific ports:

python main.py scan 192.168.1.1 --ports 22,80,443

Scan and save output to a file:

python main.py scan example.com -o results.txt

Interactive Save Prompt: If you run a scan without the -o flag, the tool will display the results and then ask whether to save them.

WHOIS Lookup

Fetch domain information:

python main.py whois google.com

Example Output

Port scan (trimmed):

$ python main.py scan scanme.nmap.org
Scanning scanme.nmap.org (45.33.32.156)
Open ports:
 - 22/tcp  (ssh)        Banner: OpenSSH_7.4
 - 80/tcp  (http)       Banner: Apache/2.4.29 (Ubuntu)
 - 443/tcp (https)      Banner: nginx/1.14.0

Scan complete. 3 open ports found.

WHOIS (trimmed):

$ python main.py whois example.com
Domain Name: EXAMPLE.COM
Registrar: IANA
Creation Date: 1995-08-13
Registry Expiry Date: 2026-08-13
Name Servers: A.IANA-SERVERS.NET, B.IANA-SERVERS.NET
Registrant Country: US

Project Structure

security-toolkit/
├─ main.py              # Typer CLI entrypoint
├─ scanner/
│  ├─ __init__.py
│  ├─ port_scan.py      # Port scanning & banner grabbing logic
│  └─ whois.py          # WHOIS lookup wrapper
├─ utils/
│  ├─ output.py         # File saving & formatting helpers
│  └─ net.py            # Networking helpers
├─ requirements.txt
└─ README.md

Future Improvements

  • Subdomain Enumerator
  • DNS Record Lookup
  • IP reputation check via VirusTotal API
  • Basic vulnerability checks based on service banners

Contributing

Contributions are welcome. Please follow these guidelines:

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Commit your changes: git commit -m "Add my feature"
  4. Push to the branch: git push origin feat/my-feature
  5. Open a pull request describing your changes.

Please include tests and update the README with relevant usage examples for new features.


License

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

MIT License

Copyright (c) 2025 Your Name

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...

Acknowledgements

Built with: Typer, rich, and inspired by learning resources and community tools.


Contact

Maintainer: Issa (toluwanimioderinde@gmail.com)


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages