Skip to content

bL34cHig0/Python3-Pentesting-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python3-Pentesting-tools

Rudimentary python3 pentesting projects from FreeCodeCamp's Python for Penetration Testing Course.

1) Python 3 Port Scanner

This Python 3 script is a simple port scanner that allows you to scan a range of ports on a specified IP address. The script was created as part of a project to gain hands-on experience in using Python for real-world cybersecurity tasks. The original script was built by the course instructor (HackerSploit) and it is based on the "socket" module to provide basic port scanning functionality. As part of the project, I included small features and made a few tweaks such as port range, logo, platform compatibility, and error handling to the script to improve its functionality and usability.

Usage

I tested the script on Kali linux VM and Windows Server 2019 VM, and worked perfectly fine on both operating systems.

To use the Port Scanner on Kali, simply run:

sudo chmod +x PortScanner.py

Then run:

sudo python3 PortScanner.py

The script will prompt you to enter an IP address and a port range to scan. Once you have entered the required information, the script will scan the specified range of ports and output a message indicating whether each port is open or closed.

On Windows, run PortScanner.py or .\PortScanner.py in cmd. Disable Windows defender and firewall incase of Windows security measures that might prevent the script from being executed.

Port range format: x-y (ex: 80-100)

2) TCP Server & Client

This project provides two Python scripts that can be used for network communications; a TCP Server and Client script. The project is also part of FreeCodeCamp's "Python for Penetration Testing" course that I had completed and the original scripts was built by the course instructor (HackerSploit). I included small features and tweaks such as error handling, a log file, and a short usage description to the scripts. Also, the Server script can be used as a simple honeypot because it will log information about any connection attempts.

I tested both scripts on Kali linux VM and Windows Server 2019 VM and worked perfectly fine on both operating systems.

Server Script

The server script starts a server that listens on a specified port. It accepts incoming connections from clients and sends a confirmation message to each client that connects to the server.

Usage

To use the server script, run the following command:

python3 server.py --port <port_number>

Replace <port_number> with the port number you want the server to listen on. Use the -h or --help flag to display a short usage description.

Client Script

The client script connects to a server on a specified IP address and port. It receives a message from the server indicating if a connection is established or not and displays it on the screen.

Usage

To use the client script, run the following command:

python3 client.py --ip <ip_address> --port <port_number>

Replace <ip_address> with the IP address of the server and <port_number> with the port number the server is listening on. Use the -h or --help flag to display a short usage description.

Disclaimer

The Python scripts are intended for educational purposes only and should not be used for any malicious or illegal activities. Do not use the scripts to scan or test any network/system without proper authorization. The author and publisher of this code are not responsible for any damages or legal consequences that may arise from the use or misuse of this code. Use of this code is at your own risk and discretion.

About

Rudimentary python3 pentesting projects from FreeCodeCamp's "Python for Penetration Testing" Course.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages