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



   516

Port scanning python script

by oak - 01 October, 2024 - 07:40 PM
This post is by a banned member (oak) - Unhide
oak  
Supreme
1.695
Posts
1.492
Threads
2 Years of service
#1
(This post was last modified: 01 October, 2024 - 07:46 PM by oak. 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
1.082
Posts
609
Threads
3 Years of service
#2
can this scan for nearby hoes
Need something coded quickly and professionally, perhaps an automation?
Telegram | Discord


luka loves you [Image: pepelove.png]
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
17
Posts
0
Threads
#5
ty
This post is by a banned member (mohammad1542) - Unhide
129
Posts
0
Threads
1 Year of service
#6
tnx bro

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: