Skip to main content

Website endpoint reconnaissance tool and rate limit tester that can bypass simple captchas and WAFs.

Project description

EndpointScanner: Website Endpoint Scanner and Rate Limit Tester For Websites (Version 7.3.1)

A fast automated website reconnaissance tool that extracts endpoints, files, and even external links from websites. Automates IDOR and broken access control vulnerability testing through replacing variables with 1 in endpoints. Has a built in rate limit tester that can test on any endpoint, and can bypass simple WAFs/captchas and client-side SPAs.

For Installation, please go to the Installation section below!

How it works

  • Uses curl_cffi and playwright-stealth to bypass simple captchas
  • Uses a fake path to test which are real paths and which are shells. (websites like SPAs give a lot of trouble to current tools)
  • Scrapes all .js and .xml files and <script> tags inside the html with a regex to find paths
  • Has a hardcoded set of paths that should never exist in a website to test. (e.g. .env.local, .git/config)
  • Differentiates paths by website endpoints, assets, redirects etc.
  • Autofills {id} variables in endpoints as '1' to test the endpoints (can reveal potential IDORs)
  • Checks server uptime and prints out JS Stack of the website
  • Has a rate limit tester by sending n requests to a certain endpoint
  • Can scan extra files like robots.txt for more endpoints
  • Also scans for assets like images with a flag to disable showing them

How to run

Command to run after installing (For installation, look for the 'Installation' section.):

Passable arguments:

Argument Short Form Description
target NIL URL
--local -l Pass this flag if the target is a local site like development-server, but is not a localhost/IP address.
--ratelimit -r Number of requests to send during the rate limit test. Default is 100.
--ratelimit-type -rt HTTP Method to use for the rate limit test. Defaults to GET.
--ratelimit-body -rb Payload data to send in request to use for POST, PATCH and PUT requests. If the custom payload contains double quotes, please use single quotes instead of double quotes to pass this flag.
--ratelimit-var -rv Variable in payload data (e.g. {X}) to use.
--ratelimit-header -rh Custom headers. Must be seperated by a pipe(|), or newlines. Example use: Cookies: {ExampleCookie: example} | Accept: application/json, text/plain, /. If the custom header contains double quotes, please use single quotes instead of double quotes to pass this flag.
--force NIL Mandatory flag to pass if doing a rate limit test with over 2500 requests using a non-GET HTTP method. Has no short form flag.
--testpath -t Endpoint to test for rate limiting.
--show-404s -s Show endpoints tested that returned a 404 or an SPA shell.
--disable-extra-files -d Disable scanning of extra structural mapping files (robots, sitemaps, manifests, etc.)
--show-media -m Include assets/media like images and fonts and videos in scan results
--show-prog -sp Print endpoints to the terminal one by one in real-time as they are found. Warning: Progress will show duplicate paths if endpoints are defined multiple times in the code. Use the flag -nd to remove duplicates from progress. Results will not contain duplicates.
--no-duplicate-prog -nd If --show-prog is passed, duplicate endpoints in progress will not be shown.
--output-file -o Save formatted results directly to a local text file.
--disable-og -do Disable code from showing the original endpoint with variables. Keeps output tidier. Will NOT remove original tag from progress if the --show-prog flag is present.
--tidy -ti Script will not show where it got extra endpoints from, and will not show if it is a client side route and requires login, or react shell etc (or any SPA shell). Will also not show if an endpoint is a potential service.
--tidy-all -ta Flags --disable-og and --tidy combined.
--only-res -or Only show summarised endpoints, and not print out extra information. Has an exception if number of endpoints exceeds 3000.
--only-original -oo Only show the original version of the flag instead of it being replaced with a 1. Will also affect show prog.
--show-source -ss Print the source of each endpoint during progress, like printing out which file it found the endpoint from.
--scan-timeout -st Stop scan completely after given number of minutes and print/save any results found in that time window. Will leave unsorted endpoints in a section labelled 'UNSORTED', and will leave out sensitive endpoints. Will NOT interrupt rate limiting test.
--raw-output -ro Do not sort out endpoints after finding them. Will leave out sensitive endpoints whether they are exposed or not.

Installation

You can install EndpointScanner via PyPI(global, recommended for Windows), Homebrew(MacOS), and Apt(Linux).

Installation via PyPI (or pip)

You MUST have python 3.9 or above to use this tool! To install the official endpointscanner Python package: Command for MacOS/Linux:

python3 -m pip install endpointscanner

Command for Windows Command Prompt:

py -m pip install endpointscanner

After that, install chromium on playwright (playwright will be installed when you install endpointscanner): Command for MacOS/Linux:

playwright install chromium

Command for Windows Command Prompt:

py -m playwright install chromium

You may need to create a virtual environment if PEP 668 blocks you. (For the endpointscanner installation, not playwright install chromium.) Windows users do not need this step as they will not face the PEP 668 restriction.

To create a virtual environment named 'myvenv':

python3 -m venv myvenv

To activate virtual environment:

source myvenv/bin/activate

Alternative for Virtual Environment (Not Recommended)

If you do not want to create a virtual environment, you can run:

python3 -m pip install endpointscanner --break-system-packages

to install it without PEP 668.

Warning: Using --break-system-packages may corrupt your OS-managed python environment. Proceed entirely at your own risk. The author is not liable for any system damage if you run this.

Troubleshooting Windows "Command Not Found" Error:

If you are on Windows (especially a non-admin account) and get an 'command not recognised' error when typing endpointscanner or playwright, run this command on PowerShell (not Command Prompt) to fix user environmental paths automatically:

$pDir = (py -c "import sys, os; print(os.path.dirname(sys.executable))"); if ($pDir) { $s = "$pDir\Scripts"; $p = [Environment]::GetEnvironmentVariable("Path", "User"); if ($p -notlike "*$s*") { [Environment]::SetEnvironmentVariable("Path", "$p;$s", "User") } }

What the PowerShell command does: Checks the current version of python being used, and adds that python version as an environmental variable in the computer so you can run endpointscanner as a standalone command. Does not require admin privileges.

Requirements for this command: Python must already be installed.

Note: You MUST close the terminal (not minimise) and open a new one for the changes to work.

Updating script

To update the script, you can run: MacOS and Linux Command:

python3 -m pip install --upgrade endpointscanner

Windows Command:

py -m pip install --upgrade endpointscanner

Homebrew

You may need to update first to be able to install EndpointScanner.

brew update

To install EndpointScanner via Homebrew (MacOS), run these two commands:

brew trust sphericalflower52811/tap
brew install endpointscanner

After that, you will need to install chromium on playwright for the headless browser:

python3 -m playwright install chromium

Apt

To install EndpointScanner via Apt (Linux), run these commands:

wget https://github.com/SphericalFlower52811/endpointscanner/releases/download/v7.3.1/endpointscanner_7.3.1-1_all.deb

sudo dpkg -i endpointscanner_7.3.1-1_all.deb

python3 -m playwright install chromium

Example Commands

Example command to run to scan a site (show inaccessible endpoints, show assets, show progress as it finds endpoints, and show files that it got endpoints from):

endpointscanner https://example.com -s -m -sp -ss

Example command to run to test a site (Assuming you are testing 5000 requests and creating 5k accounts)

endpointscanner example.com -r 5000 -t /signup -rt POST -rb '{"username":"ExampleUser{X}", "pass":"ExamplePassword"}' -rv '{X}' --force -rh 'POST /signup HTTP/2
Host: example.com
Cookie: clearedcaptcha=true
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:151.0) Gecko/20100101 Firefox/151.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.9
Prefer: safe
Accept-Encoding: gzip, deflate, br
Content-Type: application/json
Content-Length: 60
Origin: https://example.com
Referer: https://example.com/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Priority: u=0
Te: trailers'

Example command to only show the original endpoint, only print endpoints and output to a file:

endpointscanner example.com -oo -or -o examplescan.txt

What was added

Version 7.3 added:

  • Recursive scanning for sitemaps (all xml files)
  • Recursive scanning for javascript files
  • Scanning of localhost:port and IP addresses like 127.0.0.1, not just example.com.
  • Filtering out Emscripten + Pyodide Virtual File System endpoints as they were false positives.
  • More JS Stacks to detect, and more accurate. Full list of stacks after 7.3:
    • React
    • Nuxt.js
    • Next.js
    • Node.js
    • Vue.js
    • Angular
    • Astro
    • Gatsby
    • Remix
    • Solid.js
    • Svelte
    • Alpine.js
    • Backbone.js
    • Ember.js
    • Redux
    • Ruby on Rails
    • Forem (also ruby on rails)
    • Deno
    • Bun
    • jQuery
    • Webpack
    • Vite
    • Turbopack
    • Parcel

Version 7.3.1 added:

  • EndpointScanner now installable on:
    • Linux via sudo apt
    • Homebrew

Plans for next version and the future

Version 7.4:

  • Detecting what type of captcha was used if the script is blocked.
  • Optimisation to make sorting of endpoints faster (called parallel requests or something)

Future plans (May be added in the next version): none. please leave any suggestions you want.

Weaknesses

  • If there is a login page, the script will either show that all of the pages require login, or label all of them as 403.
  • If there are shells (e.g. React SPA shells) in the page, it may give false positives for sensitive endpoints. If you see sensitive endpoints in the scan, they may not actually be exposed on the website if the website has a shell. (E.g. .gitignore, .env.local)
  • The rate limit test is more susceptible to captchas as it uses a module (httpx, not curl_cffi) that is not built to specifically pass through firewalls/captchas. This is as the httpx module for requests is better for asynchronous functions for rate limit testing on websites.

ai assisted code btw

Legal Disclaimer

Note that this tool is strictly meant for authorised testing and security research. Running this script on websites where you are not permitted to do so can result in legal action. The author of this script assumes no responsibility for any misuse or legal consequences from running this script. Ensure you have received permission from the owner of the target website before performing tests or scans on their website.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

endpointscanner-7.3.1.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

endpointscanner-7.3.1-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file endpointscanner-7.3.1.tar.gz.

File metadata

  • Download URL: endpointscanner-7.3.1.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for endpointscanner-7.3.1.tar.gz
Algorithm Hash digest
SHA256 c7b5f633231b80639e68dd6f67b4ed8053bace057bff2e6d3466664c1d021eb3
MD5 f13114d9630066ddd7cf0dd0ffdea766
BLAKE2b-256 57665ff0071e42645738f5e46ea3b6643a4965f6bb05eb76a468cd8e927aedc6

See more details on using hashes here.

File details

Details for the file endpointscanner-7.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for endpointscanner-7.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b38ff0de9bc6cf765913224cbd325812fba6103e5d3d1265cca6d3ba66db0926
MD5 636026b8a04c86e23b26741b6b5ba47d
BLAKE2b-256 8462bcbf2a01b1a7a99291fb6b39aac2646b60cf8ac08849136b4be84736901a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page