Skip to main content
Version: 1.1.3-beta.1

API gateway command

The api-gateway command is used to configure and manage AWS API Gateway for the purpose of IP address rotation. This configuration is written to .api_gateway_config.json by default. This allows you to make requests from a pool of different IP addresses, which can be useful for avoiding rate limiting.

Note that the only module which makes HTTP request is lazyload. So, the configuration generated by this module will only work there.

Usage

js-recon api-gateway [options]

Options

OptionAliasDescriptionDefaultRequired
--init-iInitialize the config file and create a new API Gateway.falseNo
--destroy <id>-dDestroy the API with the given ID.No
--destroy-allDestroy all APIs created by this tool in all regions.falseNo
--region <region>-rAWS region to create the API in.random regionNo
--access-key <access-key>-aAWS access key. Uses AWS_ACCESS_KEY_ID env var if not provided.No
-sAWS secret key. Uses AWS_SECRET_ACCESS_KEY env var if not provided.No
--config <config>-cName of the config file (if different from the default).api_gateway_config.jsonNo
--list-lList all APIs created by this tool.falseNo
--feasibilityCheck the feasibility of using API Gateway for a target.falseNo
--feasibility-url <url>URL to check the feasibility of.No

Examples

Initialize API gateway

Create a new API Gateway and save its configuration:

js-recon api-gateway --init

List created APIs

List all the API gateways this tool creates:

js-recon api-gateway --list

Destroy an API

Destroy a specific API Gateway using its ID:

js-recon api-gateway --destroy <api-id>

Destroy all APIs

Destroy all APIs created by this tool in all regions:

js-recon api-gateway --destroy-all

Check feasibility

Check if a target URL returns a response that contains known traces of firewall. If the result says firewall detected, then it means that the target has blocked the IP addresses originating from the AWS infrastructure.

js-recon api-gateway --feasibility --feasibility-url https://example.com