admin 发表于 2007-2-7 00:11:24

破解163相册、QQ相册、SOHU相册、51相册、YAHOO防盗链PHP、ASP代码

PHP代码<?
    $pics=file($p);
    for($i=0;$i<count($pics);$i++)
    {
          echo $pics[$i];
    }
?>复制代码保存为163php或163.asp,上传你的到空间,然后在163、QQ图片前加
http://你的网址/163.asp?url=
http://你的网址/163.php?p=
已经测试过,显示正常。

测试如下:

http://img818.photo.163.com/88014633/115248780/2801710964.jpg

http://img818.photo.163.com/88014633/115248780/2801710964.jpg



QQ相册演示:
http://olc.photo.qq.com/?file=16F4D8146C4735F9F4612F2AA254E61BC6655172E13EAED534F2325E20E43D05

http://olc.photo.qq.com/?file=16F4D8146C4735F9F4612F2AA254E61BC6655172E13EAED534F2325E20E43D05

yellky 发表于 2007-2-7 12:48:16

看了一下asp的破解,稍稍看出了163防盗链的方法:ht tp://img818.photo.163.com/88014633/115248780/2801710964.jpg是图片的真实地址,163似乎是先把图片头信息和网址缓存到本地,显示图片时先验证缓存信息,如果本地存在缓存信息,就正确显示,否则显示盗链图片,asp破解时,先在本地伪造缓存信息,然后利用XMLHTTP访问远程资源(因为为了安全,XMLHTTP本身是不允许跨域访问资源的)

PHP似乎显得有些霸道,直接读取远程图片源码,然后echo逐个字节输出,<就像我写的那个show.asp一样读取图片的源代码,如果将show.asp写成组件安装到服务器上,直接用show(图片地址)就可以了>php本身就集成GDK库的,这个很正常.

PS:如果我没猜错,你先登陆163相册,不要退出,然后再登陆论坛这一页,上面的图片应该也能正常显示,你试试看...

yellky 发表于 2007-2-7 19:29:46

http://www.bell-flower.com/labs/showimg.asp?imgsrc=http://img818.photo.163.com/88014633/115248780/2801710964.jpg

汗~~,这样也能破163的图片防盗链?!

仔细研究了一下XmlHttp发现这样也行,晕!!!   showimg.asp的源代码:

<%
response.buffer=True
dim file_url
file_url=request.querystring("imgsrc")
Set objXmlHTTP = Server.CreateObject("MsXml2.ServerXmlHTTP")
objXmlHttp.open "GET",file_url,false
objXmlHttp.send()
Response.ContentType = "image/jepg"
Response.BinaryWrite objXmlHTTP.responseBody
set objXmlHTTP=nothing
%>


PS:今天想了一天,还是未能找到一个好的图片防盗链的解决方法,也研究了一下服务器是如何处理http请求的

发现服务器对图片的请求处理过于盲目(谁向它要,它就给谁,不管对方是强盗还是小偷,汗~~)

看来不从服务器端解决图片防盗链,仅靠代码解决,难啊....

继续接着想...

admin 发表于 2007-2-7 20:08:04

盗取SOHU相册的例子

http://img64.pp.sohu.com/images/2006/11/10/20/10/10f66186bb8.jpg


http://img64.pp.sohu.com/images/2006/11/10/20/10/10f66186bb8.jpg

ctgwglzc 发表于 2007-3-8 12:59:47

ASP盗链代码

引用格式:pic.asp?地址

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936" ENABLESESSIONSTATE="FALSE"%>
<%Option Explicit%>
<%
'+---------------------------------------------------------+
'|      Aocool Studio Photo / Gallery Magic Show         |
'|      Copyright (c) 2005 - 2006 Aocool Studio Ltd.       |
'+---------------------------------------------------------+
Server.ScriptTimeout = 300
Response.Buffer = True

On Error Resume Next

Function IsNullOrEmpty(ByVal String)
      IsNullOrEmpty = IsNull(String) Or String = ""
End Function

Function GetImage(ByVal URL)
      Dim oXmlHttp
      Set oXmlHttp = Server.CreateObject("Msxml2.XMLHTTP")

      If Err.Number <> 0 Then
                Response.Write("XMLHTTP Object not installed on this server, please go to Microsoft website download and install it.")
                Response.End()
      End If

      oXmlHttp.Open "GET", URL, False
      oXmlHttp.setRequestHeader "Referer", URL
      oXmlHttp.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
      oXmlHttp.Send()
         
      If oXmlHttp.readyState <> 4 Then
                GetImage = ""
      Else
                GetImage = oXmlHttp.responseBody
      End If

      Set oXmlHttp = Nothing
End Function

Function GetContentType(ByVal FileName)
      Dim FileExtension, ContentType
      FileExtension = Mid(FileName, InStrRev(FileName, ".") + 1)
         
      Select Case FileExtension
                Case "jpe"
                        ContentType = "image/jpeg"
                Case "jpg"
                        ContentType = "image/jpeg"
                Case "jpeg"
                        ContentType = "image/jpeg"
                Case "gif"
                        ContentType = "image/gif"
                Case "bmp"
                        ContentType = "image/bmp"
                Case "png"
                        ContentType = "image/png"
                Case "pnz"
                        ContentType = "image/png"
                Case Else
                        ContentType = "text/html"
      End Select

      GetContentType = ContentType
End Function

Dim URL, Bin
URL = Request.ServerVariables("QUERY_STRING")
Bin = GetImage(URL)

      If IsNullOrEmpty(URL) = False Then
                If Bin <> "" Then
                        Response.ContentType = GetContentType(URL)
                        Response.BinaryWrite Bin
                        Response.Flush
                Else
                        Response.ContentType = "text/html"
                        Response.Write("Remote Server Error.")
                End If
      Else
                Response.ContentType = "text/html"
                Response.Status = "400 Bad Request"
                Response.Write("400 Bad Request")
      End If
%>

ctgwglzc 发表于 2007-3-12 18:30:28

最新例子(破解PCPOP)

来自PCPOP的图片

未加盗链程序效果
http://img.pcpop.com/upimg3/2006Bak/8/25/0001715804.jpg

加了盗链程序效果
http://img.pcpop.com/upimg3/2006Bak/8/25/0001715804.jpg

libertine 发表于 2007-3-24 13:30:22

我的用PHP代码为什么不行啊,还是显示不了

http://www.0591ok.com/163.php?p=url

这url替换掉QQ相册地址还是不能显示

ctgwglzc 发表于 2007-3-24 18:57:34

原帖由 libertine 于 2007-3-24 13:30 发表 http://www.kofans.cn/bbs/static/image/common/back.gif
我的用PHP代码为什么不行啊,还是显示不了

http://www.0591ok.com/163.php?p=url

这url替换掉QQ相册地址还是不能显示
应该不会的,本站的就可以啊

ctgwglzc 发表于 2007-4-7 00:06:28

盗YAHOO社区图片

http://bbs.cn.yimg.com/user_img/200702/03/mazhj2000_1170502562415500.jpg


http://bbs.cn.yimg.com/user_img/200702/03/mazhj2000_1170502562415500.jpg




http://bbs.cn.yimg.com/user_img/200702/03/mazhj2000_1170502562415500.jpg
http://bbs.cn.yimg.com/user_img/200702/03/mazhj2000_1170502562415500.jpg

公子づ风 发表于 2007-6-23 00:26:45

看不懂~~
页: [1] 2
查看完整版本: 破解163相册、QQ相册、SOHU相册、51相册、YAHOO防盗链PHP、ASP代码