最新消息:

自己写的网盘登陆脚本,相当小白

软件技巧 大步 835浏览 0评论

哥网盘很多,密码多,每天都要登陆,为了那几M的空间增加和等级,重复输入密码相当繁琐,索性写了个

脚本,,以下为模拟按钮点击,容易默认输入发要是美式键盘,有点麻烦

#################################################华丽的分割线

Set a=WScript.CreateObject("WScript.shell")
a.run "http://www.gokuai.com/"
WScript.Sleep 10000
a.SendKeys "{TAB}"
a.SendKeys "1797639538@qq.com"
a.SendKeys "{TAB}"
WScript.Sleep 200
a.SendKeys "1qaz2wsx"
WScript.Sleep 200
a.SendKeys "{TAB}"
WScript.Sleep 200
a.SendKeys "{ENTER}"
msgbox("看片了!")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im SaaYaa.exe /t",0
WScript.Sleep 200
Dim ws,fso
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing

Dim wsc,fsoc
Set fsoc = CreateObject("scripting.filesystemobject")
set wsc = WScript.CreateObject("wscript.Shell")
sdir = wsc.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fsoc.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set wsc = Nothing
Set fsoc = Nothing

 

#############################################再次华丽的分割

每次都要修改默认输入法,这是很不爽的,于是我修改了一下,通过获取网页元素达到自动登陆目的,以下为代码,如果嫌麻烦代码太长,可以自己分割成两个文件,一个是删除cookies与关闭浏览器的脚本,一个是输入密码的脚本,自己改吧,我就写成一个,因为这个不是最终的版本。因为只定义一个变量容易出现不能再次调用浏览器的现象,所以我只能定义多个,这一点我也不爽

##############以下为代码##########

Dim ie   
Set ie=WScript.CreateObject("InternetExplorer.Application")
ie.Visible = True 
ie.navigate "http://www.gokuai.com/ 
Do
Wscript.Sleep 200
Loop Until ie.ReadyState=4
ie.Document.All("email").Value = "xkh768089810@dns123.org"
ie.Document.All("password").Value = "1qaz2wsx"     
ie.Document.getElementsByTagName_r("button")(0).click
msgbox("一个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set ie=Nothing
WScript.Sleep 200
Dim ws,fso
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing

Dim ief
Set ief=WScript.CreateObject("InternetExplorer.Application")
ief.Visible = True 
ief.navigate "http://u.115.com 
WScript.Sleep 100
Do
Wscript.Sleep 200
Loop Until ief.ReadyState=4 
ief.Document.All("account").Value = "XXXXXX@qq.com"
ief.Document.All("passwd").Value = "1qaz2wsx"     
ief.Document.All("passwd").Form.Submit() 
msgbox("八个")

 

#######################

我的最终是实现自动登陆领取空间,这要要调用javascript,貌似vbs死指望不上了,还么解决,得换c++,,有时间在折腾吧╭(╯^╰)╮

(今天发现由于够快网盘升级,他的网页代码重写了,所以需要稍加修改代码才能登陆,以下是修改的)

#####################################################

Dim ie   
Set ie=WScript.CreateObject("InternetExplorer.Application")
ie.Visible = True 
ie.navigate "http://www.gokuai.com/ 
Do
Wscript.Sleep 200
Loop Until ie.ReadyState=4
ie.Document.All("email").Value = "xkh768089810@dns123.org"
ie.Document.All("password").Value = "1qaz2wsx"     
ie.document.getElementByIdx_x("submit_btn").click
msgbox("一个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set ie=Nothing
WScript.Sleep 200
Dim ws,fso
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing
Dim iea
Set iea=WScript.CreateObject("InternetExplorer.Application")
iea.Visible = True 
iea.navigate "http://www.gokuai.com/ 
Do
Wscript.Sleep 200
Loop Until iea.ReadyState=4
iea.Document.All("email").Value = "XXXXXXXXXXXXX@163.com"
iea.Document.All("password").Value = "1qaz2wsx"     
iea.document.getElementByIdx_x("submit_btn").click
msgbox("两个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set iea=Nothing
WScript.Sleep 200
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing
DIm ieb
Set ieb=WScript.CreateObject("InternetExplorer.Application")
ieb.Visible = True 
ieb.navigate "http://www.gokuai.com/ 
Do
Wscript.Sleep 200
Loop Until ieb.ReadyState=4
ieb.Document.All("email").Value = "XXXXXXXXXX@qq.com"
ieb.Document.All("password").Value = "1qaz2wsx"     
ieb.document.getElementByIdx_x("submit_btn").click
msgbox("三个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set ieb=Nothing
WScript.Sleep 200
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing
Dim iec
Set iec=WScript.CreateObject("InternetExplorer.Application")
iec.Visible = True 
iec.navigate "http://www.gokuai.com/ 
Do
Wscript.Sleep 200
Loop Until iec.ReadyState=4
iec.Document.All("email").Value = "XXXXXXXXX@qq.com"
iec.Document.All("password").Value = "1qaz2wsx"     
iec.document.getElementByIdx_x("submit_btn").click
msgbox("四个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set iec=Nothing
WScript.Sleep 200
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing
Dim ied
Set ied=WScript.CreateObject("InternetExplorer.Application")
ied.Visible = True 
ied.navigate "http://www.gokuai.com/ 
Do
Wscript.Sleep 200
Loop Until ied.ReadyState=4
ied.Document.All("email").Value = "XXXXXXXX@qq.com"
ied.Document.All("password").Value = "1qaz2wsx"     
ied.document.getElementByIdx_x("submit_btn").click
msgbox("五个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set ied=Nothing
WScript.Sleep 200
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing
Dim iee
Set iee=WScript.CreateObject("InternetExplorer.Application")
iee.Visible = True 
iee.navigate "http://www.gokuai.com/ 
Do
Wscript.Sleep 200
Loop Until iee.ReadyState=4
iee.Document.All("email").Value = "XXXXXXXXX@qq.com"
iee.Document.All("password").Value = "1qaz2wsx"     
iee.document.getElementByIdx_x("submit_btn").click
msgbox("六个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set iee=Nothing
WScript.Sleep 200
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing
Dim ief
Set ief=WScript.CreateObject("InternetExplorer.Application")
ief.Visible = True 
ief.navigate "http://u.115.com 
WScript.Sleep 100
Do
Wscript.Sleep 200
Loop Until ief.ReadyState=4 
ief.Document.All("account").Value = "XXXXXXXXX@qq.com"
ief.Document.All("passwd").Value = "1qaz2wsx"     
ief.Document.All("passwd").Form.Submit() 
msgbox("七个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set ief=Nothing
WScript.Sleep 200
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing
Dim ieg
Set ieg=WScript.CreateObject("InternetExplorer.Application")
ieg.Visible = True 
ieg.navigate "http://u.115.com 
WScript.Sleep 100
Do
Wscript.Sleep 200
Loop Until ieg.ReadyState=4 
ieg.Document.All("account").Value = "XXXXXXX@qq.com"
ieg.Document.All("passwd").Value = "1qaz2wsx"     
ieg.Document.All("passwd").Form.Submit() 
msgbox("八个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set ieg=Nothing
WScript.Sleep 200
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing
Dim ieh
Set ieh=WScript.CreateObject("InternetExplorer.Application")
ieh.Visible = True 
ieh.navigate "http://u.115.com 
WScript.Sleep 100
Do
Wscript.Sleep 200
Loop Until ieh.ReadyState=4 
ieh.D
ocument.All("account").Value = "XXXXX@qq.com"
ieh.Document.All("passwd").Value = "1qaz2wsx"     
ieh.Document.All("passwd").Form.Submit() 
msgbox("九个")
WScript.Sleep 200
set WshShell =createobject("wscript.shell")
wscript.sleep 200
WshShell.run "cmd.exe /c taskkill /f /im iexplore.exe /t",0
set ieh=Nothing
WScript.Sleep 200
Set fso = CreateObject("scripting.filesystemobject")
set ws = WScript.CreateObject("wscript.Shell")
sdir = ws.RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersCookies")
Set dir = fso.GetFolder(sdir)
For Each f In dir.Files
     If f.Name <> "index.dat" Then f.Delete
Next
Set dir = nothing
Set ws = Nothing
Set fso = Nothing

 

转载请注明:大步's Blog » 自己写的网盘登陆脚本,相当小白

SiteMap