我正在尝试编写一个 bash 脚本,我需要在其中登录到一个使用 javascript 形式的网站。我从未使用过 cURL,因此将不胜感激。我知道我需要使用 cookie 并且我有 http 标头,但我不知道我需要用这些做什么。
标题是
Response Headers
Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Length 0
Content-Type text/html;charset=UTF-8
Date Thu, 17 May 2012 11:25:15 GMT
Expires Tue, 01 Jan 1980 00:00:00 GMT
Last-Modified Thu, 17 May 2012 11:25:16 GMT
Pragma no-cache
Server Apache-Coyote/1.1
X-Powered-By Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0
Request Headers
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language en-us,en;q=0.5
Connection keep-alive
Content-Type application/x-www-form-urlencoded; charset=UTF-8
Cookie SMLOGOUT=true; JSESSIONID=8D5757001A594D5CBB07C9250D1CB2B7; JSESSIONIDSSO=A0569CD1D6C981989F0FE691E9AFC314
Host https:/example.com
Referer https://example.com
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
X-WCF-Fragment true
任何帮助或指出我正确的方向将不胜感激。谢谢