아래 세트를 편집하는 데 도움을 요청하십시오. 계획은 한 페이지에서만 여러 개의 다른 URL 자동 봇 로그인을 만드는 것입니다. (예 : yahoo.com, gmail.com, facebook.com 등에 자동 로그인) 하나의 웹 페이지 브라우저 IE에서만
set a = createobject ("wscript.shell")
a.run "URL"
wscript.sleep (5000)
a.sendkeys ("username")
a.sendkeys chr (9)
wscript.sleep (2000)
a.sendkeys ("password")
a.sendkeys "{Enter}"
wscript.quit
SendKeys 메서드를 사용할 필요가 없습니다. .value
메서드 를 사용하여 각 사이트의 요소를 검사하여 사용자 이름 상자와 암호 상자에서 ID를 얻을 수 있습니다 . 이렇게 ie.Doucment.All.Item("email").Value= "Password goes in here"
.
페이스 북 :
Option Explicit
Dim ie
ie = CreatObject("InternetExplorer.Application")
Sub WhilD
Do While ie.busy
wscript.sleep 200
loop
End Sub
ie.Navigate "www.facebook.com"
Call WhilD
ie.Document.All.Item("email").value = "Facebook username goes here"
ie.Document.All.Item("pass").value = "Facebook password goes here"
ie.Document.All.Item("login_form").submit
Call WhilD
ie.navOpenInNewWindow = 1
Call WhilD
ie.Document.All.Item("Email").value = "Gmail username goes here"
ie.Document.All.Item("Passwd").value = "Gmail password goes here"
ie.Document.All.Item("SignIn").Submit
wscript.quit
email은 Facebook의 사용자 이름 입력 상자에 대한 HTML ID입니다. pass는 Facebook의 비밀번호 입력 상자에 대한 HTML ID이고 login_form은 로그인하기 위해 클릭 한 버튼의 HTML ID입니다. 입력 상자를 통해 할 수있는 또 다른 방법이 있습니다. 따라서 컴퓨터는 탐색하려는 페이지와 선택한 사이트의 사용자 이름 및 비밀번호를 묻습니다. 다음과 같이 보입니다.
Option Explicit
Dim x,msgB,inpB,ie,ieDAI,FBU,FBP,GMU,GMP,HMU,HMP,YHU,YHP
Set x=CreateObject("Wscript.Shell")
Set ie=CreateObject("InternetExplorer.Application")
Sub WhiLD
Do While ie.busy
wscript.sleep 200
loop
End Sub
inpB=inputbox("What website would you like to login to?"&vbLf&"Facebook"&vbLF&"Gmail"&vbLF&"Hotmail"&vbLF&"Yahoo")
If inpB="Facebook" then
On Error Resume Next
FBU=inputbox("Enter Facebook Username")
FBP=inputbox("Enter Facebook Password")
ie.Navigate"www.facebook.com"
ie.Left=0
ie.Toolbar=1
ie.StatusBar=0
ie.Height=200
ie.Width=1020
Call WhiLD
ie.Document.All.Item("email").Value= FBU
ie.Document.All.Item("pass").Value= FBP
ie.Document.All.Item("login_form").Submit
Call WhilD
ie.fullscreen=1
ie.Visible=1
wscript.quit
End If
If inpB="Gmail" then
On Error Resume Next
GMU=inputbox("Enter Gmail Username")
GMP=inputbox("Enter Gmail Password")
ie.Navigate"https://accounts.google.com/ServiceLogin?service=mail&continue=https://mail.google.com/mail/"
ie.Left=0
ie.Toolbar=1
ie.StatusBar=0
ie.Height=200
ie.Width=1020
Call WhiLD
ie.Doucment.All.Item("Email").Value= GMU
ie.Doucment.All.Item("Passwd").Value= GMP
ie.Doucment.All.Item("SignIn").Submit
Call WhilD
ie.fullscreen=1
ie.Visible=1
wscript.quit
End If
If inpB="Hotmail" then
On Error Resume Next
HMU=inputbox("Enter Hotmail Username")
HMP=inputbox("Enter Hotmail Password")
ie.Navigate"https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=12&ct=1414030279&rver=6.4.6456.0&wp=MBI_SSL_SHARED&wreply=https:%2F%2Fblu168.mail.live.com%2Fdefault.aspx%3Fmkt%3Den-au%26rru%3Dinbox&lc=3081&id=64855&mkt=en-au&cbcxt=mai"
ie.Left=0
ie.Toolbar=1
ie.StatusBar=0
ie.Height=200
ie.Width=1020
Call WhiLD
ie.Doucment.All.Item("idDiv_PWD_UsernameExample").Value= HMU
ie.Doucment.All.Item("idDiv_PWD_PasswordExample").Value= HMP
ie.Doucment.All.Item("idSIButton9").Submit
Call WhiLD
ie.fullscreen=1
ie.Visible=1
wscript.quit
End If
If inpB="Yahoo" then
On Error Resume Next
HMU=inputbox("Enter Yahoo Username")
HMP=inputbox("Enter Yahoo Password")
ie.Navigate"https://login.yahoo.com/"
ie.Left=0
ie.Toolbar=1
ie.StatusBar=0
ie.Height=200
ie.Width=1020
Call WhiLD
ie.Doucment.All.Item("username").Value= YHU
ie.Doucment.All.Item("passwd").Value= YHP
ie.Doucment.All.Item(".save").Submit
Call WhiLD
ie.fullscreen=1
ie.Visible=1
wscript.quit
End If
If inpB=2 then
wscript.quit
End If
사용자 지정 IE Explorer를 사용할 수도 있습니다. 그것이 내가 전에 한 일입니다. 더 효율적일 수 있지만 모든 것이 이렇게 배치되면 배우고 이해하는 것이 더 쉽습니다.
참고 : 웹 사이트에 이미 로그인되어있는 경우 이러한 VBScript는 작동하지 않습니다.
도움이 되었기를 바랍니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다