3.
@UnderDog,哦哦,自动提取sid.的!你能不能把这个源码替换到赞赞源码提取sid那个?
5.
@颠覆,
<?php
date_default_timezone_set("etc/gmt-8");
function bd($bd){
echo <<<html
<form action="{$_SERVER['PHP_SELF']}" method="post" >
Q Q:
<input type="text" name="qq" /><br />
密码:
<input type="text" name="pwd" />
<br />登录方式:<br />
<select name="loginType">
<option value="3" selected="selected">不登录QQ聊天</option>
<option value="1">同时在线登录QQ聊天</option>
<option value="2">同时隐身登录QQ聊天</option>
</select>
<br />使原书签失效:<br />
<select name="modifySKey">
<option value="1">是</option>
<option value="0" selected="selected">否</option>
</select><br />
<input type="submit" name="loginsubmit" value="登录" />
</form>
html;
$t=date("Y-m-d H:i D");
echo '<hr/>'.$t.'<br/>';
}
function curl($u,$po){
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$u);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$po);
$r=curl_exec($ch);
curl_close($ch);
return $r;
}
echo <<<html
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "
http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title>提取SID</title>
</head>
html;
header("content-type:text/html; charset=utf-8");
date_default_timezone_set('PRC');
ignore_user_abort(true);
$gourl="
http://flower.3g.qq.com/flower/my_garden.jsp?s_it=1&sid=00";
$u3="
http://pt.3g.qq.com/s?sidtype=1&aid=nLoginAdv&sid=AW-mOTApEbb9WkSUayphhBhg&go_url=http://flower.3g.qq.com/flower/my_garden.jsp?s_it=1&sid=00&q_from=&loginTitle=魔法花园";
$u4="
http://pt.3g.qq.com/handleLogin?g_ut=1&vdata=117782A458D967D978D9593BA7363A0B";
$qq=$_POST['qq'];
$pwd=$_POST['pwd'];
$loginType=$_POST['loginType'];
$modifySKey=$_POST['modifySKey'];
$po="qq={$qq}&pwd={$pwd}&sidtype=1&modifySKey={$modifySKey}&loginType={$loginType}&bid=0&aid=nLoginHandle&go_url={$gourl}&login_url={$u3}";
$yzm=$_POST['yzm'];
$u_token=$_POST["u_token"];
$hexpwd=$_POST["hexpwd"];
$sid=$_POST["sid"];
$hexp=$_POST["hexp"];
$auto=$_POST["auto"];
$loginTitle=$_POST["loginTitle"];
$q_from=$_POST["q_from"];
$modifySKey=$_POST["modifySKey"];
$q_status=$_POST["q_status"];
$r=$_POST["r"];
$loginType=$_POST["loginType"];
$bid_code=$_POST["bid_code"];
$imgType=$_POST["imgType"];
$extend=$_POST["extend"];
$r_sid=$_POST["r_sid"];
$bid=$_POST["bid"];
$login_url=$_POST["login_url"];
$rip=$_POST["rip"];
$go_url=$_POST["go_url"];
$po2="qq={$qq}&u_token={$u_token}&hexpwd={$hexpwd}&sid={$sid}&hexp={$hexp}&auto={$auto}&loginTitle={$loginTitle}&q_from={$q_from}&modifySKey={$modifySKey}&q_status={$q_status}&r={$r}&loginType={$loginType}&bid_code={$bid_code}&imgType=gif&extend={$extend}&r_sid={$r_sid}&bid={$bid}&login_url={$login_url}&rip={$rip}&go_url={$go_url}&verify={$yzm}";
if($_POST['loginsubmit']!=NULL or $_POST['yzmtj']!=NULL){
if($_POST['yzmtj']){
$r=curl($u4,$po2);
}
if($_POST['loginsubmit']){
$r=curl($u4,$po);
}
if(strstr($r,'The URL has moved')){
echo '请勿重复提交表单';
bd(bd);
exit;
}
if(strstr($r,'帐号或密码')){
echo '<p align="center"><font color="red">帐号或密码不正确,请重新输入。</font></p>';
bd(bd);
exit;
}
if(strstr($r,'登录成功')){
preg_match('
@sid=(.*?)"@',$r,$sid2);
echo <<<html
<br /><div style="text-align:center"><font style="color:green">sid获取成功</font></div><br />
<input type="text" name="sid" value="{$sid2[1]}" /><br />
>>><a href="index.php?sid={$sid2[1]}">将SID添加至程序</a>
html;
exit;
}else{
preg_match_all('
@name="(.*?) value="(.*?)"
@s',$r,$u);
}
}
if(strstr($r,'输入验证码')!=NULL){
preg_match('
@SRC="(.*?)"@',$r,$yz);
echo <<<HTML
<img src="{$yz[1]}" alt="请打开图片显示" /><br />
<form action="{$_SERVER['PHP_SELF']}" method="post" >
请输入验证码:<br />
<input type="text" name="yzm" />
<input type="hidden" name="qq" value="{$u[2][22]}" />
<input type="hidden" name="u_token" value="{$u[2][23]}" />
<input type="hidden" name="hexpwd" value="{$u[2][24]}" />
<input type="hidden" name="sid" value="{$u[2][25]}" />
<input type="hidden" name="hexp" value="{$u[2][26]}" />
<input type="hidden" name="auto" value="{$u[2][27]}" />
<input type="hidden" name="loginTitle" value="{$u[2][28]}" />
<input type="hidden" name="q_from" value="{$u[2][29]}" />
<input type="hidden" name="modifySKey" value="{$u[2][30]}" />
<input type="hidden" name="q_statu" value="{$u[2][31]}" />
<input type="hidden" name="r" value="{$u[2][32]}" />
<input type="hidden" name="loginType" value="{$u[2][33]}" />
<input type="hidden" name="bid_code" value="{$u[2][34]}" />
<input type="hidden" name="imgType" value="gif" />
<input type="hidden" name="extend" value="{$u[2][36]}" />
<input type="hidden" name="r_sid" value="{$u[2][37]}" />
<input type="hidden" name="bid" value="{$u[2][38]}" />
<input type="hidden" name="login_url" value="{$u[2][39]}" />
<input type="hidden" name="rip" value="{$u[2][40]}" />
<input type="hidden" name="go_url" value="{$u[2][41]}" /><br />
<input type="submit" name="yzmtj" value="确认" />
</form>
HTML;
}
if($_POST['yzmtj']==NULL & $_POST['loginsubmit']==NULL){
bd(bd);
}
?>
替换换getsid.php
10.
@颠覆,我只是把5楼的内容覆盖了getsid.php里面的!