Even een copy paste van een ander topic, gesteld op het scholieren forum van TU Delft.
Hoi allemaal!
Ben nu een maand of .. 2 bezig met mijn eigen programma, het stelt nu nog niet heel veel voor, en heb al flink wat ideeën ter uitbreiding, maar laat ik eerst even uitleggen wat nu precies het probleem is.
Ik heb een programma samengesteld met autoitscript (www.autoitscript.com). Dit is een programmeertaal gebaseerd op c++.
Samengesteld, omdat ik simpelweg ongeveer 4 programma's tot 1 heb gemaakt. Door het samen te voegen. Als mijn programma helemaal un-hackbaar is zal ik de bronvermeldingen en andere dingen er natuurlijk ook in verwerken.
Het programma is bedoeld, om eenmaal opgestart, je er niet meer langs te laten. Alt + f4 etc. zal niet werken. Ik maak dit programma omdat ik bijv. op school of ergens anders me laptop ergens achterlaat, en er vervolgens niet mee gekloot kan worden.
Nu mis ik nog een paar dingen:
- Ctrl alt del werkt nog steeds. Als je 2x op enter duwt, na ctrl alt del zal dit je weer terug brengen in het programma, maar zodra je met de pijltjes toetsen gaat rommelen, kan je de pc gewoon opnieuw opstarten. Dit is opzich niet erg, gezien ik het ook als opstart programma kan zetten, maar dan moet ik wel zorgen dat of: er een auto-save alles inkomt, zodat er geen werk verloren kan gaan, of dat ik alleen me pc achterlaat met gesaved en afgesloten werk.
( Het beste zou zijn, als in het register van m'n laptop iets veranderd wordt, waardoor, eenmaal in het programma, ctrl alt del niet meer herkend zal worden, en er dus niets gebeurt. Maar nergens is de registersleutel te vinden =[ )
- Windows + <toets > combo's werken nog steeds. Dit eigenlijk hetzelfde als bij ctrl alt del.. iets in het register veranderen lijkt de beste optie
Eenmaal uit het programma, moeten wel alle registerwaarde weer terug naar wat ze waren.
Waar kunnen jullie mij mee helpen?
- Registersleutels van CAD én windows knoppen. Wat zijn deze sleutels en welke waarde moet ik waarin veranderen voor het gewenste effect? Hoe dit vervolgens in autoit vertaalt word, daar maar ik me wel zorgen over.
- Enige opmerkingen, suggesties, tips, of andere feedback.
Groetjes,
Simolokid.
-----------------------------
Weten jullie misschien de registersleutels? Dat is eigenlijk het enige wat ik nog hebben moet. Daarna wordt het vooral veel *****n met het zippen, unzippen, maken van een installer etc. Disclaimer, algemene voorwaarden, bronvermeldingen etc.
Misschien ook meteen alt + tab disablen dmv registry. Nu plaatst het programma zich steeds binnen enkele tienden seconden bovenop het gealt-tabde. Dit heeft een vrij raar aanzicht.
(Gezien jullie wel een [code) mogelijkheid hebben:
[cpp]#NoTrayIcon
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <MISC.AU3>
#Include <WinAPI.au3>
#include <String.au3>
#include <Array.au3>
#Include <Misc.au3>
global $t=0
Opt("WinTitleMatchMode", 4)
If @AutoItX64 Then
DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)
EndIf
HotKeySet("!{F4}","nicetry")
HotKeySet("!{D}","nicetry")
HotKeySet("!{TAB}","nicetry")
HotKeySet("{ESC}", "nicetry")
HotKeySet("!{r}", "Exitprogram")
HotKeySet("{LWIN}{d}", "nicetry")
HotKeySet("{RWIN}{d}", "nicetry")
HotKeySet("{SPACE}", "nicetry")
HotKeySet("{LEFT}", "nicetry")
HotKeySet("{RIGHT}", "nicetry")
HotKeySet("{UP}", "nicetry")
HotKeySet("{DOWN}", "nicetry")
HotKeySet("!{TAB}", "nicetry")
HotKeySet("{F1}", "nicetry")
;Opt ('GUIoneventmode', 1)
$dll = DllOpen("user32.dll")
If _Singleton("LiA - Lock it all V2.0", 1) = 0 Then
ProcessClose("Lck.exe")
ProcessWaitClose("Lck.exe")
Exit
EndIf
$_VERSION = '2.0.0'
$_SETTINGS = "settings.ini"
$_CRYPTSTRING = "LiA - Lock it all V2.0"
Global $_COPYRIGHT = "LiA - Lock it all V2.0 " & $_VERSION & @CRLF & "LiA"
Global Enum $TIMERID1 = 1001
$winlock = DllOpen("WinLockDll.dll")
If Not FileExists("settings.ini") Then
MsgBox(0, "Firstrun", "Welcome to LiAV2.0, the next step will help you configure LiA." & @CRLF & @CRLF & "To run this setup again or change your password, delete the settings.ini found in the installation directory, or presh F6 once the program is running." & @CRLF & @CRLF & "For any questions - simoscript@hotmail.com.")
CreateSettingsFile()
Else
$_INIVERSION = IniRead("settings.ini", "app", "version", '0')
If $_VERSION <> $_INIVERSION Then
MsgBox(0, "Error", "Your settings file was created in a different version, creating a new one...")
FileDelete("settings.ini")
CreateSettingsFile()
EndIf
EndIf
Global $PassForm, $Input1, $Button1, $nMsg, $Attempts = 5,$Password="1111"
Global $passcode = _StringEncrypt(0, IniRead($_SETTINGS, "set", "passcode", '0000'), $_CRYPTSTRING)
Global $display_clock = IniRead($_SETTINGS, "set", "display_clock", '0')
If Not IsDeclared("SM_VIRTUALWIDTH") Then Global Const $SM_VIRTUALWIDTH = 78
If Not IsDeclared("SM_VIRTUALHEIGHT") Then Global Const $SM_VIRTUALHEIGHT = 79
$VirtualDesktopWidth = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", $SM_VIRTUALWIDTH)
$VirtualDesktopWidth = $VirtualDesktopWidth[0]
$VirtualDesktopHeight = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", $SM_VIRTUALHEIGHT)
$VirtualDesktopHeight = $VirtualDesktopHeight[0]
Global $_WinWidth=$VirtualDesktopWidth
Global $_WinHeight=$VirtualDesktopHeight
Global $prevleng = 0
Global $mainpassentry
Global $hwnd = WinGetHandle("classname=Progman")
Global $user32 = DllOpen("user32.dll")
Global $last_active = 0
Global $timer = TimerInit()
Global $DELAYTIMER = TimerInit()
Global $DELAY = 3
Global $DELAYTIMER2 = TimerInit()
Global $DELAY2 = 5
Global $new_data = "Loading..."
Global $old_data = ""
Global $_INFO[1]
Global $LabelStyle = $SS_CENTER
global $iTimer1
Global $hCallback, $old_pass,$new_pass,$conf_pass, $message, $pass_msg,$p=0,$mArray[6]=["","","","","",""]
MainLock()
;$Parent = WinGetHandle ('Program Manager','')
DllClose($dll)
Func DoNothing()
Return
EndFunc
Func exit1()
MsgBox(0, "External program is still running", "Depending on when you exited LiA, the external mousemovement is still running. Please check for a blue logo at the taskbar, and disable it.")
Exit
EndFunc
Func _RandomMsg()
Local $RandomMsg[16]
$RandomMsg[0] = "Hit head on Keyboard to Continue!"
$RandomMsg[1] = "Step away from the computer."
$RandomMsg[2] = "Your not Mattijs."
$RandomMsg[3] = "Give Up! Stop you lame attempts."
$RandomMsg[4] = "Don't Touch the Keyboard!"
$RandomMsg[5] = "How many more insults, till you stop??"
$RandomMsg[6] = "UNAUTHORIZED ENTRY DENIED!!"
$RandomMsg[7] = "Stop pushing my buttons."
$RandomMsg[8] = "Seriously. Go get a Life!!"
$RandomMsg[9] = "Ctrl-Alt-Dip****"
$RandomMsg[10] = "Would you mind stopping?"
$RandomMsg[11] = "Rot op!"
$RandomMsg[12] = "Zou ik niet nog een keer doen!"
$RandomMsg[13] = "Probeer je me nou echt af te sluiten?"
$RandomMsg[14] = "Zo simpel zit ik echt niet in elkaar.."
$RandomMsg[15] = "Hoe dom zie ik eruit?"
Return $RandomMsg[Random(16)]
EndFunc
Func Exitprogram()
If ProcessExists("mousemover.exe") = 1 Then
ProcessClose("mousemover.exe")
ProcessClose("mousemover.exe")
MsgBox(0, "External program is still running", "Depending on when you exited LiA, the external mousemovement is still running. Please check for a blue logo at the taskbar, and disable it.")
ElseIf ProcessExists("mousemover.exe") = 0 Then
MsgBox(0, "External program is still running", "Depending on when you exited LiA, the external mousemovement is still running. Please check for a blue logo at the taskbar, and disable it.")
Exit
Else
Exit
EndIf
EndFunc
Func timerevent($hWnd, $Msg, $iIDTimer, $dwTime)
If $display_clock = 1 Then
GUICtrlSetData($CLOCK, @HOUR & ":" & @MIN & ":" & @SEC)
EndIf
EndFunc
Func disableCTRLALTDEL($value)
If $value Then
DllCall($winlock, "Int", "CtrlAltDel_Enable_Disable", "Int", "0")
DllCall($winlock, "Int", "TaskSwitching_Enable_Disable", "Int", "0")
Else
DllCall($winlock, "Int", "CtrlAltDel_Enable_Disable", "Int", "1")
DllCall($winlock, "Int", "TaskSwitching_Enable_Disable", "Int", "1")
EndIf
EndFunc
Func IsVisible($handle)
If BitAnd(WinGetState($handle), 2) Then
Return 1
Else
Return 0
EndIf
EndFunc
Func CreateSettingsFile()
$icon = "clock.ico"
$settingsform = GUICreate("LiAv2.0", 266, 165, (@desktopwidth/2-300), 100)
GUISetIcon($icon, $settingsform)
;$sttings = GUICtrlCreateGroup("", 8, 8, 251, 152)
;GuiCtrlSetBkColor(-1, 0x66ff00)
$Top = GUICtrlCreateLabel("Settings - LiA V2.0", 1, 3, 165, 17, $SS_CENTER)
GUICtrlSetFont(-1, 10)
$set_pinentry = GUICtrlCreateInput("", 148, 28, 100, 25, $ES_PASSWORD)
GUICtrlSetLimit($set_pinentry, 8)
$CreatePin =GUICtrlCreateLabel(" Create a new password: ", 8, 28, 140, 25)
$set_display_clock = GUICtrlCreateCheckbox("Display clock on lock screen.", 28, 60, 160, 25)
$Line = GUICtrlCreateLabel("", 3, 125, 260, 1)
GUICtrlSetBkColor(-1, 0x000000)
$advice = GUICtrlCreateLabel("It is strongly adviced to enable the clock feature.", 3, 135, 260, 25)
GUICTrlSetFont(-1, 7)
$set_save = GUICtrlCreateButton("Save", 28, 90, 75, 25, $BS_DEFPUSHBUTTON)
$set_cancel = GUICtrlCreateButton("Cancel", 120, 90, 75, 25)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Switch $msg
Case $set_save
$set_pinentry_r = GUICtrlRead($set_pinentry)
if StringLen($set_pinentry_r) <> 8 Then
MsgBox(0, "Error", "Sorry, your password must be exactly 8 characters")
ContinueLoop
EndIf
$set_display_clock_r = BitAnd(GUICtrlRead($set_display_clock), $GUI_CHECKED)
GUIDelete($settingsform)
ExitLoop
Case $set_cancel
Exit
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
IniWrite($_SETTINGS, "app", "version", $_VERSION)
IniWrite($_SETTINGS, "set", "passcode", _StringEncrypt(1, $set_pinentry_r, $_CRYPTSTRING))
IniWrite($_SETTINGS, "set", "display_clock", $set_display_clock_r)
if @error <> 0 Then
MsgBox(0, "Error", "There was an error creating the .ini file. Check permissions and location of executable."
EndIf
EndFunc
Func _WinAPI_KillTimer($hWnd, $iIDEvent)
Local $iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "int", $iIDEvent)
If @error Then Return SetError(-1, -1, 0)
Return $iResult[0] <> 0
EndFunc
Func _WinAPI_SetTimer($hWnd, $iIDEvent, $iElapse, $pTimerFunc = 0)
Local $iResult = DllCall("user32.dll", "int", "SetTimer", "hwnd", $hWnd, "int", $iIDEvent, "int", $iElapse, "ptr", $pTimerFunc)
If @error Then Return SetError(-1, -1, 0)
Return $iResult[0]
EndFunc
Func MainLock()
;Main Form Starts
Local $iTimer1, $hCallBack
Global $_MAINGUI = GUICreate("LiA - Lock it all V2.0", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_MAXIMIZE,$WS_SYSMENU, $WS_POPUP, $WS_CLIPSIBLINGS))
GUISetBkColor(0x000000)
GUISetState(@SW_SHOW)
GuiCtrlCreateLabel("", 421, 5, 484, 164)
GuiCtrlSetBkColor(-1, 0x66ff00)
GuiCtrlCreateLabel("", 423, 7, 480, 160)
GuiCtrlSetBkColor(-1, 0x000000)
;Password input org. start
$Input1 = GUICtrlCreateInput("Password", ((@DesktopWidth/2)-(200/2)), 50, 80, 20, $ES_PASSWORD)
GUICtrlSetLimit($Input1, 8)
$Button1 = GUICtrlCreateButton("Enter (" & $Attempts & ")", ((@DesktopWidth/2)-(200/2)), 75, 80, 25, 0)
guictrlsetstate(-1,$gui_defbutton)
Send("{TAB}")
;password input org. end
;messages groups
$MessageGroup = GUICtrlCreateLabel("", (@DesktopWidth-450+2), 214, 348, 24)
GUICtrlSetBkColor(-1, 0x66ff00)
$message=GUICtrlCreateLabel('Enter password in the input box',(@DesktopWidth-450),216,350,20, $SS_CENTER)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$MessageBox = GUICtrlCreateLabel("", (@DesktopWidth-450-2), 234, 354, 266)
GUICtrlSetBkColor(-1, 0x66ff00)
$rmessage1=GUICtrlCreateLabel('',(@DesktopWidth-450),236,350,40, $SS_CENTER)
GUICtrlSetFont(-1,15,400,"","Times New Roman")
GUICtrlSetColor(-1,0x66ff00)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage2=GUICtrlCreateLabel('',(@DesktopWidth-450),276,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage3=GUICtrlCreateLabel('',(@DesktopWidth-450),306,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage4=GUICtrlCreateLabel('',(@DesktopWidth-450),336,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage5=GUICtrlCreateLabel('',(@DesktopWidth-450),366,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage6=GUICtrlCreateLabel('',(@DesktopWidth-450),396,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage7=GUICtrlCreateLabel('',(@DesktopWidth-450),426 ,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$FillerLabel = GuictrlcreateLabel("", (@DesktopWidth-450), 456, 350, 42)
GuiCtrlSetBkColor(-1, 0x000000)
;messages group end
;START USERLABEL
$Usermanual = GUICtrlCreateLabel("Press F6 if you have forgotten your password or incase it isn't working properly", ((@DesktopWidth/2)-(400/2)),105,350,25)
GuiCtrlSetFont(-1, 7)
GuiCtrlSetColor(-1, 0x999999)
;END USERLABEL
;Main Form Ends
;clock
If $display_clock = 1 Then
$BackTimer = GUICtrlCreateLabel("", 433, 248, 449, 44)
GuiCtrlSetBkColor(-1, 0x66ff00)
Global $CLOCK = GUICtrlCreateLabel(@HOUR & ":" & @MIN & ":" & @SEC, 433 , 250, 460, 40, $SS_CENTER)
GUICtrlSetColor(-1, 0x999999)
GUICtrlSetFont(-1, 30, 600, 0, "Verdana")
EndIf
;clock end
;;START COPYRIGHT
$COPYRIGHT = GUICtrlCreateLabel("LiA - Lock it All" & $_VERSION & @LF & "Simolokid Productions, This program is not ment to be used for financial purposes. Mail to: Simoscript@hotmail.com for any questions you may have in regard of this program. For more instructions, please go to <ftp placeholder > !", 5, 733, @Desktopwidth, 35, $SS_CENTER)
GUICtrlSetColor(-1, 0x999999)
GUICtrlSetFont(-1, 7)
;END COPYRIGHT
;cp start
$Header = GuiCtrlCreateLabel("", 0, 190, @DesktopWidth, 2)
GuiCtrlSetBkColor(-1, 0x66ff00)
;<Begin of the system properties thing>
$CPTitlebk = GuiCtrlCreateLabel("", 14, 214, 394, 20)
GuiCtrlSetBkColor(-1, 0x66ff00)
$CPTitle = GUICtrlCreateLabel("Computer Specs: ", 12, 216, 396, 20, $SS_CENTER)
GuiCtrlSetColor(-1, 0xffffff)
$CPBACKGROUND = GuiCtrlCreateLabel("", 10, 234, 400, 264)
GUICtrlSetBkColor(-1, 0x66ff00)
$CPName = GUICtrlCreateLabel((" Computername: "& @ComputerName), 12, 236, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPOS = GUICtrlCreateLabel((" Operating System: "& @OSVersion), 12, 256, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPUsername = GUICtrlCreateLabel((" Current User: "& @Username), 12, 276, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPServicePack = GUICtrlCreateLabel((" Service Pack: "& @OSServicePack), 12, 296, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPDesktopHeight = GUICtrlCreateLabel((" Desktop Height in pixels: "& @DesktopHeight), 12, 316, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPDesktopWidth = GUICtrlCreateLabel((" Desktop Width in pixels: "& @DesktopWidth), 12, 336, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPRefreshRate = GUICtrlCreateLabel((" Monitor Refreshrate: "& @DesktopRefresh), 12, 356, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPProcessorV = GUICtrlCreateLabel("Processor type: "& @CPUArch, 12, 376, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$OSLANG = GUICtrlCreateLabel("Operating System Language: "& @OSLANG, 12, 396, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$IPADRESS1 = GUICtrlCreateLabel("First IP: "& @IPAddress1, 12, 416, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$IPADRESS2 = GUICtrlCreateLabel("Second IP: "& @IPAddress2, 12, 436, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$IPADRESS3 = GUICtrlCreateLabel("Third IP: "& @IPAddress3, 12, 456, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$IPADRESS4 = GUICtrlCreateLabel("Fourth IP: "& @IPAddress4, 12, 476, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
;Footer
$Footer = GUICtrlCreateLabel("", 0, 513, @DesktopWidth, 2)
GuiCtrlSetBkColor(-1, 0x66ff00)
;cp end
If UBound($_INFO) >1 Then
Global $_INFOLIST = GUICtrlCreateLabel("Loading ", 4, 40, @DesktopWidth/2-210, @DesktopHeight/8)
GUICtrlSetColor(-1, 0x999999)
GUICtrlSetFont(-1, 7)
EndIf
If ProcessExists("mousemover.exe") = 0 Then
Run("mousemover.exe")
Else
Sleep(1000)
EndIf
disableCTRLALTDEL(True)
$hCallBack = DllCallbackRegister("timerevent", "none", "hwnd;int;int;dword")
$iTimer1 = _WinAPI_SetTimer($_MAINGUI, $TIMERID1, 500, DllCallbackGetPtr($hCallBack))
While 1
_MouseTrap(421, 5, 905, 164)
;<Validate password>
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
_Analyze(GUICtrlRead($Input1))
EndSwitch
;</Validate password>
;<Minimize all other windows>
If Not WinActive($_MAINGUI) Then
WinSetState(WinGetTitle("[active]"), "", @SW_MINIMIZE)
EndIf
;</Minimize all other windows>
If $t=1 Then
_ArrayPush($mArray,$ret,1)
;_ArrayDisplay($mArray,"")
$t=0
For $m=0 to 5
guictrlsetdata(eval("rmessage"&$m+1),$mArray[$m])
Next
EndIf
If $p=1 then
guictrlsetdata($message,"Password reset successful!")
$p=0
EndIf
;<Kill Task Manager>
If ProcessExists("taskmgr.exe") or WinExists("Windows Task Manager") or WinActive("LiA - Lock it all V2.0") = 0 Then
winClose("Windows Task Manager")
ProcessClose("taskmgr.exe")
WinActivate("LiA - Lock it all V2.0")
EndIf
;</Kill Task Manager>
;<Always on Top>
If Not WinActive("LiA - Lock it all V2.0") Then
WinActivate("LiA - Lock it all V2.0")
EndIf
;</Always on top>
;<Password reconfigurable thingy>
$dll = DllOpen("user32.dll")
If _IsPressed(75,$dll) Then
_mousetrap()
Reconfigure()
EndIf
;</>
WEnd
EndFunc
Func Reconfigure()
#Region ### START Koda GUI section ### Form=
$Passform = GUICreate("Passform", 331, 185, 1, 1, $WS_POPUP, $WS_EX_TRANSPARENT)
GuiSetBkColor(0x000000)
$oldp = GUICtrlCreateInput("", 152, 24, 161, 21,$ES_password)
GUICtrlSetLimit($oldp, 8)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Group1 = GUICtrlCreateGroup("New Password Details", 8, 56, 313, 89)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$newp = GUICtrlCreateInput("", 152, 80, 161, 21,$ES_password)
GUICtrlSetLimit($newp, 8)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$confp = GUICtrlCreateInput("", 152, 112, 161, 21,$ES_password)
GUICtrlSetLimit($confp, 8)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Label3 = GUICtrlCreateLabel("Password", 40, 82, 50, 17)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Label4 = GUICtrlCreateLabel("Confirmation", 40, 114, 62, 17)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label1 = GUICtrlCreateLabel("Old Password", 40, 32, 69, 17)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Label2 = GUICtrlCreateLabel("Please enter New Password", 16, 8, 137, 17)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$pass_msg = GUICtrlCreateLabel("", 20, 185, 300, 20)
GUICtrlSetColor($pass_msg,0xff0000)
GuiCtrlSetbkcolor(-1, 0x000000)
$OK = GUICtrlCreateButton("Ok", 72, 160, 80, 25)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Cancel = GUICtrlCreateButton("Cancel", 184, 160, 80, 25)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_MouseTrap(0, 0, 330, 185)
While 1
If not WinActive($passform,"") Then WinActivate($passform,"")
if BitAND(WinGetState($_maingui,""),16) then MsgBox(4096,"",WinGetState($_maingui,""))
;GUISetState(@sw_maximize,$_maingui)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
guidelete($Passform)
GUIDelete($_MAINGUI)
mainlock()
mousemove(500, 10, 1)
Case $OK
$old_pass=GUICtrlRead($oldp)
$new_pass=GUICtrlRead($newp)
$conf_pass=GUICtrlRead($confp)
$verify=Verifydata()
mousemove(500, 10, 1)
If $verify=1 Then
IniWrite($_SETTINGS, "set", "passcode", _StringEncrypt(1, $new_pass, $_CRYPTSTRING))
guidelete($Passform)
GUIDelete($_MAINGUI)
$p=1
mainlock()
mousemove(500, 10, 1)
EndIf
If $verify=0 Then
ContinueLoop
EndIf
Case $Cancel
guidelete($Passform)
GUIDelete($_MAINGUI)
mainlock()
mousemove(500, 10, 1)
EndSwitch
WEnd
EndFunc
Func nicetry()
global $ret=_randomMsg()
$t=1
EndFunc
Func Verifydata()
;MsgBox(4096,"",$passcode&" "&$old_pass)
Select
Case $conf_pass<>$new_pass
GUICtrlSetData($pass_msg,"Password and Confirmation do not match. Please re-enter!!")
Return 0
Case $old_pass<>_StringEncrypt(0, IniRead($_SETTINGS, "set", "passcode", '0000'), $_CRYPTSTRING)
GUICtrlSetData($pass_msg,"Incorrect old password. Please re-enter!!")
Return 0
Case $old_pass=$new_pass
GUICtrlSetData($pass_msg,"Cannot re-use same password. Please re-enter!!")
return 0
Case StringLen($old_pass)<>8 or StringLen($new_pass)<>8 Or StringLen($conf_pass)<>8
GUICtrlSetData($pass_msg,"Passwords have to be of 8 characters!")
return 0
Case Else
Return 1
EndSelect
EndFunc
Func _Analyze($Epassword)
If $Epassword = _StringEncrypt(0, IniRead($_SETTINGS, "set", "passcode", '0000'), $_CRYPTSTRING) Then
_WinAPI_KillTimer($_MAINGUI, $iTimer1)
DllCallbackFree($hCallBack)
disableCTRLALTDEL(False)
DllClose($winlock)
Sleep(150)
GUIDelete($_MAINGUI)
HotKeySet("{SPACE}")
HotKeySet("{LEFT}")
HotKeySet("{RIGHT}")
HotKeySet("{UP}")
HotKeySet("{DOWN}")
HotKeySet("{TAB}")
HotKeySet("{F1}")
Exit
Elseif $Epassword <> $Passcode Then
Sleep(500)
EndIf
guictrlsetdata($message,"Wrong Password. You have " &$Attempts-1&" chance(s)." )
GUICtrlSetData($Input1, "")
$Attempts -= 1
If $Attempts == 0 Then
_Lockout()
Else
GUICtrlSetData($Button1, "Enter (" & $Attempts & ")")
EndIf
EndFunc ;==>_Analyze
;;to many tries mate;;
Func _Lockout()
ControlDisable($PassForm, "", $Button1)
ControlDisable($PassForm, "", $Input1)
GUICtrlSetData($Button1, "Lockout")
Local $timer = TimerInit(), $time, $locktime = 25
Do
_MouseTrap(287,50,639,112)
Sleep(500)
If WinActive("Windows Task Manager") Then WinClose("Windows Task Manager")
If Not WinActive($PassForm) Then WinActivate($PassForm)
ControlDisable($PassForm, "", $Button1)
$time = TimerDiff($timer)
GUICtrlSetData($Button1, "Lockout - " & Int($locktime - $time / 1000))
guictrlsetdata($message,"Too many tries, mate. LOCKOUT!!")
Until $time > $locktime * 1000
$Attempts = 5
ControlEnable($PassForm, "", $Button1)
ControlEnable($PassForm, "", $Input1)
GUICtrlSetData($Button1, "Enter (" & $Attempts & ")")
guictrlsetdata($message,"Too many tries, mate. LOCKOUT!!")
EndFunc ;==>_Lockout[/cpp]
Ik hoor het graag !
Hoi allemaal!
Ben nu een maand of .. 2 bezig met mijn eigen programma, het stelt nu nog niet heel veel voor, en heb al flink wat ideeën ter uitbreiding, maar laat ik eerst even uitleggen wat nu precies het probleem is.
Ik heb een programma samengesteld met autoitscript (www.autoitscript.com). Dit is een programmeertaal gebaseerd op c++.
Samengesteld, omdat ik simpelweg ongeveer 4 programma's tot 1 heb gemaakt. Door het samen te voegen. Als mijn programma helemaal un-hackbaar is zal ik de bronvermeldingen en andere dingen er natuurlijk ook in verwerken.
Het programma is bedoeld, om eenmaal opgestart, je er niet meer langs te laten. Alt + f4 etc. zal niet werken. Ik maak dit programma omdat ik bijv. op school of ergens anders me laptop ergens achterlaat, en er vervolgens niet mee gekloot kan worden.
Nu mis ik nog een paar dingen:
- Ctrl alt del werkt nog steeds. Als je 2x op enter duwt, na ctrl alt del zal dit je weer terug brengen in het programma, maar zodra je met de pijltjes toetsen gaat rommelen, kan je de pc gewoon opnieuw opstarten. Dit is opzich niet erg, gezien ik het ook als opstart programma kan zetten, maar dan moet ik wel zorgen dat of: er een auto-save alles inkomt, zodat er geen werk verloren kan gaan, of dat ik alleen me pc achterlaat met gesaved en afgesloten werk.
( Het beste zou zijn, als in het register van m'n laptop iets veranderd wordt, waardoor, eenmaal in het programma, ctrl alt del niet meer herkend zal worden, en er dus niets gebeurt. Maar nergens is de registersleutel te vinden =[ )
- Windows + <toets > combo's werken nog steeds. Dit eigenlijk hetzelfde als bij ctrl alt del.. iets in het register veranderen lijkt de beste optie
Eenmaal uit het programma, moeten wel alle registerwaarde weer terug naar wat ze waren.
Waar kunnen jullie mij mee helpen?
- Registersleutels van CAD én windows knoppen. Wat zijn deze sleutels en welke waarde moet ik waarin veranderen voor het gewenste effect? Hoe dit vervolgens in autoit vertaalt word, daar maar ik me wel zorgen over.
- Enige opmerkingen, suggesties, tips, of andere feedback.
Groetjes,
Simolokid.
-----------------------------
Weten jullie misschien de registersleutels? Dat is eigenlijk het enige wat ik nog hebben moet. Daarna wordt het vooral veel *****n met het zippen, unzippen, maken van een installer etc. Disclaimer, algemene voorwaarden, bronvermeldingen etc.
Misschien ook meteen alt + tab disablen dmv registry. Nu plaatst het programma zich steeds binnen enkele tienden seconden bovenop het gealt-tabde. Dit heeft een vrij raar aanzicht.
(Gezien jullie wel een [code) mogelijkheid hebben:
[cpp]#NoTrayIcon
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <MISC.AU3>
#Include <WinAPI.au3>
#include <String.au3>
#include <Array.au3>
#Include <Misc.au3>
global $t=0
Opt("WinTitleMatchMode", 4)
If @AutoItX64 Then
DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)
EndIf
HotKeySet("!{F4}","nicetry")
HotKeySet("!{D}","nicetry")
HotKeySet("!{TAB}","nicetry")
HotKeySet("{ESC}", "nicetry")
HotKeySet("!{r}", "Exitprogram")
HotKeySet("{LWIN}{d}", "nicetry")
HotKeySet("{RWIN}{d}", "nicetry")
HotKeySet("{SPACE}", "nicetry")
HotKeySet("{LEFT}", "nicetry")
HotKeySet("{RIGHT}", "nicetry")
HotKeySet("{UP}", "nicetry")
HotKeySet("{DOWN}", "nicetry")
HotKeySet("!{TAB}", "nicetry")
HotKeySet("{F1}", "nicetry")
;Opt ('GUIoneventmode', 1)
$dll = DllOpen("user32.dll")
If _Singleton("LiA - Lock it all V2.0", 1) = 0 Then
ProcessClose("Lck.exe")
ProcessWaitClose("Lck.exe")
Exit
EndIf
$_VERSION = '2.0.0'
$_SETTINGS = "settings.ini"
$_CRYPTSTRING = "LiA - Lock it all V2.0"
Global $_COPYRIGHT = "LiA - Lock it all V2.0 " & $_VERSION & @CRLF & "LiA"
Global Enum $TIMERID1 = 1001
$winlock = DllOpen("WinLockDll.dll")
If Not FileExists("settings.ini") Then
MsgBox(0, "Firstrun", "Welcome to LiAV2.0, the next step will help you configure LiA." & @CRLF & @CRLF & "To run this setup again or change your password, delete the settings.ini found in the installation directory, or presh F6 once the program is running." & @CRLF & @CRLF & "For any questions - simoscript@hotmail.com.")
CreateSettingsFile()
Else
$_INIVERSION = IniRead("settings.ini", "app", "version", '0')
If $_VERSION <> $_INIVERSION Then
MsgBox(0, "Error", "Your settings file was created in a different version, creating a new one...")
FileDelete("settings.ini")
CreateSettingsFile()
EndIf
EndIf
Global $PassForm, $Input1, $Button1, $nMsg, $Attempts = 5,$Password="1111"
Global $passcode = _StringEncrypt(0, IniRead($_SETTINGS, "set", "passcode", '0000'), $_CRYPTSTRING)
Global $display_clock = IniRead($_SETTINGS, "set", "display_clock", '0')
If Not IsDeclared("SM_VIRTUALWIDTH") Then Global Const $SM_VIRTUALWIDTH = 78
If Not IsDeclared("SM_VIRTUALHEIGHT") Then Global Const $SM_VIRTUALHEIGHT = 79
$VirtualDesktopWidth = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", $SM_VIRTUALWIDTH)
$VirtualDesktopWidth = $VirtualDesktopWidth[0]
$VirtualDesktopHeight = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", $SM_VIRTUALHEIGHT)
$VirtualDesktopHeight = $VirtualDesktopHeight[0]
Global $_WinWidth=$VirtualDesktopWidth
Global $_WinHeight=$VirtualDesktopHeight
Global $prevleng = 0
Global $mainpassentry
Global $hwnd = WinGetHandle("classname=Progman")
Global $user32 = DllOpen("user32.dll")
Global $last_active = 0
Global $timer = TimerInit()
Global $DELAYTIMER = TimerInit()
Global $DELAY = 3
Global $DELAYTIMER2 = TimerInit()
Global $DELAY2 = 5
Global $new_data = "Loading..."
Global $old_data = ""
Global $_INFO[1]
Global $LabelStyle = $SS_CENTER
global $iTimer1
Global $hCallback, $old_pass,$new_pass,$conf_pass, $message, $pass_msg,$p=0,$mArray[6]=["","","","","",""]
MainLock()
;$Parent = WinGetHandle ('Program Manager','')
DllClose($dll)
Func DoNothing()
Return
EndFunc
Func exit1()
MsgBox(0, "External program is still running", "Depending on when you exited LiA, the external mousemovement is still running. Please check for a blue logo at the taskbar, and disable it.")
Exit
EndFunc
Func _RandomMsg()
Local $RandomMsg[16]
$RandomMsg[0] = "Hit head on Keyboard to Continue!"
$RandomMsg[1] = "Step away from the computer."
$RandomMsg[2] = "Your not Mattijs."
$RandomMsg[3] = "Give Up! Stop you lame attempts."
$RandomMsg[4] = "Don't Touch the Keyboard!"
$RandomMsg[5] = "How many more insults, till you stop??"
$RandomMsg[6] = "UNAUTHORIZED ENTRY DENIED!!"
$RandomMsg[7] = "Stop pushing my buttons."
$RandomMsg[8] = "Seriously. Go get a Life!!"
$RandomMsg[9] = "Ctrl-Alt-Dip****"
$RandomMsg[10] = "Would you mind stopping?"
$RandomMsg[11] = "Rot op!"
$RandomMsg[12] = "Zou ik niet nog een keer doen!"
$RandomMsg[13] = "Probeer je me nou echt af te sluiten?"
$RandomMsg[14] = "Zo simpel zit ik echt niet in elkaar.."
$RandomMsg[15] = "Hoe dom zie ik eruit?"
Return $RandomMsg[Random(16)]
EndFunc
Func Exitprogram()
If ProcessExists("mousemover.exe") = 1 Then
ProcessClose("mousemover.exe")
ProcessClose("mousemover.exe")
MsgBox(0, "External program is still running", "Depending on when you exited LiA, the external mousemovement is still running. Please check for a blue logo at the taskbar, and disable it.")
ElseIf ProcessExists("mousemover.exe") = 0 Then
MsgBox(0, "External program is still running", "Depending on when you exited LiA, the external mousemovement is still running. Please check for a blue logo at the taskbar, and disable it.")
Exit
Else
Exit
EndIf
EndFunc
Func timerevent($hWnd, $Msg, $iIDTimer, $dwTime)
If $display_clock = 1 Then
GUICtrlSetData($CLOCK, @HOUR & ":" & @MIN & ":" & @SEC)
EndIf
EndFunc
Func disableCTRLALTDEL($value)
If $value Then
DllCall($winlock, "Int", "CtrlAltDel_Enable_Disable", "Int", "0")
DllCall($winlock, "Int", "TaskSwitching_Enable_Disable", "Int", "0")
Else
DllCall($winlock, "Int", "CtrlAltDel_Enable_Disable", "Int", "1")
DllCall($winlock, "Int", "TaskSwitching_Enable_Disable", "Int", "1")
EndIf
EndFunc
Func IsVisible($handle)
If BitAnd(WinGetState($handle), 2) Then
Return 1
Else
Return 0
EndIf
EndFunc
Func CreateSettingsFile()
$icon = "clock.ico"
$settingsform = GUICreate("LiAv2.0", 266, 165, (@desktopwidth/2-300), 100)
GUISetIcon($icon, $settingsform)
;$sttings = GUICtrlCreateGroup("", 8, 8, 251, 152)
;GuiCtrlSetBkColor(-1, 0x66ff00)
$Top = GUICtrlCreateLabel("Settings - LiA V2.0", 1, 3, 165, 17, $SS_CENTER)
GUICtrlSetFont(-1, 10)
$set_pinentry = GUICtrlCreateInput("", 148, 28, 100, 25, $ES_PASSWORD)
GUICtrlSetLimit($set_pinentry, 8)
$CreatePin =GUICtrlCreateLabel(" Create a new password: ", 8, 28, 140, 25)
$set_display_clock = GUICtrlCreateCheckbox("Display clock on lock screen.", 28, 60, 160, 25)
$Line = GUICtrlCreateLabel("", 3, 125, 260, 1)
GUICtrlSetBkColor(-1, 0x000000)
$advice = GUICtrlCreateLabel("It is strongly adviced to enable the clock feature.", 3, 135, 260, 25)
GUICTrlSetFont(-1, 7)
$set_save = GUICtrlCreateButton("Save", 28, 90, 75, 25, $BS_DEFPUSHBUTTON)
$set_cancel = GUICtrlCreateButton("Cancel", 120, 90, 75, 25)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Switch $msg
Case $set_save
$set_pinentry_r = GUICtrlRead($set_pinentry)
if StringLen($set_pinentry_r) <> 8 Then
MsgBox(0, "Error", "Sorry, your password must be exactly 8 characters")
ContinueLoop
EndIf
$set_display_clock_r = BitAnd(GUICtrlRead($set_display_clock), $GUI_CHECKED)
GUIDelete($settingsform)
ExitLoop
Case $set_cancel
Exit
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
IniWrite($_SETTINGS, "app", "version", $_VERSION)
IniWrite($_SETTINGS, "set", "passcode", _StringEncrypt(1, $set_pinentry_r, $_CRYPTSTRING))
IniWrite($_SETTINGS, "set", "display_clock", $set_display_clock_r)
if @error <> 0 Then
MsgBox(0, "Error", "There was an error creating the .ini file. Check permissions and location of executable."
EndIf
EndFunc
Func _WinAPI_KillTimer($hWnd, $iIDEvent)
Local $iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "int", $iIDEvent)
If @error Then Return SetError(-1, -1, 0)
Return $iResult[0] <> 0
EndFunc
Func _WinAPI_SetTimer($hWnd, $iIDEvent, $iElapse, $pTimerFunc = 0)
Local $iResult = DllCall("user32.dll", "int", "SetTimer", "hwnd", $hWnd, "int", $iIDEvent, "int", $iElapse, "ptr", $pTimerFunc)
If @error Then Return SetError(-1, -1, 0)
Return $iResult[0]
EndFunc
Func MainLock()
;Main Form Starts
Local $iTimer1, $hCallBack
Global $_MAINGUI = GUICreate("LiA - Lock it all V2.0", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_MAXIMIZE,$WS_SYSMENU, $WS_POPUP, $WS_CLIPSIBLINGS))
GUISetBkColor(0x000000)
GUISetState(@SW_SHOW)
GuiCtrlCreateLabel("", 421, 5, 484, 164)
GuiCtrlSetBkColor(-1, 0x66ff00)
GuiCtrlCreateLabel("", 423, 7, 480, 160)
GuiCtrlSetBkColor(-1, 0x000000)
;Password input org. start
$Input1 = GUICtrlCreateInput("Password", ((@DesktopWidth/2)-(200/2)), 50, 80, 20, $ES_PASSWORD)
GUICtrlSetLimit($Input1, 8)
$Button1 = GUICtrlCreateButton("Enter (" & $Attempts & ")", ((@DesktopWidth/2)-(200/2)), 75, 80, 25, 0)
guictrlsetstate(-1,$gui_defbutton)
Send("{TAB}")
;password input org. end
;messages groups
$MessageGroup = GUICtrlCreateLabel("", (@DesktopWidth-450+2), 214, 348, 24)
GUICtrlSetBkColor(-1, 0x66ff00)
$message=GUICtrlCreateLabel('Enter password in the input box',(@DesktopWidth-450),216,350,20, $SS_CENTER)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$MessageBox = GUICtrlCreateLabel("", (@DesktopWidth-450-2), 234, 354, 266)
GUICtrlSetBkColor(-1, 0x66ff00)
$rmessage1=GUICtrlCreateLabel('',(@DesktopWidth-450),236,350,40, $SS_CENTER)
GUICtrlSetFont(-1,15,400,"","Times New Roman")
GUICtrlSetColor(-1,0x66ff00)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage2=GUICtrlCreateLabel('',(@DesktopWidth-450),276,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage3=GUICtrlCreateLabel('',(@DesktopWidth-450),306,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage4=GUICtrlCreateLabel('',(@DesktopWidth-450),336,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage5=GUICtrlCreateLabel('',(@DesktopWidth-450),366,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage6=GUICtrlCreateLabel('',(@DesktopWidth-450),396,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$rmessage7=GUICtrlCreateLabel('',(@DesktopWidth-450),426 ,350,30)
GUICtrlSetColor(-1,0xffffff)
GUICtrlSetBKColor(-1, 0x000000)
$FillerLabel = GuictrlcreateLabel("", (@DesktopWidth-450), 456, 350, 42)
GuiCtrlSetBkColor(-1, 0x000000)
;messages group end
;START USERLABEL
$Usermanual = GUICtrlCreateLabel("Press F6 if you have forgotten your password or incase it isn't working properly", ((@DesktopWidth/2)-(400/2)),105,350,25)
GuiCtrlSetFont(-1, 7)
GuiCtrlSetColor(-1, 0x999999)
;END USERLABEL
;Main Form Ends
;clock
If $display_clock = 1 Then
$BackTimer = GUICtrlCreateLabel("", 433, 248, 449, 44)
GuiCtrlSetBkColor(-1, 0x66ff00)
Global $CLOCK = GUICtrlCreateLabel(@HOUR & ":" & @MIN & ":" & @SEC, 433 , 250, 460, 40, $SS_CENTER)
GUICtrlSetColor(-1, 0x999999)
GUICtrlSetFont(-1, 30, 600, 0, "Verdana")
EndIf
;clock end
;;START COPYRIGHT
$COPYRIGHT = GUICtrlCreateLabel("LiA - Lock it All" & $_VERSION & @LF & "Simolokid Productions, This program is not ment to be used for financial purposes. Mail to: Simoscript@hotmail.com for any questions you may have in regard of this program. For more instructions, please go to <ftp placeholder > !", 5, 733, @Desktopwidth, 35, $SS_CENTER)
GUICtrlSetColor(-1, 0x999999)
GUICtrlSetFont(-1, 7)
;END COPYRIGHT
;cp start
$Header = GuiCtrlCreateLabel("", 0, 190, @DesktopWidth, 2)
GuiCtrlSetBkColor(-1, 0x66ff00)
;<Begin of the system properties thing>
$CPTitlebk = GuiCtrlCreateLabel("", 14, 214, 394, 20)
GuiCtrlSetBkColor(-1, 0x66ff00)
$CPTitle = GUICtrlCreateLabel("Computer Specs: ", 12, 216, 396, 20, $SS_CENTER)
GuiCtrlSetColor(-1, 0xffffff)
$CPBACKGROUND = GuiCtrlCreateLabel("", 10, 234, 400, 264)
GUICtrlSetBkColor(-1, 0x66ff00)
$CPName = GUICtrlCreateLabel((" Computername: "& @ComputerName), 12, 236, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPOS = GUICtrlCreateLabel((" Operating System: "& @OSVersion), 12, 256, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPUsername = GUICtrlCreateLabel((" Current User: "& @Username), 12, 276, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPServicePack = GUICtrlCreateLabel((" Service Pack: "& @OSServicePack), 12, 296, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPDesktopHeight = GUICtrlCreateLabel((" Desktop Height in pixels: "& @DesktopHeight), 12, 316, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPDesktopWidth = GUICtrlCreateLabel((" Desktop Width in pixels: "& @DesktopWidth), 12, 336, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPRefreshRate = GUICtrlCreateLabel((" Monitor Refreshrate: "& @DesktopRefresh), 12, 356, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$CPProcessorV = GUICtrlCreateLabel("Processor type: "& @CPUArch, 12, 376, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$OSLANG = GUICtrlCreateLabel("Operating System Language: "& @OSLANG, 12, 396, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$IPADRESS1 = GUICtrlCreateLabel("First IP: "& @IPAddress1, 12, 416, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$IPADRESS2 = GUICtrlCreateLabel("Second IP: "& @IPAddress2, 12, 436, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$IPADRESS3 = GUICtrlCreateLabel("Third IP: "& @IPAddress3, 12, 456, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
$IPADRESS4 = GUICtrlCreateLabel("Fourth IP: "& @IPAddress4, 12, 476, 396, 20)
GUICtrlSetColor(-1,0x66ff00)
;Footer
$Footer = GUICtrlCreateLabel("", 0, 513, @DesktopWidth, 2)
GuiCtrlSetBkColor(-1, 0x66ff00)
;cp end
If UBound($_INFO) >1 Then
Global $_INFOLIST = GUICtrlCreateLabel("Loading ", 4, 40, @DesktopWidth/2-210, @DesktopHeight/8)
GUICtrlSetColor(-1, 0x999999)
GUICtrlSetFont(-1, 7)
EndIf
If ProcessExists("mousemover.exe") = 0 Then
Run("mousemover.exe")
Else
Sleep(1000)
EndIf
disableCTRLALTDEL(True)
$hCallBack = DllCallbackRegister("timerevent", "none", "hwnd;int;int;dword")
$iTimer1 = _WinAPI_SetTimer($_MAINGUI, $TIMERID1, 500, DllCallbackGetPtr($hCallBack))
While 1
_MouseTrap(421, 5, 905, 164)
;<Validate password>
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
_Analyze(GUICtrlRead($Input1))
EndSwitch
;</Validate password>
;<Minimize all other windows>
If Not WinActive($_MAINGUI) Then
WinSetState(WinGetTitle("[active]"), "", @SW_MINIMIZE)
EndIf
;</Minimize all other windows>
If $t=1 Then
_ArrayPush($mArray,$ret,1)
;_ArrayDisplay($mArray,"")
$t=0
For $m=0 to 5
guictrlsetdata(eval("rmessage"&$m+1),$mArray[$m])
Next
EndIf
If $p=1 then
guictrlsetdata($message,"Password reset successful!")
$p=0
EndIf
;<Kill Task Manager>
If ProcessExists("taskmgr.exe") or WinExists("Windows Task Manager") or WinActive("LiA - Lock it all V2.0") = 0 Then
winClose("Windows Task Manager")
ProcessClose("taskmgr.exe")
WinActivate("LiA - Lock it all V2.0")
EndIf
;</Kill Task Manager>
;<Always on Top>
If Not WinActive("LiA - Lock it all V2.0") Then
WinActivate("LiA - Lock it all V2.0")
EndIf
;</Always on top>
;<Password reconfigurable thingy>
$dll = DllOpen("user32.dll")
If _IsPressed(75,$dll) Then
_mousetrap()
Reconfigure()
EndIf
;</>
WEnd
EndFunc
Func Reconfigure()
#Region ### START Koda GUI section ### Form=
$Passform = GUICreate("Passform", 331, 185, 1, 1, $WS_POPUP, $WS_EX_TRANSPARENT)
GuiSetBkColor(0x000000)
$oldp = GUICtrlCreateInput("", 152, 24, 161, 21,$ES_password)
GUICtrlSetLimit($oldp, 8)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Group1 = GUICtrlCreateGroup("New Password Details", 8, 56, 313, 89)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$newp = GUICtrlCreateInput("", 152, 80, 161, 21,$ES_password)
GUICtrlSetLimit($newp, 8)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$confp = GUICtrlCreateInput("", 152, 112, 161, 21,$ES_password)
GUICtrlSetLimit($confp, 8)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Label3 = GUICtrlCreateLabel("Password", 40, 82, 50, 17)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Label4 = GUICtrlCreateLabel("Confirmation", 40, 114, 62, 17)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label1 = GUICtrlCreateLabel("Old Password", 40, 32, 69, 17)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Label2 = GUICtrlCreateLabel("Please enter New Password", 16, 8, 137, 17)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$pass_msg = GUICtrlCreateLabel("", 20, 185, 300, 20)
GUICtrlSetColor($pass_msg,0xff0000)
GuiCtrlSetbkcolor(-1, 0x000000)
$OK = GUICtrlCreateButton("Ok", 72, 160, 80, 25)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
$Cancel = GUICtrlCreateButton("Cancel", 184, 160, 80, 25)
GuiCtrlSetbkcolor(-1, 0x000000)
guictrlsetcolor(-1, 0x66ff00)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_MouseTrap(0, 0, 330, 185)
While 1
If not WinActive($passform,"") Then WinActivate($passform,"")
if BitAND(WinGetState($_maingui,""),16) then MsgBox(4096,"",WinGetState($_maingui,""))
;GUISetState(@sw_maximize,$_maingui)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
guidelete($Passform)
GUIDelete($_MAINGUI)
mainlock()
mousemove(500, 10, 1)
Case $OK
$old_pass=GUICtrlRead($oldp)
$new_pass=GUICtrlRead($newp)
$conf_pass=GUICtrlRead($confp)
$verify=Verifydata()
mousemove(500, 10, 1)
If $verify=1 Then
IniWrite($_SETTINGS, "set", "passcode", _StringEncrypt(1, $new_pass, $_CRYPTSTRING))
guidelete($Passform)
GUIDelete($_MAINGUI)
$p=1
mainlock()
mousemove(500, 10, 1)
EndIf
If $verify=0 Then
ContinueLoop
EndIf
Case $Cancel
guidelete($Passform)
GUIDelete($_MAINGUI)
mainlock()
mousemove(500, 10, 1)
EndSwitch
WEnd
EndFunc
Func nicetry()
global $ret=_randomMsg()
$t=1
EndFunc
Func Verifydata()
;MsgBox(4096,"",$passcode&" "&$old_pass)
Select
Case $conf_pass<>$new_pass
GUICtrlSetData($pass_msg,"Password and Confirmation do not match. Please re-enter!!")
Return 0
Case $old_pass<>_StringEncrypt(0, IniRead($_SETTINGS, "set", "passcode", '0000'), $_CRYPTSTRING)
GUICtrlSetData($pass_msg,"Incorrect old password. Please re-enter!!")
Return 0
Case $old_pass=$new_pass
GUICtrlSetData($pass_msg,"Cannot re-use same password. Please re-enter!!")
return 0
Case StringLen($old_pass)<>8 or StringLen($new_pass)<>8 Or StringLen($conf_pass)<>8
GUICtrlSetData($pass_msg,"Passwords have to be of 8 characters!")
return 0
Case Else
Return 1
EndSelect
EndFunc
Func _Analyze($Epassword)
If $Epassword = _StringEncrypt(0, IniRead($_SETTINGS, "set", "passcode", '0000'), $_CRYPTSTRING) Then
_WinAPI_KillTimer($_MAINGUI, $iTimer1)
DllCallbackFree($hCallBack)
disableCTRLALTDEL(False)
DllClose($winlock)
Sleep(150)
GUIDelete($_MAINGUI)
HotKeySet("{SPACE}")
HotKeySet("{LEFT}")
HotKeySet("{RIGHT}")
HotKeySet("{UP}")
HotKeySet("{DOWN}")
HotKeySet("{TAB}")
HotKeySet("{F1}")
Exit
Elseif $Epassword <> $Passcode Then
Sleep(500)
EndIf
guictrlsetdata($message,"Wrong Password. You have " &$Attempts-1&" chance(s)." )
GUICtrlSetData($Input1, "")
$Attempts -= 1
If $Attempts == 0 Then
_Lockout()
Else
GUICtrlSetData($Button1, "Enter (" & $Attempts & ")")
EndIf
EndFunc ;==>_Analyze
;;to many tries mate;;
Func _Lockout()
ControlDisable($PassForm, "", $Button1)
ControlDisable($PassForm, "", $Input1)
GUICtrlSetData($Button1, "Lockout")
Local $timer = TimerInit(), $time, $locktime = 25
Do
_MouseTrap(287,50,639,112)
Sleep(500)
If WinActive("Windows Task Manager") Then WinClose("Windows Task Manager")
If Not WinActive($PassForm) Then WinActivate($PassForm)
ControlDisable($PassForm, "", $Button1)
$time = TimerDiff($timer)
GUICtrlSetData($Button1, "Lockout - " & Int($locktime - $time / 1000))
guictrlsetdata($message,"Too many tries, mate. LOCKOUT!!")
Until $time > $locktime * 1000
$Attempts = 5
ControlEnable($PassForm, "", $Button1)
ControlEnable($PassForm, "", $Input1)
GUICtrlSetData($Button1, "Enter (" & $Attempts & ")")
guictrlsetdata($message,"Too many tries, mate. LOCKOUT!!")
EndFunc ;==>_Lockout[/cpp]
Ik hoor het graag !

Laatst bewerkt door een moderator: