kk Blog —— 通用基础


date [-d @int|str] [+%s|"+%F %T"]
netstat -ltunp
sar -n DEV 1

curl模拟post

经常会遇到需要post提交东西的时候
这时候用curl是非常方便的
例子:

1
2
3
4
curl -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" \
-e "http://www.xxx.com/poll.shtml" \
-d "2880[]=105&pid=2880&p=最佳&count=1&receipt=1&poll=投票" \
http://survey.xxx.com/poll/poll.php

这里 -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
的意思就是申明自己用的是windows2000下的ie6的浏览器;

-e "http://www.xxx.com/poll.shtml" 的意思就是refer是这个页面;

-d后面的参数都是将用post方式提交到服务器去的

最后面的就是将要post到的url地址