forked from SoDOff-Project/sodoff
Redirect official server requests (#8)
* Update mitm-redirect.py Redirect official server requests as well as unofficial server requests * Update mitm-redirect.py Automatically redirect requests for "media.jumpstart.com" to "media.sodoff.spirtix.com". This should let you run either the original client or the modified one. * Update mitm-redirect.py: Add missing comma * Update mitm-redirect.py Re-make commit d382a90; the changes got lost somehow * Update mitm-redirect.py: Add newly implemented methods to the methods list
This commit is contained in:
parent
ad889d3d7a
commit
a96a256c11
@ -79,11 +79,20 @@ class LocalRedirect:
|
||||
print('Loaded redirect addon')
|
||||
|
||||
def request(self, flow: mitmproxy.http.HTTPFlow):
|
||||
if 'api.sodoff.spirtix.com' in flow.request.pretty_host and routable(flow.request.path):
|
||||
if ('api.sodoff.spirtix.com' in flow.request.pretty_host or 'api.jumpstart.com' in flow.request.pretty_host) and routable(flow.request.path):
|
||||
flow.request.host = "localhost"
|
||||
flow.request.scheme = 'http'
|
||||
flow.request.port = 5000
|
||||
|
||||
class RedirectMediaRequests:
|
||||
def __init__(self):
|
||||
print('Loaded media request redirector')
|
||||
|
||||
def request(self, flow: mitmproxy.http.HTTPFlow):
|
||||
if "media.jumpstart.com" in flow.request.pretty_host:
|
||||
flow.request.host = "media.sodoff.spirtix.com"
|
||||
|
||||
addons = [
|
||||
LocalRedirect()
|
||||
LocalRedirect(),
|
||||
RedirectMediaRequests()
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user