请选择 进入手机版 | 继续访问电脑版

GODIY 自己动手亲力亲为的DIY社区一起来吧--GODIY论坛

 找回密码
 注册

扫一扫,访问微社区

搜索
楼主: 青州小熊

50首经典歌曲

[复制链接]
发表于 2013-12-8 21:08:07 | 显示全部楼层
顶一个先
发表于 2013-12-8 21:08:23 | 显示全部楼层
顶一个先
发表于 2013-12-8 21:09:01 | 显示全部楼层
顶一个先
发表于 2013-12-8 21:09:17 | 显示全部楼层
顶一个先
发表于 2013-12-8 21:09:33 | 显示全部楼层
顶一个先
发表于 2013-12-8 21:09:50 | 显示全部楼层
顶一个先
发表于 2013-12-8 21:10:10 | 显示全部楼层
顶一个先
发表于 2013-12-8 21:18:52 | 显示全部楼层
发表于 2013-12-8 21:25:29 | 显示全部楼层
发表于 2013-12-8 21:29:12 | 显示全部楼层
#!/bin/sh
if [ $# -ne 3 ]
then
echo "Usage: $0 board_id subject message(more then ten words)"
exit 1
fi
#arguments
g_fid=$1
g_subject=$2
g_message=$3
#site info
host=www.gcren.com
user=""
passwd=""
page=".page"
header=".header"
cookie_file=".cookie"
user_agent="Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"
#login discuz bbs
function login()
{
local url="http://$host/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&inajax=1"
local data="fastloginfield=username&username=$user&cookietime=2592000&password=$passwd&quickforward=yes&handlekey=ls&questionid=0&answer="
wget $url -d \--save-cookies=$cookie_file \--user-agent="$user_agent" \--post-data="$data" \-O $page \-a $header 2>/dev/null
}
#goto specified board
function goto_board()
{
local fid=$1
local url="http://$host/forum.php?mod=forumdisplay&fid=$fid"
wget $url -d \--load-cookies=$cookie_file \--user-agent="$user_agent" \--save-cookies=$cookie_file \-O $page \-a $header 2>/dev/null
formhash=`grep -oP '(?<=formhash" value=")[^"]+(?=" />)' $page | head -n1`
}
#post a new post
function post()
{
local fid=$1
local subject=$2
local message=$3
goto_board $fid
goto_board $fid
echo “Sending...”
local referer="http://$host/forum.php?mod=forumdisplay&fid=$fid"
local url="http://$host/forum.php?mod=post&action=newthread&fid=$fid&extra=&topicsubmit=yes"
local data="subject=$subject&message=$message&formhash=$formhash&usesig=1&posttime=1314961432&wysiwyg=1&save=&uploadalbum=&newalbum=&allownoticeauthor=1"
wget $url -d \--load-cookie=$cookie_file \--user-agent="$user_agent" \--referer="$referer" \--post-data="$data" \-O $page \-a $header 2>/dev/null
echo “OK, done”
}
#clear temporary files
function clear()
{
rm $page && rm $header && rm $cookie_file
}
echo "------------------------------------------"
echo "Program for AutoSending"
echo "Site: $host"
echo "Username: $user"
echo "Password: $passwd"
echo "------------------------------------------"
login
echo “logined”
post $g_fid "$g_subject" "$g_message"
clear
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|手机版|Archiver|GODIY论坛 ( 粤ICP备12089271号

GMT+8, 2018-10-20 02:55 , Processed in 0.073268 second(s), 6 queries , File On.

Powered by Godiy.net

快速回复 返回顶部 返回列表