壹次网首页 | 工具源码首页 | 技术文章首页 | 文章分类 | | |

文章搜索: 分类 关键字
您的位置:首页网络编程ASP/shtml → 做ASP小偷时.经常需要用到的函数
做ASP小偷时.经常需要用到的函数
添加日期:2006-10-2 11:23:48     [ ]
采集页面:
Function GetPage(url)
dim SendData,Retrieval
 Set Retrieval = CreateObject("Microsoft.XMLHTTP")
 With Retrieval
 .Open "post", url, False
 .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
 .setRequestHeader "User-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)"
 .Send()
 GetPage = BytesToBstr(.ResponseBody)
 End With
 Set Retrieval = Nothing
End Function
转换乱码:
Function BytesToBstr(body)
 dim objstream
 set objstream = Server.CreateObject("adodb.stream")
 objstream.Type = 1
 objstream.Mode =3
 objstream.Open
 objstream.Write body
 objstream.Position = 0
 objstream.Type = 2
 objstream.Charset = "GB2312"
 BytesToBstr = objstream.ReadText
 objstream.Close
 set objstream = nothing
End Function
获取指定的内容
Function GetContent(str,start,last,n)
 If Instr(lcase(str),lcase(start))>0 then
 select case n
 case 0 '左右都截取(都取前面)(去处关键字)
 GetContent=Right(str,Len(str)-Instr(lcase(str),lcase(start))-Len(start)+1)
 GetContent=Left(GetContent,Instr(lcase(GetContent),lcase(last))-1)
 case 1 '左右都截取(都取前面)(保留关键字)
 GetContent=Right(str,Len(str)-Instr(lcase(str),lcase(start))+1)
 GetContent=Left(GetContent,Instr(lcase(GetContent),lcase(last))+Len(last)-1)
 case 2 '只往右截取(取前面的)(去除关键字)
 GetContent=Right(str,Len(str)-Instr(lcase(str),lcase(start))-Len(start)+1)
 end select
 Else
 GetContent=""
 End if
 end function

删除HTML标签:
function DelHtml(htmlCode)
dim iStart,iEnd
dim sTemp
sTemp=htmlCode
iStart=instr(sTemp,"<")
iEnd=instr(sTemp,">")
do while iStart>0 and iEnd>0 and iEnd-iStart>0
sTemp=replace(sTemp,mid(sTemp,iStart,iEnd-iStart+1),"")
iStart=instr(sTemp,"<")
iEnd=instr(sTemp,">")
loop
DelHtml=sTemp
end function
出处:转载 作者:neeao 点击:
 热点文章
·photoshop制作香烟、烟头、烟雾
·photoshop图片卷角、翻页效果的制作
·用U盘或移动硬盘装《深山红叶袖珍系统Win PE启动..
·photoshop经典恐怖片海报效果教程
·photoshop水晶球质感表现 - 关于光影的细节
·ghost.pif最新变种手动查杀,ARP欺骗挂马+KAV让..
·[css] table-layout:fixed 属性的解说,IE、Fire..
·photoshop制作3D立体小人和字体
·关于zend解密的程序
·自适应页面高度100%方法(表格直接100%高度没有效..
 推荐文章
·如何彻底删除一个不需要的系统服务
·模仿QQ和MSN消息提示的效果
·CC攻击的思路及防范方法
·广告联盟的一些评价
Powered by yici.net
CopyRight (C) 2006-2012 版权所有   [ 依次网 ];未经授权,任何人不得抄袭、仿冒本站
ICP备案:苏ICP备05011771号 证书下载 ICP证号:苏ICP证040301
仪征广目网络信息服务有限公司 版权所有