Jump to content

Recommended Posts

Posted (edited)

The script: (not mine) i am just using it to reset pasword 100 times, i removed the password and my email from sUN, curPw (pasword) and oldPW (pasword) The error is on line 65 I have already tried .vbs format. I am running WIndows 7 x64bit and tried CMD even on Admininstrator and tried running .vbs file through path but got an erorr, so I am trying the .au3 (also, excluding "LINE 65," and "<error is right here," they are just to point you to where i need help. thanks

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Declare Variables & Objects
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Dim oShell
Dim oAutoIt

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Initialise Variables & Objects
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Set oShell = WScript.CreateObject("WScript.Shell")
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

WScript.Echo "This script will reset your google password 100 times so you can use an old password."

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' You should only edit these values
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

sUN = "myemail@gmail.com" ' Your Google username (email address)
curPW = "?????????" ' Replace with the Current password to your google account
oldPW = "?????????" ' Replace with the final password you want assigned to the account. The one you want to set the account's password *back to*.

LINE 65' If your password has a quote in it ("), then use "" in its place. <error is right here
' For example, let's say your password was
' MyPass"word!-55
'
' The proper VBScript way to put that into a variable would look like this
' curPW = "MyPass""word!-55"
'
' See Microsoft's website for more detail

' An easy way to find this is to right click the Chrome shortcut and copy the value in Target.
' Click Start, type Chrome, right click Google Chrome, click Properties, copy *everything* in Target, and put it here.
ChromeEXE = "C:\Users\??????\AppData\Local\Google\Chrome\Application\chrome.exe" ' Where is the Chrome executable? Replace this with its location.

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' You should not have to edit anything after this
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Start of Script
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


'Some of this code uses the AutoIT com object. See their documentation for more details.

oShell.Run ChromeEXE, 1, False

' Wait for the Notepad window to become active
oAutoIt.WinWaitActive "New Tab - Google Chrome", ""
oAutoIt.Sleep 4000

WScript.Echo "Entering Loop"
' Enter the loop, change the password 99 more times
tCurPw = curPW

    oAutoIt.Send "!d"
    oAutoIt.Sleep 250   
    oAutoIt.Send "https://accounts.google.com/Login{ENTER}"
    oAutoIt.Sleep 5000


For x = 1 To 99
    WScript.Echo "Step " & x
    WScript.Echo "Current PW: " & tCurPw
    tNewPW = curPW & x
    WScript.Echo "Setting the password to: " & tNewPW
     
    GLogin sUN, tCurPw
    GEditPW
    oAutoIt.Send tCurPw & "{TAB} {TAB}"
    oAutoIt.Sleep 250
    oAutoIt.Send tNewPW & "{TAB}"
    oAutoIt.Sleep 250
    oAutoIt.Send tNewPW & "{TAB}"
    oAutoIt.Sleep 250
    oAutoIt.Send "{ENTER}"
    oAutoIt.Sleep 2500
     
    tCurPw = tNewPW

    GLogout
Next

WScript.Echo "Final Change"
GLogin sUN, tCurPw
GEditPW

oAutoIt.Send tCurPw & "{TAB}"
oAutoIt.Sleep 250
oAutoIt.Send oldPW & "{TAB}"
oAutoIt.Sleep 250
oAutoIt.Send oldPW & "{TAB}"
oAutoIt.Sleep 250
oAutoIt.Send "{ENTER}"
oAutoIt.Send "https://www.google.com/accounts/Logout{ENTER}"
oAutoIt.Sleep 4000
WScript.Echo "Password reset"




WScript.Quit

Function GLogin(un, pw) ' Opens the Google Login page, enters the supplied Username (un) and Password (pw), and presses Enter.
    WScript.Echo "Logging in: " & un & ", " & pw
    'oAutoIt.Send "!d"
    'oAutoIt.Sleep 550   
    'oAutoIt.Send "https://accounts.google.com/Login{ENTER}"
    'oAutoIt.Sleep 4000
    oAutoIt.Send un & "{TAB}"
    oAutoIt.Send pw & "{ENTER}"
    oAutoIt.Sleep 5000

End Function

Function GEditPW() ' Opens the Google Change Password web page
    oAutoIt.Send "!d"
    oAutoIt.Send "!d"
    oAutoIt.Sleep 250
    oAutoIt.Send "https://accounts.google.com/b/0/EditPasswd{ENTER}"
    oAutoIt.Sleep 3000
End Function

Function GLogout() ' Logs out from google. This is necessary for the password change to take effect. Trust me, I tried to do it without logging out. No luck.
    WScript.Echo "Logging out"
    oAutoIt.Send "!d"
    oAutoIt.Send "!d"
    oAutoIt.Sleep 250
    oAutoIt.Send "https://www.google.com/accounts/Logout{ENTER}"
    oAutoIt.Sleep 3000

End Function
 
 
 
Heres the error (in the picture) Thank you i would appreciate some help. here is the links of the origin of the script
 
If

2017-11-26 15_39_32-.png

Edited by JLogan3o13
Posted (edited)

Line 65 looks like a comment so it shouldn't be doing anything in the script. Perhaps it needs a ' or a  ; in front of it to make sure it is commented out of the script execution? That is VBS? Are you saving it as Script.vbs then running it from command prompt? Maybe try an elevated command prompt?

Edited by Nunos

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...