• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >ASP > 一小偷类!!有兴趣的可以看看

一小偷类!!有兴趣的可以看看

作者: 字体:[增加 减小] 来源:互联网 时间:2017-05-11

通过本文主要向大家介绍了小偷类电影,小偷类小说,小偷类游戏,都市小偷类小说,小偷类小品等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
类代码 (cls.asp)
<%

Class clsThief

Private strUrl    ' 偷取地址
Private strValue  ' 偷取的内容,所有内容
Private strResult ' 偷取结果,可以具体某一块内容
Private flag      ' 是否已经偷过

'-------初始化类--------'
Private Sub Class_Initialize()
    strUrl=""
 strValue=""
 strResult=""
 flag=false
End Sub

'------类结束-----------'
Private Sub Class_Terminate()
End Sub

'------初始化url属性----'
Public Property Let url(ByVal iurl)
    strUrl = iurl
End Property

'------返回输出内容----'
public property get value 
    value=strValue
end property

public property get result 
    result=strResult
end property

'------------文字处理-----------'
private Function BytesToBstr(body,Cset) 
    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 = Cset
    BytesToBstr = objstream.ReadText 
    objstream.Close
    set objstream = nothing
End Function

'-------文字处理-------'
private Function Ichange(str)
    Dim finalStr
 Dim icharCode
 Dim inextCode
    For i = 1 To lenb(str)
        icharCode = ascb(midb(str,i,1))
        If icharCode < &H80 Then
            finalStr = finalStr & chr(icharCode)
        Else
            inextCode = ascb(midb(str,i+1,1))
            finalstr = finalstr & chr(clng(icharCode) * &H100 + cint(inextCode))
            i = i + 1
        End If
    Next
Ichange = finalStr
End Function

'-------内容抓取--------'
Public sub Seize()
    if strUrl<>"" then
     dim iconnect
  Set iconnect = CreateObject("Microsoft.XMLHTTP")
        iconnect.open "GET",strUrl,false 
        iconnect.send()

  strValue = BytesToBSTR(iconnect.responseBody,"GB2312")
  flag=true
  set iconnect = nothing
  if err.number<>0 then err.Clear
 else
     response.write("请设置url的属性,即url地址")
 end if
end sub

'------内容分析------'
Public sub Assay(head,headCusor,bot,botCusor)
    if flag = false then call Seize()
    if instr(strValue,head) and instr(strValue,bot) then
  dim inum
  inum = len(strValue)-instr(strValue,head)-len(head)-headCusor
  strValue=right(strValue,inum)
     inum = instr(strValue,bot)-1+botCusor
  strResult=left(strValue,inum)
 else
  strResult = "没有匹配到相关记录,请检查开始标记代码是否唯一"
    end if 
end sub

'----替换空格及回车行----'
public sub Shift() 
if flag= false then call Seize()
    strResult=replace(replace(strResult , vbCr,""),vbLf,"")
end sub

'------对内容自定义替换----'
Public sub Change(oldStr,newStr)
    if flag=false then call Seize()
 strResult = replace(strResult,oldStr,newStr)
end sub

'--------自定义正则进行匹配---'
public sub pickByReg(patrn) 
    if isGet_= false then call Seize()
    dim tempReg,match,matches,content
    set tempReg=new RegExp
    tempReg.IgnoreCase=true
    tempReg.Global=true
    tempReg.Pattern=patrn
    set matches=tempReg.execute(value_)
    for each match in matches
    content=content&match.value&"<!--lkstar-->"
    next
    strValue=content
    set matches=nothing
    set tempReg=nothing
end sub

'--------如果有首页文件则转入-----------'
Public sub CheckFile(folderName,fileName)
    dim url
 Set fs=Server.CreateObject("Scripting.FileSystemObject")
 if fs.FolderExists(server.MapPath("./")&"\"&folderName&"\"&fileName) then 
     set fs = nothing
  url = folderName&"/"&fileName
  response.write url
  'response.redirect url
 end if
end sub

'------生成文件------'
Public sub MakeFile(folderName,fileName)
    Set fs=Server.CreateObject("Scripting.FileSystemObject")

    if folderName<>"" then
     if not fs.FolderExists(server.MapPath("/"&folderName&"/")) then 
            response.write "文件不存在"
      fs.CreateFolder(folderName)
     else
         response.write "文件存在"
        end if
 end if

    Set CrFi=fs.CreateTextFile(server.MapPath("./")&"\"&folderName&"\"&fileName)
        Crfi.Writeline(strResult)
    set CrFi=nothing
    set fs=nothing
 dim url
 url = folderName&"/"&fileName
    response.redirect url

end sub

'-------查看偷出的代码----'
public sub look()
    dim tempstr
    tempstr="<SCRIPT>function runEx(){var winEx2 = window.op
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 一小偷类!!有兴趣的可以看看
  • 发一个采集(小偷)用的类,ASP+缓存实现

相关文章

  • 2017-05-11万能数据库连接程序
  • 2017-05-11ASP让url的中文显示为编码
  • 2017-05-11asp防范跨站点脚本攻击的的方法
  • 2017-05-11Script.VBS.Agent.ai juan.vbs专杀
  • 2017-05-11VBS加密免杀器 下载
  • 2017-05-11ASP 相关文章或者相关产品
  • 2017-05-11Tsys OkHtm.com修改版数据采集方法
  • 2017-05-11ASP实现类似hashMap功能的类
  • 2017-05-11asp操作access提示无法从指定的数据表中删除原因分析及解决
  • 2017-05-11小偷,采集程序常用函数

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • Access数据库中“所有记录中均未找到搜索关键字”的解决方法
    • 手写个小组件(组件入门)asp版
    • 在MsSql、Access两种数据库中插入记录后马上得到自动编号的ID值
    • jb51内容分页函数 原创
    • 用Command对象和RecordSet对象向数据库增加记录哪一个更好
    • aspupload 3.0 下载与使用集锦
    • ASP 支持中文的len(),left(),right()的函数代码
    • ASP 改良版MD5、SHA256多重加密类(二次及多次)
    • asp连接SQL和Access数据代码(asp里的随机函数)
    • ASP去掉字符串头尾连续回车和空格的Function

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有