Skip to content

Commit

Permalink
Merge pull request #48 from Ge0rg3/feature/readme-updates
Browse files Browse the repository at this point in the history
Document New Features
  • Loading branch information
Ge0rg3 committed Oct 27, 2022
2 parents cbd7d11 + 3da350f commit a189ec2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ session = requests.Session()
session.mount("https://site.com", gateway)

# Send request (IP will be randomised)
response = session.get("https://site.com/index.html")
response = session.get("https://site.com/index.php", params={"theme": "light"})
print(response.status_code)

# Delete gateways
Expand All @@ -45,7 +45,7 @@ with ApiGateway("https://site.com") as g:
session = requests.Session()
session.mount("https://site.com", g)

response = session.get("https://site.com/index.html")
response = session.get("https://site.com/index.php")
print(response.status_code)
```

Expand Down Expand Up @@ -90,10 +90,11 @@ gateway_2 = ApiGateway("https://www.google.com", regions=EXTRA_REGIONS, access_k
An ApiGateway object must then be started using the `start` method.
**By default, if an ApiGateway already exists for the site, it will use the existing endpoint instead of creating a new one.**
This does not require any parameters, but accepts the following:
| Name | Description | Required |
| ----------- | ----------- | ----------- |
| force | Create a new set of endpoints, even if some already exist. | False |
| endpoints | Array of pre-existing endpoints (i.e. from previous session). | False |
| Name | Description | Required | Default
| ----------- | ----------- | ----------- | -----------
| endpoints | Array of pre-existing endpoints (i.e. from previous session). | False |
| force | Create a new set of endpoints, even if some already exist. | False | False
| require_manual_shutdown | Bool specifying whether Apigateways should persist `shutdown()` calls | False | False
```python
# Starts new ApiGateway instances for site, or locates existing endpoints if they already exist.
gateway_1.start()
Expand Down Expand Up @@ -145,6 +146,9 @@ endpoints = gateway_3.start(force=True)
gateway_3.shutdown(endpoints[:3])
```

**Please bear in mind that any gateways started with the `require_manual_shutdown` parameter set to `True` will not be deleted via the `shutdown` method, and must be deleted
manually through either the AWS CLI or Website.**

## Credit
The core gateway creation and organisation code was adapter from RhinoSecurityLabs' [IPRotate Burp Extension](https://github.com/RhinoSecurityLabs/IPRotate_Burp_Extension/).
The X-My-X-Forwarded-For header forwarding concept was originally conceptualised by [ustayready](https://twitter.com/ustayready) in his [fireprox](https://github.com/ustayready/fireprox) proxy.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# This call to setup() does all the work
setup(
name="requests-ip-rotator",
version="1.0.12",
version="1.0.14",
description="Rotate through IPs in Python using AWS API Gateway.",
long_description=README,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit a189ec2

Please sign in to comment.