#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: Naker90
Script Function:
Mediante un hook bloquea el teclado y el raton
Testeado en W7 x64
Parametros
$sSeconds => Segundos que se mantendra el enganchado el proceso
$sStable => Si este parametro es 1 el hook sera "permanente", si es 0 durara el tiempo que le hallan asignado a $sSeconds
#ce ----------------------------------------------------------------------------
Func KeyBoardAndMouseHook($sSeconds, $sStable)
Local $sMouse = 14
Local $sKeyboard = 13
Local $sTime = $sSeconds * 1000
Local $sBlock = DllCallbackRegister('_Block', 'int', '')
if $sStable = 1 then
DllCall('User32.dll', 'handle', 'SetWindowsHookEx', 'int', $sMouse, 'ptr', DllCallbackGetPtr($sBlock), 'handle', 0, 'dword', 0)
DllCall('User32.dll', 'handle', 'SetWindowsHookEx', 'int', $sKeyboard, 'ptr', DllCallbackGetPtr($sBlock), 'handle', 0, 'dword', 0)
EndIf
if $sStable = 0 then
Local $sMouseHook = DllCall('User32.dll', 'handle', 'SetWindowsHookEx', 'int', $sMouse, 'ptr', DllCallbackGetPtr($sBlock), 'handle', 0, 'dword', 0)
Local $sKeyboardHook = DllCall('User32.dll', 'handle', 'SetWindowsHookEx', 'int', $sKeyboard, 'ptr', DllCallbackGetPtr($sBlock), 'handle', 0, 'dword', 0)
Sleep($sTime)
DllCall('User32.dll', 'int', 'UnhookWindowsHookEx', 'handle', $sMouseHook[0])
DllCall('User32.dll', 'int', 'UnhookWindowsHookEx', 'handle', $sKeyboardHook[0])
EndIf
EndFunc
Func _Block ()
Return -1
EndFunc
Solo he testeado en W7 x64, aquí dejo un binario por si quieren probarlo:Link: [Enlace externo eliminado para invitados]
Pass: Indetectables.net
Saludos