HiSoftDev Posted September 26, 2008 Share Posted September 26, 2008 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.can any one point me to the correct direction and help me out? many many thanks in advance for the help. Link to comment Share on other sites More sharing options...
spudw2k Posted September 26, 2008 Share Posted September 26, 2008 (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. 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 September 26, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
HiSoftDev Posted September 26, 2008 Author Share Posted September 26, 2008 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) Link to comment Share on other sites More sharing options...
spudw2k Posted September 26, 2008 Share Posted September 26, 2008 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. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Rental Posted September 27, 2008 Share Posted September 27, 2008 (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 September 27, 2008 by Rental Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 27, 2008 Share Posted September 27, 2008 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.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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now