Autoit: Блокиране на компютър с защитен код

Публикувано: 25.07.16, 22:31:21 | Автор: ArMeN | Видяна: 292 | Редактирано: -

#NoTrayIcon
#include <GUICONSTANTS.AU3>
#include <WINDOWSCONSTANTS.AU3>
#include <STATICCONSTANTS.AU3>
#include <EDITCONSTANTS.AU3>
#include <MISC.AU3>
#Include <WinAPI.au3>

HotKeySet ('{ENTER}','_PSSWRD')

Opt ('GUIoneventmode', 1)
$Password = '5555'
$GUIStyle = $WS_POPUP
$GUIStyleEx = $WS_EX_TOPMOST
$LabelStyle = BitOR ($SS_CENTER, $SS_CENTERIMAGE)
$Parent = WinGetHandle ('Program Manager','')
$GUI = GUICreate ('', @DesktopWidth, @DesktopHeight, -1, -1,$GUIStyle ,$GUIStyleEx, $Parent)
Global $x = 0, $y = 0, $Da = @DesktopWidth / 20, $Dx = $Da - 1, $Db = @DesktopHeight / 20, $Dy = $Db - 1, $Trans = 200,$xy1,$xy2,$xy3,$xy4,$Sleep = 0
Dim $Console[$Da][$Db], $Chr[62]
$i = 0
For $ii = 48 to 57
$Chr[$i] = Chr ($ii)
$i+=1
Next
For $ii = 65 To 90
$Chr[$i] = Chr ($ii)
$i+=1
Next
For $ii = 97 To 122
$Chr[$i] = Chr ($ii)
$i+=1
Next
For $i = 0 To $Dx
For $ii = 0 To $Dy
$Console[$i][$ii] = GUICtrlCreateLabel ('',$x, $y, 20, 20, $LabelStyle)
GUICtrlSetBkColor (-1, 0x0)
GUICtrlSetColor (-1, 0xFFFFFF)
If $i < ($Da/2 - 6) Or $i > ($Da/2 + 5) Or $ii < ($Db/2 - 3) Or $ii > ($Db/2 + 2) Then
GUICtrlSetData (-1,$Chr[Random (0,UBound ($Chr) - 1,1)])
Else
GUICtrlSetData (-1,Chr (149))
EndIf
$y += 20
Next
$y = 0
$x += 20
Next
_Reset_PWSET ()
GUISetFont (10,-1,-1,'Tahoma',$GUI)
GUISetBkColor (0x00000, $GUI)
WinMove ($GUI, '', 0, 0)
$GUI2 = GUICreate ('', 200,60, -1, -1,$GUIStyle ,$GUIStyleEx, $GUI)
GUISetBkColor (0x00000,$GUI2)
$Input = GUICtrlCreateInput ('',0,0,200,60,BitOR ($ES_PASSWORD,$SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetLimit (-1,4)
GUICtrlSetBkColor (-1,0x00000)
GUICtrlSetFont (-1, 35-1,'','Tahoma')
GUICtrlSetColor (-1, 0xFFFFFF)
WinMove ($GUI2,'',@DesktopWidth / 2 - 100, @DesktopHeight / 2 - 30)
For $i = 255 To $Trans Step -0.5
WinSetTrans ($GUI,'',$i)
WinSetTrans ($GUI2,'',$i)
Next
WinSetTrans ($GUI2, '', 255)
GUISetState (@SW_SHOW,$GUI)
GUISetState (@SW_SHOW,$GUI2)
While 1
If ProcessExists ('taskmgr.exe') Then ProcessClose ('taskmgr.exe')
If Not WinActive ($GUI2,'') Then WinActivate ($GUI2,'')
Do
$x = Random (0, $Dx,1)
$y = Random (0,$Dy,1)
Until GUICtrlRead ($Console[$x][$y]) <> Chr (149)
GUICtrlSetData ($Console[$x][$y], $Chr[Random (0,UBound ($Chr) - 1,1)])
$Sleep += 1
If $Sleep >= 2000 Then _Reset_PWSET ()
Sleep (10)
WEnd
Func _Reset_PWSET ()
$Sleep = 0
GUICtrlSetColor ($xy1, 0xFFFFFF)
GUICtrlSetColor ($xy2, 0xFFFFFF)
GUICtrlSetColor ($xy3, 0xFFFFFF)
GUICtrlSetColor ($xy4, 0xFFFFFF)
Do
$x = Random (0, $Dx,1)
$y = Random (0,$Dy,1)
Until GUICtrlRead ($Console[$x][$y]) <> Chr (149)
$xy1 = $Console[$x][$y]
Do
$x = Random (0, $Dx,1)
$y = Random (0,$Dy,1)
Until GUICtrlRead ($Console[$x][$y]) <> Chr (149) And $Console[$x][$y] <> $xy1
$xy2 = $Console[$x][$y]
Do
$x = Random (0, $Dx,1)
$y = Random (0,$Dy,1)
Until GUICtrlRead ($Console[$x][$y]) <> Chr (149) And $Console[$x][$y] <> $xy1 And $Console[$x][$y] <> $xy2
$xy3 = $Console[$x][$y]
Do
$x = Random (0, $Dx,1)
$y = Random (0,$Dy,1)
Until GUICtrlRead ($Console[$x][$y]) <> Chr (149) And $Console[$x][$y] <> $xy1 And $Console[$x][$y] <> $xy2 And $Console[$x][$y] <> $xy3
$xy4 = $Console[$x][$y]
GUICtrlSetColor ($xy1, 0xFF0000)
GUICtrlSetColor ($xy2, 0xFF8000)
GUICtrlSetColor ($xy3, 0xFFFF00)
GUICtrlSetColor ($xy4, 0x00FF00)
EndFunc
Func _PSSWRD ()
If GUICtrlRead ($Input) = '' Then Return
;~ $psswrd = GUICtrlRead ($xy1) & GUICtrlRead ($xy2) & GUICtrlRead ($xy3) & GUICtrlRead ($xy4)
If GUICtrlRead ($Input) == $Password Then _Exit ()
GUICtrlSetData ($Input,'')
_Reset_PWSET ()
EndFunc
Func _Exit ()
For $i = $Trans To 0 Step -5
WinSetTrans ($GUI,'',$i)
WinSetTrans ($GUI2,'',$i)
Next
Exit
EndFunc

Парола: 5555 Източник

Не сте влезли в акаунта си за да коментирате.


 

Няма коментари.