找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 12925|回复: 1

实例讲解QQ空间莫名欺骗的图片获取QQ号及昵称原理+源码

[复制链接]
发表于 2013-11-4 21:12:24 | 显示全部楼层 |阅读模式
QQ空间获取当前用户名最近很流行在qq空间里转载带有当前用户的一些图片,简单研究一下其实就是利用php来创建的一个简单的图片。4 E5 n$ C3 C8 V& Z: ]: u
生成图片 image.php:
! o+ t2 |. s/ @6 A. {' n3 `
[PHP] 纯文本查看 复制代码
<!--?php
$ment =  $_SERVER["HTTP_REFERER"];

if($ment == 'http://cnc.qzs.qq.com/qzone/newblog/v5/editor.html'){
        header("HTTP/1.0 500 Internal Server Error");
exit;}
preg_match("#[0-9]{5,11}#",$ment,$rr);
$r=$rr[0];
$webtext=file_get_contents('http://www.phperzone.cn/qqinfo-service.php?qq='.$r);
preg_match('#"nickname":"(.*?)"#',$webtext,$rr);
$rrr=$rr[1];
ob_clean();
header("Content-type:image/png");
$im=imagecreatefromjpeg("1.jpg");
$black = ImageColorAllocate($im, 56,73,136);
$rrr = mb_convert_encoding($rrr, "utf-8","UTF-8");
imagettftext($im,20,0,90,68,$black,"./simsun.ttc",$rrr);
imagettftext($im,26,0,87,125,$black,"./simsun.ttc",$r);
imagejpeg($im);
imagedestroy($im);
?-->

2 T& _4 U+ h5 t2 C. I% ~' u, l* R; E7 b  T& t
; W8 S# X1 n; Q0 m: z4 n+ O
接口文件 qqinfo-service.php:
; b* x* J; t* P: b! q
[PHP] 纯文本查看 复制代码
<!--?php
header("Content-Type:text/html;charset=utf-8");
$qq = $_GET ["qq"];
echo htmlspecialchars(file_get_contents('http://r.qzone.qq.com/cgi-bin/user/cgi_personal_card'. "?uin=" . $qq));
?-->

1 M8 i: G- i" r' _% a1 J: p
7 Z! R# C+ \4 L& z( e" X. m
8 u/ H* _" |6 ~( k( r源码下载 上传PHP空间6 t+ a' c$ N9 Y! K+ Y; T; A- c

: L6 ]/ x. Y" w# i* L

9 p6 }$ k* H3 X4 X  j7 d* o
游客,如果您要查看本帖隐藏内容请回复
+ ?" a' r" p& A5 w% i! c
发表于 2013-11-22 11:50:59 | 显示全部楼层
看了LZ的帖子,我只想说一句很好很强大!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|第一站论坛 ( 蜀ICP备06004864号-6 )

GMT+8, 2026-3-29 00:53 , Processed in 0.056745 second(s), 25 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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