Scanner.py is a Python script that allows you to scan a network for open ports on specified IP addresses or hostnames. It utilizes the socket
library in Python to establish connections with the target hosts and check for open ports.
The program is dockerized, meaning it is packaged as a Docker container along with all the necessary dependencies and services. The Dockerfile contains the instructions for building the container and specifying the services that should be running inside it.
- Scans IP addresses or hostnames
- Provides detailed information about open ports, including the service running on each port
- Install Docker if you haven't already.
- Clone or download the repositories Swit-Scanner and DirSearch to your local machine in the same folder.
- Open a terminal or command prompt and build the Docker container from docker-compose.yml using the following command:
docker compose up -d
- Run the container if they are not runnig already. You can find all the necessary from Docker.
- Run the script using the following command:
Replace
python or python3 scanner.py [options] [targets]
[options]
with any desired command-line options (e.g.,-wpscan-run -wpscan-url
to run the wpscan service) andtargets
with the IP addresses and its hostname you want to scan (e.g.,-wpscan-url
to run the wpscan for the specific url) - Wait for the program to complete the scanning process.
- Review the output to see the results of the scan.
You would be possible to find complete documentation in DirSearch. However these are quick steps to run this service:
- Clone repository DirSearch.
- python3 dirsearch.py -u https://target I have already implemented this service which in the following you are able to find out how it works in my program.
The result saves in the dirsearch/reporst or ./reports file.
You would be possible to find complete documentation in Swit-Scanner. However these are quick steps to run this service:
- Clone repository Swit-Scanner.
- cd swit-scanner
- bash installer.sh
sudo bash repository.sh
./swit-scanner
bash swit-scanner
The result saves in the swit-scanner file.
-list-containers
: Return the list of docker running containers that contain the services. This runs withouttargets
.-apache-version
: This command has to you the version of Apache webserver. You have to use the namd/container id that your service is running to return its version. You have to use url target after this command using `` command.-mysql-version
: This command has to you the version of MySQL. You have to use the namd/container id that your service is running to return its version.-wordpress-version
: This command has to you the version of Wordpress. You have to use the namd/container id that your service is running to return its version.-phpmyadmin-version
: This command has to you the version of phpMyAdmin. You have to use the namd/container id that your service is running to return its version.-wpscan-run
: Start scan all the possibple vulnerability for WordPress. You have to use url target after this using-wpscan-url
command (e.g.,-wpscan-run -wpscan-url http://localhost:8080
).-dirsearch-run
: Start scan all the files in target url. It scans and gives you all the files existing in the website wth their response number (/usr/app/test.txt --> 200). You have to use url target after this using-dirsearch-url
command.-vul-services
: By passing it, you have to enter the name of services then their version to give return the vulnerabilities for that service.
To scan ports 80 on the host localhost
, run the following command:
python or python3 scanner.py -wpscan-run -wpscan-url http://localhost:8080