Last active
March 30, 2016 08:56
-
-
Save Leask/3ed6f733658da8d60863b9436a3aa125 to your computer and use it in GitHub Desktop.
一起投票反对某国的《互联网域名管理办法》
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| vote() { | |
| # make ip address | |
| aa=$1 | |
| bb=$2 | |
| cc=$3 | |
| dd=$4 | |
| aa=${aa:="1 254"} | |
| bb=${bb:="1 254"} | |
| cc=${cc:="1 254"} | |
| dd=${dd:="1 254"} | |
| a=`seq $aa | while read i;do echo "$i $RANDOM";done | sort -k2n | cut -d" " -f1 | tail -1` | |
| b=`seq $bb | while read i;do echo "$i $RANDOM";done | sort -k2n | cut -d" " -f1 | tail -1` | |
| c=`seq $cc | while read i;do echo "$i $RANDOM";done | sort -k2n | cut -d" " -f1 | tail -1` | |
| d=`seq $dd | while read i;do echo "$i $RANDOM";done | sort -k2n | cut -d" " -f1 | tail -1` | |
| ip="$a.$b.$c.$d" | |
| echo "vote as $ip" | |
| # vote | |
| curl 'http://zqyj.chinalaw.gov.cn/ajax/invoke' -H 'Cookie: zqyj=20111116; 14_vq=2' -H 'Origin: http://zqyj.chinalaw.gov.cn' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: */*' -H 'Referer: http://zqyj.chinalaw.gov.cn/draftDetail?listType=1&superman=2&DraftID=1011&PageIndex=8' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' -H "CLIENT-IP:$ip" -H "X-FORWARDED-FOR:$ip" --data '_ZVING_METHOD=SupportOppose.voteOppose&_ZVING_URL=%252FdraftDetail&_ZVING_DATA=%7B%22ID%22%3A%2245115%22%7D&_ZVING_DATA_FORMAT=json' ——compressed | |
| } | |
| while true | |
| do | |
| vote; | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment