Last active
September 20, 2019 08:49
Revisions
-
zhgchgli0718 revised this gist
Sep 20, 2019 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,10 @@ def request(flow: http.HTTPFlow) -> None: # pretty_host takes the "Host" header of the request into account, # which is useful in transparent mode where we usually only have the IP # otherwise. # 請求參數設定 Example: flow.request.headers['User-Agent'] = 'MitmProxy' if flow.request.pretty_host == "123.com.tw": flow.request.host = "456.com.tw" # 將123.com.tw的訪問全導到456.com.tw -
zhgchgli0718 revised this gist
Sep 20, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ def request(flow: http.HTTPFlow) -> None: # pretty_host takes the "Host" header of the request into account, # which is useful in transparent mode where we usually only have the IP # otherwise. flow.request.headers['User-Agent'] = 'MitmProxy' if flow.request.pretty_host == "123.com.tw": flow.request.host = "456.com.tw" # 將123.com.tw的訪問全導到456.com.tw -
zhgchgli0718 created this gist
Sep 20, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ from mitmproxy import http def request(flow: http.HTTPFlow) -> None: # pretty_host takes the "Host" header of the request into account, # which is useful in transparent mode where we usually only have the IP # otherwise. if flow.request.pretty_host == "123.com.tw": flow.request.host = "456.com.tw" # 將123.com.tw的訪問全導到456.com.tw