Demonstrates possible way to identify services running at client workstation. The tool makes request to range of ports to identify services running on that port or not.
- Measure time before sending request to port.
- Measure time took to send headers
- Measure time took to send body
- Calculate an average time took for sending headers and response body.
- If the average response time is above or equal to 100 Microseconds, assume there is any service running on port.
The strategy is inspired from similar well-known tool JS-Recon.
make install
Make sure npm is installed. This command will install npm based dependencies.
make build
Will create an output
directory. Open the file index.html
at your browser.
make run
It will run start the HTTP server on port 8080
. Make sure you have ran make build
to get output of latest code.
docker run --rm --port 8080:8080 jaysinhp/javascript-port-scanner:latest
Above command will fetch the latest image from the Docker hub. You can access the tool at port http://localhost:8080
. Make sure the port 8080
is empty.
make javascript-lint
Will lint source/assests/js/main.js
file against common Javascript
conventions.
make html-lint
Will lint source/html/index.html
file against common HTML5 based conventions.
make docker-build
It command will make the build of the docker image. Make sure [Docker][docker] is installed.
make docker-run
It will start the container and bind on port 8080
of the host.
Tests are written in Selenium wrapper of Python.
Install Pipenv tool to create virtual-environment. Locate to
end-to-end-tests
directory. Make sure Selenium is installed.
pipenv shell
Use this command to activate virtual-environment prioer to running end to end tests.
pipenv install
Run this command once to install all the Python dependencies.
make test-end-to-end
This command will run bunch of functional tests on the tool. Make sure the tool
is running at http://localhost:8080
. You can find instrucions to run the tool.
You can override the target host and port values by creating environment
variables TARGET_HOST
and TARGET_PORT
respectively.