• 论坛灌水脚本 (vbs)


    最近发现vbs脚本好玩,就试着写了一个灌水脚本。异常恢复还没有头绪,查资料中...用这个,害得我的帐号被禁言了郁闷。得做个好公民哦!!仅做测试,不要利用这个做坏事哦!!
    'Urls
    'strUrl="http://bbs.xunlei.com/thread-1699489-1-1.html"
    'strUrl="http://bbs.xunlei.com/forum-83-1.html?frameon=no" 'Root 奇闻
    'strUrl="http://bbs.xunlei.com/forum-374-1.html?frameon=no" '社会万象
    strUrl="http://bbs.xunlei.com/forum-48-1.html?frameon=no" '军事
    'strUrl="http://bbs.xunlei.com/forum-64-2.html?frameon=no" '社会万象
    'strUrl="http://bbs.xunlei.com/forum-491-2.html?frameon=no" '明星档案

    bOK=false '判定重新刷新页面
    tmpUrl=""
    tmpcounter=0
    logUrl="logs.html"
    strLocalUrl=replace(WScript.ScriptFullName,WScript.ScriptName,"") '获取脚本运行路径

    If Right(strLocalUrl,1)<>"\" then strLocalUrl=strLocalUrl&"\" End if '修正文件路径
    set ieLog=CreateObject("InternetExplorer.application") '日志窗口
    set ietaget=CreateObject("InternetExplorer.application") '目标窗口
    set opIE=CreateObject("InternetExplorer.application") '操作窗口
    ieLog.visible=true
    opIE.visible=true
    ietaget.visible=true
    ietaget.navigate strUrl
    ieLog.navigate strLocalUrl&logUrl


    Do While (ietaget.Busy Or opIE.Busy Or ieLog.busy)
        Wscript.Sleep 3000
    Loop 

    Wlog "定位页面成功..."

    OutLinks


    'Wlog "填写回复内容..."
    'ietaget.Document.getElementByID("message").value="恩,很好。顶顶啦啦..呵呵!"
    'Wlog "Sleep 3s..."
    'Wscript.Sleep 3000
    'ietaget.Document.getElementByID("postform").submit()
    'Wlog "提交信息完毕!"

     '************************

    ieLog.quit

    opIE.quit

    ietaget.quit 

    '********************functions

    Function Wlog(message)
        tmpcounter=tmpcounter+1
        If tmpcounter<15 Then
         ieLog.Document.getElementByID("logs").innerhtml=ieLog.Document.getElementByID("logs").innerhtml&"<br/>"&Time&"-|-"&message
        Else
         ieLog.Document.getElementByID("logs").innerhtml="<br/>"&Time&"-|-"&message
         tmpcounter=0
        End If
    End Function

    Function OutLinks()
     Wlog "开始获取链接......"
     set alllink=ietaget.Document.links
     Wlog alllink.length
     except=ieLog.Document.getElementByID("except").innerText
     ids=split(except,",")
     exists=false

     For Each link in alllink
      exists=False
      For i=0 to Ubound(ids) 
       if(Instr(link.href,ids(i))>0) Then
        exists=True
       End IF
      Next
      If (Instr(link.href,"thread")>0) and (Instr(link.href,"html")>0) and (link.href<>tmpUrl) and (not exists) Then
       Wlog "正在处理链接"&link.href
       tmpUrl=link.href
       Wlog ">>进入"&link.href
       
       Do While (opIE.Busy)
           Wscript.Sleep 3000
       Loop

       opIE.navigate link.href '

       Do While (opIE.Busy)
           Wscript.Sleep 3000
       Loop
       
       For i=0 to 3
        title=Replace(opIE.Document.Title," ","")
        title=Replace(title,"InternetExplorer","")
        IF (Instr(title,"无法显示")>0) Then
         opIE.Refresh
        Else
         bOK=True
         Exit for
        End IF
        Do While (opIE.Busy)
             Wscript.Sleep 3000
        Loop
        bOK=False
       Next
       
       IF bOK Then
        Wlog "添加回复信息..."

         opIE.Document.getElementByID("message").value= ieLog.Document.getElementByID("outInfo").value
         Wscript.Sleep 3000
         Wlog "准备提交数据..."
         opIE.Document.getElementByID("postform").submit() '提交表单
         Wlog "处理完毕...................................."
         Wscript.Sleep 3000

       End IF

      End IF 
      
      IF (Instr(link.href,"forum")>0) and (Instr(link.href,"html")>0) Then
       Wlog "遇到分页了>>>>>>>>>>>>>"
      End IF
     Next
     Wlog "*******************************操作数据完毕***********************"
    End Function

  • 相关阅读:
    107、Java中String类之判断开头或结尾
    106、Java中String类之使用contains()方法判断子字符串是否存在
    105、Java中String类之利用indexOf()方法判断子字符串是否存在
    104、Java中String类之使用indexOf()等功能查找
    103、Java中String类之compareTo()方法
    102、Java中String类之相等判断(忽略大小写)
    101、Java中String类之判断是否由数字组成
    100、Java中String类之字符串转为大写
    099、Java中String类之字符数组与字符串的转换
    098、Java中String类之charAt()方法
  • 原文地址:https://www.cnblogs.com/netwenchao/p/1359765.html
Copyright © 2020-2023  润新知