我用WSockExpert获取一个论坛的登陆时提交的数据如下:
POST /logging.php?action=login HTTP/1.1
Accept: */*
Referer: http://www.freedoman.com/logging.php?action=login
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322; Alexa Toolbar)
Host: www.freedoman.com
Content-Length: 185
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: cdb_sid=KXJBZv; cnzz02=26; rtime=1; ltime=1157598958531; cnzz_eid=22689531-; cdb_cookietime=2592000formhash=6a49b97f&referer=index.php&loginmode=&styleid=&cookietime=2592000&loginfield=username&username=johnbl&password=3893434&questionid=0&answer=&loginsubmit=%CC%E1+%26nbsp%3B+%BD%BB
上面的数据保存为1.txt
我用nc www.freedoman.com 80<1.txt提交数据,显示了登陆成功的信息
我现在想自己写一个程序模拟nc的功能向网站提交数据模拟登陆,怎么去实现~