Thursday, August 8, 2013

Using .vbs and .bat File Will Let Us Login Into Any Websites Without Typing on the Keyboard

Auto Login to Any Websites and Browsers

This auto login is to make us easier to login to any websites without typing the username and the password. This tip will work if the browser is already running on the desktop and the desired website is already opened, for example Facebook, Gmail, Yahoo, etc. How to do that? We are going to use the Notepad and save it into .vbs and .bat file format.

The First Step (Creating .vbs file format using Notepad)
Copy the following codes into the Notepad then save it into .vbs file format (Yahoo.vbs):
set WshShell = WScript.CreateObject("WScript.Shell")

WScript.Sleep 4000
WshShell.SendKeys "username"
WScript.Sleep 2000
WshShell.SendKeys "{TAB}"
WScript.Sleep 2000
WshShell.SendKeys "password"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
WScript.Quit()

Note:
  1. Change the username inside the quotes with your email address.
  2. Change the password inside the quotes with your password.

For example:
set WshShell = WScript.CreateObject("WScript.Shell")

WScript.Sleep 4000
WshShell.SendKeys "bahadoel.ketawangakak@yahoo.co.uk"
WScript.Sleep 2000
WshShell.SendKeys "{TAB}"
WScript.Sleep 2000
WshShell.SendKeys "prikitiw"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
WScript.Quit()

The Second Step (Creating .bat file format using Notepad)
Copy the following codes into the Notepad then save it into .bat file format (Yahoo.bat):
@Echo Off
start The name of your .vbs file
goto End
:End

>> Change The name of your .vbs file with your .vbs file name.
For example:
@Echo Off
start Yahoo.vbs
goto End
:End

The Third Step (Saving Those File Into One Folder)
  1. Create New Folder then name it as you want.
  2. Move those two files (.vbs and .bat files) into the folder you have created.

The Fourth Step (Hiding the .vbs File So That No One Could See and Access the File)
  1. Press Home + R on the keyboard.
  2. Type in "cmd" (without quotes) then press Enter
  3. (the .vbs file is saved into the following path "E:\Accounts\Yahoo.vbs") On the Command Prompt type in the following code: attrib +h +r +s "The .vbs file path" (attrib +h +r +s "E:\Accounts\Yahoo.vbs") then press Enter (the .vbs file now should be hidden and no one know the username and the password inside the .vbs file)

The Last Steps Is to Use the File
  1. Open the browser then go to the desired website (the website should be associated with the account inside the .vbs file).
  2. Double click on the .bat file you have created.
  3. Then go to your browser.

NB:
  1. The .vbs file will not accept some symbols for username or password, such as ^, (, ), etc (one of my accounts using these symbols for the password).
  2. There is another way without opening the browser first but you will need to set the appropriate time for the file. Sometimes it will input only your password into the username field, and sometimes it will leave blank the username and input the password into the right field.
If you still want to try it, here is the code:
set WshShell = WScript.CreateObject("WScript.Shell")
call WshShell.Run("chrome.exe https://www.facebook.com/", 1, false)

WScript.Sleep 4000
WshShell.SendKeys "username"
WScript.Sleep 2000
WshShell.SendKeys "{TAB}"
WScript.Sleep 2000
WshShell.SendKeys "password"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
WScript.Quit()

Note: You may change the chrome.exe into the firefox.exe but it will not work on maxthon.exe. And you may change the https://www.facebook.com/ with the desired website.

Update:
For some symbols that won't accepted (gone an error) while sending the keys in vbscript, just put it in braces. For example, when we put these symbols %^() the vbscript is gone an error, then we need to put them in braces so that these symbols will be accepted in vbscript (it will be this way: {%}{^}{(}{)}. Follow this link for more details:

References



And my previous search for hiding the file and creating .vbs and .bat file on google

4 comments: