blacksilence Posted July 10, 2008 Posted July 10, 2008 TrueCrypt Version: 6.0a AutoIt Version: 3.2.12.1 OS: Windows XP SP2 Problem: I already use AutoIt to automatically deploy TrueCrypt to my desktops. After the installation I wanted to automate the process of encrypting the harddrive. The problem is that the dialogue where I have to enter the password that encrypts the master key has got a copy & paste protection. I use this piece of code to paste my password into the password fields: CODE; TrueCrypt Volume Creation Wizard ; Password WinWait("TrueCrypt Volume Creation Wizard", "Password") WinActivate("TrueCrypt Volume Creation Wizard", "Password") ControlSetText("TrueCrypt Setup", "", "Edit1", "") Sleep(1000) ControlSetText("TrueCrypt Setup", "", "Edit1", $password) Sleep(1000) ControlSetText("TrueCrypt Setup", "", "Edit2", "") Sleep(1000) ControlSetText("TrueCrypt Setup", "", "Edit2", $password) MsgBox(0x40010, @ScriptName, "Passwort: " & $password, 4) ControlClick("TrueCrypt Volume Creation Wizard", "Password", "Button3") Button 3 is locked all the time. It gets unlocked when the two password fields have the same content. However, the two password fields never get filled with my password. Although the password fields are empty and Button 3 (Next button) is locked, AutoIt somehow sends a click command to the button and jumps to the next screen. As a result the preboot password is empty. any idea how I could bypass the copy & paste protection of TrueCrypt?
Airwolf Posted July 10, 2008 Posted July 10, 2008 Use ControlSend() instead of ControlSetText(). Also, you may want to find out if there is a silent method for enabling the encryption with TrueCrypt (i.e. via command-line). Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
blacksilence Posted July 10, 2008 Author Posted July 10, 2008 Many thanks for your help. The copy and past protection can also be bypassed by using the ControlSetText() function. My mistake was that I used the wrong window title. Now it works perfectly with: ; TrueCrypt Volume Creation Wizard ; Password WinWait("TrueCrypt Volume Creation Wizard", "Password") WinActivate("TrueCrypt Volume Creation Wizard", "Password") ControlSetText("TrueCrypt Volume Creation Wizard", "", "Edit1", $password) ControlSetText("TrueCrypt Volume Creation Wizard", "", "Edit2", $password) ControlClick("TrueCrypt Volume Creation Wizard", "Password", "Button3")
WorldIsOnAutoIt Posted July 14, 2009 Posted July 14, 2009 Many thanks for your help. The copy and past protection can also be bypassed by using the ControlSetText() function. My mistake was that I used the wrong window title. Now it works perfectly with: ; TrueCrypt Volume Creation Wizard ; Password WinWait("TrueCrypt Volume Creation Wizard", "Password") WinActivate("TrueCrypt Volume Creation Wizard", "Password") ControlSetText("TrueCrypt Volume Creation Wizard", "", "Edit1", $password) ControlSetText("TrueCrypt Volume Creation Wizard", "", "Edit2", $password) ControlClick("TrueCrypt Volume Creation Wizard", "Password", "Button3") Do you have the Code that i can use to Automate the Install and Encryption of System Partition or entire system drive.?
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