Sign in to follow this  
Followers 0
HiSoftDev

password problem

6 posts in this topic

i want to use/set the same password which is used by current User and/or Admin.

i am creating a app which is similar to some other program but it will have some extra functions.

the another program is created in C++ by any other author which have the function to set the password as the admin have by default. like this.

Posted Image

can any one point me to the correct direction and help me out?

many many thanks in advance for the help.


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

i want to use/set the same password which is used by current User and/or Admin.

i am creating a app which is similar to some other program but it will have some extra functions.

the another program is created in C++ by any other author which have the function to set the password as the admin have by default. like this.

Posted Image

can any one point me to the correct direction and help me out?

many many thanks in advance for the help.

I hope I understand what you're looking for. This is an easy way to verify the password is correct.

$username = "Administrator"
$password = InputBox("Password","","password","*")

$pid = RunAs($username,@ComputerName,$password,0,@ComSpec & " /c","",@SW_HIDE)
If $pid = 0 Then 
    msgbox(0,"Failed","Password Incorrect")
Else
    msgbox(0,"Success","Password Correct")
EndIf

Just remember, 3 bad attempts equals lockout. :) Unless it's THE local admin account.

Edited by spudw2k

Share this post


Link to post
Share on other sites

I hope I understand what you\'re looking for. This is an easy way to verify the password is correct.

$username = \"Administrator\"
$password = InputBox(\"Password\",\"\",\"password\",\"*\")

$pid = RunAs($username,@ComputerName,$password,0,@ComSpec & \" /c\",\"\",@SW_HIDE)
If $pid = 0 Then 
    msgbox(0,\"Failed\",\"Password Incorrect\")
Else
    msgbox(0,\"Success\",\"Password Correct\")
EndIf

Just remember, 3 bad attempts equals lockout. :) Unless it\'s THE local admin account.

thanks, but how can i use it in my own GUI? sorry for too many questions... (Newbie here)

Share this post


Link to post
Share on other sites

thanks, but how can i use it in my own GUI? sorry for too many questions... (Newbie here)

The example I posted checks if username/password credentials are correct. Is that what you are trying to accomplish? If you post your GUI code I can help show you how to implement the check function.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Here something i put together for what i think you want, just put "password" into the input box and click ok. the username would be along the same things as the password.

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>


GUICreate("My GUI combo")  ; will create a dialog box that when displayed is centered
$password = "password"
$input = GUICtrlCreateInput("", 10,10,100,20,$ES_PASSWORD)
$button = GUICtrlCreateButton("O.K.", 25, 50)
    GUISetState()

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        
        If $msg = $button Then
            if GUICtrlRead($input) = $password Then
                GUICtrlDelete($input)
                GUICtrlDelete($button)
                $listView = GuiCtrlCreateListView(" # |Program Name| Program Path", 10, 10, 380, 180)
                GuiCtrlCreateListViewItem("1|a|z", $listView)
                GuiCtrlCreateListViewItem("2|b|y", $listView)
                GuiCtrlCreateListViewItem("3|c|x", $listView)
                GuiCtrlCreateListViewItem("4|d|w", $listView)
            
            Else
                
                MsgBox(0,"Wrong", "Incorrect Password")
            EndIf
        EndIf
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
Edited by Rental

Share this post


Link to post
Share on other sites

i want to use/set the same password which is used by current User and/or Admin.

i am creating a app which is similar to some other program but it will have some extra functions.

the another program is created in C++ by any other author which have the function to set the password as the admin have by default. like this.

Posted Image

can any one point me to the correct direction and help me out?

many many thanks in advance for the help.

Do I understand that you want to actually read the current user or Administrator's password from somewhere? That's not going to happen. If that other app actually has the password, then it was obtained either very foolishly (like the Admin put it in an INI file or hard-coded into the app), or very maliciously (like it was trapped by a keylogger).

Exactly where do you suppose that other app got the password?

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0