mirror of
https://github.com/mgeeky/Penetration-Testing-Tools.git
synced 2024-12-22 09:05:06 +01:00
Added more headers
This commit is contained in:
parent
8c359f5f7f
commit
e839e64db2
@ -42,6 +42,13 @@ append_headers = (
|
||||
'X-Forwarded-For',
|
||||
'Referer',
|
||||
'True-Client-IP',
|
||||
'X-Originating-IP',
|
||||
'X-Client-IP',
|
||||
'Client-IP',
|
||||
'X-Real-IP',
|
||||
'Contact',
|
||||
'Forwarded',
|
||||
'CF-Connecting_IP',
|
||||
'X-WAP-Profile'
|
||||
)
|
||||
|
||||
@ -301,6 +308,9 @@ class PyCollaboratorMitmproxyAddon:
|
||||
for header in append_headers:
|
||||
(pingback, uuid) = PyCollaboratorMitmproxyAddon.getPingbackUrl(self.request)
|
||||
self.request.headers[header] = pingback
|
||||
if 'IP' in header:
|
||||
self.request.headers[header] = '{}.{}'.format(uuid, config['pingback-host'])
|
||||
|
||||
self.saveRequestForCorrelation(pingback, header, uuid, 'Header: {}'.format(header))
|
||||
|
||||
self.sendMisroutedRequests()
|
||||
@ -353,4 +363,4 @@ def request(flow: http.HTTPFlow) -> None:
|
||||
globalPyCollaborator.requestForMitmproxy(flow)
|
||||
|
||||
globalPyCollaborator = PyCollaboratorMitmproxyAddon()
|
||||
addons = [request]
|
||||
addons = [request]
|
||||
|
@ -38,6 +38,13 @@ append_headers = (
|
||||
'X-Forwarded-For',
|
||||
'Referer',
|
||||
'True-Client-IP',
|
||||
'X-Originating-IP',
|
||||
'X-Client-IP',
|
||||
'Client-IP',
|
||||
'X-Real-IP',
|
||||
'Contact',
|
||||
'Forwarded',
|
||||
'CF-Connecting_IP',
|
||||
'X-WAP-Profile'
|
||||
)
|
||||
|
||||
@ -301,6 +308,8 @@ class ProxyHandler:
|
||||
for header in append_headers:
|
||||
(pingback, uuid) = ProxyHandler.getPingbackUrl(self.request)
|
||||
self.request.headers[header] = pingback
|
||||
if 'IP' in header:
|
||||
self.request.headers[header] = '{}.{}'.format(uuid, config['pingback-host'])
|
||||
self.saveRequestForCorrelation(pingback, header, uuid, 'Header: {}'.format(header))
|
||||
|
||||
self.sendMisroutedRequests()
|
||||
@ -311,4 +320,4 @@ class ProxyHandler:
|
||||
|
||||
def response_handler(self, req, req_body, res, res_body):
|
||||
pass
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user