import requests
import re
def getHTMLText(url):
try:
headers={
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Encoding':'gzip,deflate',
'Accept-Language':'zh-CN,zh;q=0.9',
'Cache-Control':'no-cache',
'Connection':'keep-alive',
'Cookie':'name=value;ASP.NET_SessionId=fkmcxj45yhvmur45qfbogr45;sto-id-20480=ANADKIMAFBAA;name=value',
'Host':'jw.zhku.edu.cn',
'Pragma':'no-cache',
'Referer':'http://jw.zhku.edu.cn/home.aspx',
'Upgrade-Insecure-Requests':'1',
'User-Agent':'Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/92.0.4515.131Safari/537.36'
}
r=requests.get(url,timeout=30,headers=headers)
r.raise_for_status()
r.encoding=r.apparent_encoding
return r.text
except:
pass
url="http://jw.zhku.edu.cn/_data/login_home.aspx"
html=getHTMLText(url)
pattern=r'(?<=__VIEWSTATE" value=")(.+?)(?=" />)'
s__VIEWSTATE=re.findall(pattern,html)[0]
print(s__VIEWSTATE)
const CryptoJs=require('K:/nodejs/node_global/node_modules/crypto-js')
const md5=CryptoJs.MD5
var encpwd = md5("201720814306" + md5("123").toString().substring(0, 30).toUpperCase() + '11347').toString().substring(0, 30).toUpperCase();
console.log(encpwd)
var yzm = md5(md5("YHXE".toUpperCase()).toString().substring(0, 30).toUpperCase() + '11347').toString().substring(0, 30).toUpperCase();
console.log(yzm)