Jump to content

LOCKER


CodyBarrett
 Share

Recommended Posts

ok currently this isnt very secure.. but for MOST people it is... and unless they find out the path they wont be able to find it

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\ICONS\KEY&LOCK.ico
#AutoIt3Wrapper_Res_Description=Makes a secure folder
#AutoIt3Wrapper_Res_Fileversion=0.0031
#AutoIt3Wrapper_Res_LegalCopyright=Bob
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.0.0
 Author:         Bob

 Script Function:
    Keeps A Secure Folder

#ce ----------------------------------------------------------------------------
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <EditConstants.au3>
#include <ButtonConstants.au3>
#include <Misc.au3>
#Include <GuiEdit.au3>
#include <StaticConstants.au3>
#Include <String.au3>
#include <SendMessage.au3>


HotKeySet ('^{F1}', 'ChangePass')

Opt ('GuiOnEventMode', 1)
Opt ('MustDeclareVars', 1)

Global $Lockerpath = 'C:\LOCKER\'
Global $Lsoectkteirngs_ini = @ScriptDir & '\LSOECTKTEIRNGS.ini'
If Not FileExists ($Lockerpath) & Not FileExists ($Lsoectkteirngs_ini) Then 
    DirCreate ($Lockerpath)
    IniWrite ($Lsoectkteirngs_ini, '********', '********', _StringToHex ('tbhoeb'))
EndIf
Dim $CurrentPassword = _HexToString (IniRead ($Lsoectkteirngs_ini, '********', '********', ''))
Global $GUI = GUICreate ('LOCKER', 400, 145, -1, -1, -2139094904)
GUISetBkColor (0x0, $GUI)
GUISetFont (30, '', '', 'Courier New', $GUI)
Global $L = GUICtrlCreateLabel ('', 0, 0, 400, 20)
GUICtrlSetBkColor ($L, 0xFFFFFF)
Global $STATUSLABEL = GUICtrlCreateLabel ('LOCKER', 10, 30, 260, 50)
Dim $STATUSICON = GUICtrlCreateButton ('', 270,30, 100, 100, $BS_ICON)
Global $PASSWORD = GUICtrlCreateInput ('', 10, 70, 240, 50, $ES_PASSWORD)
GUICtrlSetBkColor ($PASSWORD, 0x0)
GUICtrlSetColor ($PASSWORD, 0xFFFFFF)
If FileGetAttrib ($Lockerpath) = 'RSHD' Then 
    GUICtrlSetImage ($STATUSICON,'Shell32.dll', -48)
    Dim $LockStatus = 0
Else
    GUICtrlSetImage ($STATUSICON,'Shell32.dll', -45)
    Dim $LockStatus = 1
EndIf   
GUICtrlSetColor ($STATUSLABEL, 0xFFFFFF)
GUICtrlSetOnEvent ($STATUSICON, 'Setattrib')
GUICtrlSetOnEvent ($L, '_WinMove')
GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit')
GUISetState ()

While 1
    Sleep (100)
WEnd

Func ChangePass ()
    If $LockStatus = 1 Then
        Local $i = InputBox ('Change Password...', 'Choose a new Password', 'Password', '*', 400, 120, -1, -1, '', $GUI)
        IniWrite ($Lsoectkteirngs_ini, '********', '********', _StringToHex ($i))
        $CurrentPassword = $i
    EndIf
EndFunc

Func Setattrib ()
    If GUICtrlRead ($PASSWORD) = $CurrentPassword Then
        If $LockStatus = 0 Then 
            $LockStatus = 1
            GUICtrlSetImage ($STATUSICON, 'Shell32.dll', -45)
            FileSetAttrib ($Lockerpath, '-SH')
            GUICtrlSetData ($PASSWORD, '')
            ShellExecute (@WindowsDir & '\explorer.exe', $Lockerpath)           
        ElseIf $LockStatus = 1 Then
            $LockStatus = 0
            GUICtrlSetImage ($STATUSICON, 'Shell32.dll', -48)
            FileSetAttrib ($Lockerpath, '+SH')
            GUICtrlSetData ($PASSWORD, '')
        EndIf
    EndIf
EndFunc

Func _WinMove ()
    While _IsPressed ('01')
        Local $x = MouseGetPos (0)
        Local $y = MouseGetPos (1)
        WinMove ($GUI, '', $x, $y)
    WEnd
EndFunc

Func _Exit ()
    FileSetAttrib ($Lockerpath, '+SH')
    Exit
EndFunc

EDIT

*Added

-INIREAD password change & _Stringtohex () convertion before writeing to ini

EDIT

*Added

-Gui set pos accoording to mousepos... click secondary on the background.. then primary to cancel it

EDIT

*Added

-GUI custom title bar

EDIT

*changed ShellExecute ('explorer.exe', $Lockerpath) TO ShellExecute (@WindowsDir & '\explorer.exe', $Lockerpath)

Edited by CodyBarrett
Link to comment
Share on other sites

NEW VERSION

updated at the top

Link to comment
Share on other sites

I would suggest changing

ShellExecute ('explorer.exe', $Lockerpath)
to
ShellExecute (@WindowsDir & '\explorer.exe', $Lockerpath)

Reason? There are a lot of viruses that create a file named explorer.exe on the Drive root and that will be read before the one in Windows. Of course the whole concept could be pooched if that has happened because your system may be screwed up.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

...

good point haha thank you..... DAMN YOU MALICIOUS CODERS!!!

Link to comment
Share on other sites

im guessing you ran it.. F1 resets the password but ONLY if your locker status is UNLOCKED... and to unlock it you need the original password... the original is "tbhoeb" but you can change it before compilation

Link to comment
Share on other sites

@CodyBarrett

Nice concept... you'll have to add manythings to make it better and im sure youre working on it :D

Suggestions :

-Select locker folder path

-Add option gui window

-Etc... :o

Cheers, FireFox.

Link to comment
Share on other sites

yes and thank you.. i GUESS i could make the LOCKER path resetable and when they reset it.. it moves the files to the new dir.. ill add that, and when you mean

-Add option gui window

...?
Link to comment
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
 Share

  • Recently Browsing   0 members

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