shell发动弹

前端之家收集整理的这篇文章主要介绍了shell发动弹前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

下面是编程之家 jb51.cc 通过网络收集整理的代码片段。

编程之家小编现在分享给大家,也给大家做个参考。

#!/bin/bash
email='xxxxxx'  #这里自己处理urlencode,比如[email protected] 这里填shacha%40gmail.com
password='xxxxxxx' #同上
msgRaw='今天又被自己帅醒了'


msg=`echo -n $msgRaw|od -An -tx1|tr ' ' %`

curl -H "Content-Type:application/x-www-form-urlencoded" -d "pwd=`echo -n $password|sha1sum|cut -c -40`&email=$email" -D cookie.txt  "https://www.oschina.net/action/user/hash_login"

user_code=`curl -H "Content-Type:application/x-www-form-urlencoded" -H "User-Agent:Mozilla/5.0"  -b cookie.txt "http://www.oschina.net/"|grep -oE "name='user_code' value='[a-zA-Z0-9]+"|cut -c 25-`

echo $user_code

user=`curl -H "Content-Type:application/x-www-form-urlencoded" -H "User-Agent:Mozilla/5.0"   -b cookie.txt "http://www.oschina.net/"|grep -oE "name='user' value='[0-9]+"|cut -c 20-`

echo $user

curl -H "Content-Type:application/x-www-form-urlencoded" -H "User-Agent:Mozilla/5.0"   -b cookie.txt -d "user=$user&user_code=$user_code&msg=$msg" "http://my.oschina.net/action/tweet/pub"

以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

猜你在找的Shell相关文章