Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



 343

Port scanning python script

by sehays - 01 October, 2024 - 07:40 PM
This post is by a banned member (sehays) - Unhide
sehays  
Supreme
1.484
Posts
1.293
Threads
1 Year of service
#1
(This post was last modified: 01 October, 2024 - 07:46 PM by sehays. Edited 2 times in total.)

Hidden Content
You must register or login to view this content.



Running the Script:
Save the script as port_scanner.py and run it from the command line:


Hidden Content
You must register or login to view this content.



For example, to scan a host 192.168.1.1 for open ports between 1 and 1000, use:


Hidden Content
You must register or login to view this content.



Key Points:
Target: The IP or hostname of the machine you are scanning.
Ports: You can define a port range, e.g., from port 1 to 65535 (default if no range is specified).
Dependencies:
This script uses only the built-in Python libraries (socket, argparse, and datetime), so there are no external dependencies.

edit: 
The above quote has been enhanced with three other features:
multi-threading
logging and
banner grabbing capabilities


Hidden Content
You must register or login to view this content.



Running the Script:

Save the script as enhanced_port_scanner.py and run it from the command line:


Hidden Content
You must register or login to view this content.



For example, to scan ports from 1 to 1000 on the target 192.168.1.1 with 20 threads, use:


Hidden Content
You must register or login to view this content.



Dependencies:
No external dependencies are required. This script only uses Python’s built-in libraries (socket, argparse, threading, and queue).

leaving a like is much appreciated and help me to keep publishing threads.
This post is by a banned member (lukabff) - Unhide
lukabff  
Godlike
934
Posts
451
Threads
3 Years of service
#2
can this scan for nearby hoes
This post is by a banned member (Our0b0ros) - Unhide
Our0b0ros  
Registered
41
Posts
1
Threads
#3
ty
This post is by a banned member (wugwec) - Unhide
wugwec  
Registered
40
Posts
0
Threads
#4
working?
This post is by a banned member (tonifalco) - Unhide
tonifalco  
Registered
11
Posts
0
Threads
#5
ty

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)