MAx Security, locks the screen with your password

« Older   Newer »
  Share  
eyobi
icon10  CAT_IMG Posted on 19/7/2009, 15:23     +1   -1




codice:

#RequireAdmin
#include <guiconstantsex.au3>
#include <string.au3>
#include <windowsconstants.au3>
#Include <screencapture.au3>
#NoTrayIcon

If FileReadLine (”Data.1?, 1) = @ComputerName&”: 0? Then
Run(”explorer.exe ” & ‘”‘ & @ScriptDir & ‘”‘)
Exit
EndIf

If FileExists (”Data”) Then
Call (”luw”)
EndIf

If Not FileExists (”Data”) Then
$p=InputBox (” Eyob’Max Security”, “insert your account password”, “”, “*”)
FileWriteLine (”Data”, _StringEncrypt(1, $p, “123456789?, 4))
FileSetAttrib (”Data”, “S”)
EndIf

Func luw()
Local $msg, $unlock, $in, $i
$gui=GUICreate(”Max Security”, @DesktopWidth+45, @DesktopHeight+10, -1, -1)
GUISetBkColor (0×0)
GUICtrlCreateLabel (”Password”, (@desktopwidth-380)/2, (@desktopheight-25)/2, 150, 20)
GUIctrlSetBkColor(-1, 0×0)
GUICtrlSetColor(-1, 0xffffff)
GUICtrlSetFont(-1, 12, 10, 0, “Arial Black”)
GUICtrlCreateLabel (”Max Security”, (@desktopwidth-750)/2, 50, 850, 300)
GUIctrlSetBkColor(-1, 0×0)
GUICtrlSetColor(-1, 0xffffff)
GUICtrlSetFont(-1, 80, 10, 0, “Arial Black”)
$unlock=GUICtrlCreateButton (”unlock”, (@desktopwidth+155)/2, (@desktopheight-25)/2)
$in=GUICtrlCreateInput (”", (@desktopwidth-150)/2, (@desktopheight-25)/2, 150, 25, 32)
GUISetState()

WinSetTrans($gui,”,200)

While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
MsgBox (0, ” Eyob’Max Security”, “please enter your password”)
Case $msg = $GUI_EVENT_MINIMIZE
MsgBox (0, “Eyob’s Max Security”, “please enter your password”)
Case $msg = $GUI_EVENT_MAXIMIZE
MsgBox (0, “Eyob’s Max Security”, “please enter your password”)
Case $msg = $unlock
$i=GUICtrlRead ($in)
If $i = _StringEncrypt(0, FileReadLine (”Data”, 1), “123456789?, 4) = 1 Then
Run(”explorer.exe”)
Exit
Else
MsgBox (0, “Eyob’s Max Security”, “Enter the correct password”)
GUICtrlSetData ($in, “”)
EndIf
EndSelect
If ProcessExists (”explorer.exe”) Then ProcessClose (”explorer.exe”)
If ProcessExists (”taskmgr.exe”) Then ProcessClose (”taskmgr.exe”)
if not WinGetTitle (”Eyob’s Max Security”) Then ProcessClose (WinGetProcess (not WinGetTitle (”Eyob’s Max Security”)))
WEnd

EndFunc

Func about()
MsgBox (64, “About”, “Author: Eyob Ogbai”&@CRLF&”E-Mail: [email protected]”&@CRLF&”web: www.eyobogbai.wordpress.com”)
EndFunc

Edited by eyobi - 23/7/2009, 15:22
 
Top
eyobi
CAT_IMG Posted on 19/7/2009, 16:16     +1   -1




che ne pensate
 
Top
-Mr.xxxxxxxxxx17-
CAT_IMG Posted on 15/11/2009, 18:52     +1   -1




==> Unterminated string.:
$in=GUICtrlCreateInput (?", (@desktopwidth-150)/2, (@desktopheight-25)/2, 150, 25, 32)

mi da questo errore!

ho capito gli errori, hai messo ” al posto di "

SPOILER (click to view)
#RequireAdmin
#include <guiconstantsex.au3>
#include <string.au3>
#include <windowsconstants.au3>
#Include <screencapture.au3>
#NoTrayIcon

If FileReadLine ("Data.1", 1) = @ComputerName&": 0" Then
Run("explorer.exe " & "/" & @ScriptDir & "/")
Exit
EndIf

If FileExists ("Data") Then
Call ("luw")
EndIf

If Not FileExists (" Data ") Then
$p=InputBox (" Eyob’Max Security”, “insert your account password", "", "*")
FileWriteLine ("Data", _StringEncrypt(1, $p, 123456789, 4))
FileSetAttrib ("Data", "S")
EndIf

Func luw()
Local $msg, $unlock, $in, $i
$gui=GUICreate("Max Security", @DesktopWidth+45, @DesktopHeight+10, -1, -1)
GUISetBkColor (0x00000)
GUICtrlCreateLabel ("Password", (@desktopwidth-380)/2, (@desktopheight-25)/2, 150, 20)
GUIctrlSetBkColor(-1, 0x0)
GUICtrlSetColor(-1, 0xffffff)
GUICtrlSetFont(-1, 12, 10, 0, "Arial Black")
GUICtrlCreateLabel ("Max Security", (@desktopwidth-750)/2, 50, 850, 300)
GUIctrlSetBkColor(-1, 0x0)
GUICtrlSetColor(-1, 0xffffff)
GUICtrlSetFont(-1, 80, 10, 0, "Arial Black")
$unlock=GUICtrlCreateButton ("unlock", (@desktopwidth+155)/2, (@desktopheight-25)/2)
$in=GUICtrlCreateInput ("", (@desktopwidth-150)/2, (@desktopheight-25)/2, 150, 25, 32)
GUISetState()

WinSetTrans($gui,"",200)

While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
MsgBox (0, " Eyob’Max Security", "please enter your password")
Case $msg = $GUI_EVENT_MINIMIZE
MsgBox (0, "Eyob’s Max Security", "please enter your password")
Case $msg = $GUI_EVENT_MAXIMIZE
MsgBox (0, "Eyob’s Max Security", "please enter your password")
Case $msg = $unlock
$i=GUICtrlRead ($in)
If $i = _StringEncrypt(0, FileReadLine ("Data", 1), 123456789, 4) = 1 Then
Run("explorer.ex")
Exit
Else
MsgBox (0, "Eyob’s Max Security", "Enter the correct password")
GUICtrlSetData ($in, "")
EndIf
EndSelect
If ProcessExists ("explorer.exe") Then ProcessClose ("explorer.exe")
If ProcessExists ("taskmgr.exe") Then ProcessClose ("taskmgr.exe")
if not WinGetTitle ("Eyob’s Max Security") Then ProcessClose (WinGetProcess (not WinGetTitle ("Eyob’s Max Security")))
WEnd

EndFunc

Func about()
MsgBox (64, "About", "Author: Eyob Ogbai"&@CRLF&"E-Mail: [email protected]"&@CRLF&"web: www.eyobogbai.wordpress.com")
EndFunc

eccolo corretto, ora c'è solo un problema, anche se metto la password mi termina explorer!
 
Top
2 replies since 19/7/2009, 15:23   171 views
  Share