论坛灌水脚本 (vbs)

编程入门 行业动态 更新时间:2024-10-10 07:26:12

论坛灌水<a href=https://www.elefans.com/category/jswz/34/1771291.html style=脚本 (vbs)"/>

论坛灌水脚本 (vbs)

最近发现vbs脚本好玩,就试着写了一个灌水脚本。异常恢复还没有头绪,查资料中...用这个,害得我的帐号被禁言了郁闷。得做个好公民哦!!仅做测试,不要利用这个做坏事哦!!
'Urls
'strUrl=".html"
'strUrl=".html?frameon=no" 'Root 奇闻
'strUrl=".html?frameon=no" '社会万象
strUrl=".html?frameon=no" '军事
'strUrl=".html?frameon=no" '社会万象
'strUrl=".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

转载于:.html

更多推荐

论坛灌水脚本 (vbs)

本文发布于:2024-03-11 20:49:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1729862.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:脚本   灌水   论坛   vbs

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!