Locker

  • Tag...
    Ich bau gerade (mal wida) n sicherheits system...

    Natürlich grafisch schön ausgebaut ;)

    Aber ich hab ein Problem, weswegen ich euch unbedingt bitten will DIESEN CODE NICHT IN DEN AUTOSTART ZU SCHIEBEN!
    Es läuft so: Eine exe start die watcher.exe.
    Die 1. exe macht das GUI, die 2. passt auf das kein taskmgr und kein explorer gestartet wird.

    Am ende, wenn das pwd correct eingeben wurde, kommt ProcessClose (watcher.exe)... Und natürlich ShellExec (explorer.exe)...
    Aber irgendwie wird der watcher nicht beendet... :?::!:

    (Ich habs nur dank FileSharing wieder aus dem autostart bekommen!)

    Das ganze wird am Ende als Aufgabe bei anmeldung eingetragen...

    Jmd ne ahnung woran es liegt???

    Danke, Das Schwert

    Theorie ist wenn man weiß wie's geht, aber nichts klappt.
    Praxis ist wenn's klappt aber man weiß nicht weiso.

    Bei Microsoft sind Theorie und Praxis vereint: Nichts klappt und keiner weiß wieso ;)

    Einmal editiert, zuletzt von Das Schwert (24. Januar 2010 um 19:25)

  • Code? welcher Code


    und du brauchst auch keine 2 exe es reicht doch wenn du ne funktion mittels AdlibRegister alle 100 ms aufrufen lässt also


    [autoit]


    AdlibRegister("Kill",100)

    [/autoit][autoit][/autoit][autoit]

    ;Dein Restlicher Code

    [/autoit][autoit][/autoit][autoit]

    Func Kill()
    ProcessClose("explorer.exe")
    ProcessClose("tastmgr.exe")
    EndFunc

    [/autoit][autoit][/autoit][autoit][/autoit]
  • 1) Danke, Code habe ich vergessen ;)
    2) AdLibRegister kannte ich nicht, damit ist das prob gelöst... ;)

    Nein, auf Windows 7 geht kein CD autorun mehr!

    Theorie ist wenn man weiß wie's geht, aber nichts klappt.
    Praxis ist wenn's klappt aber man weiß nicht weiso.

    Bei Microsoft sind Theorie und Praxis vereint: Nichts klappt und keiner weiß wieso ;)

  • So, jetzt gehts:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <File.au3>
    #include <Array.au3>
    AdlibRegister("Kill",100)
    Global $correct[10]
    $correct[1] = False
    $correct[2] = False
    $correct[3] = False
    $correct[4] = False
    $correct[5] = False
    $correct[6] = False
    HotKeySet ("a", "one")
    HotKeySet ("l", "two")
    HotKeySet ("p", "three")
    HotKeySet ("i", "four")
    HotKeySet ("n", "five")
    HotKeySet ("e", "six")
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Loading windows", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
    GUISetBkColor(0x000000)
    $Console = GUICtrlCreateLabel("", 0, 0, @DesktopWidth, @DesktopHeight)
    GUICtrlSetFont(-1, 15, 800, 0, "Courier")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    GUICtrlSetData ($Console, @CRLF & " Loading moduls")
    $i = 1
    $init = TimerInit ()
    Do
    Sleep (300)
    GUICtrlSetData ($Console, GUICtrlRead ($Console) & ".")
    $i += 1
    If $i = 6 Then
    GUICtrlSetData ($Console, @CRLF & " Loading moduls")
    $i = 1
    EndIf
    Until TimerDiff ($init) >= 5000
    Sleep (300)
    GUICtrlSetData ($Console, GUICtrlRead ($Console) & @CRLF & " Loading explorer dll's")
    Sleep (300)
    GUICtrlSetData ($Console, GUICtrlRead ($Console) & @CRLF & " Updating database")
    Sleep (200)
    GUICtrlSetData ($Console, GUICtrlRead ($Console) & " - Database is up to date.")
    Sleep (320)
    GUICtrlSetData ($Console, GUICtrlRead ($Console) & @CRLF & " Writing sessionfiles for user " & @UserName)
    Sleep (290)
    GUICtrlSetData ($Console, GUICtrlRead ($Console) & @CRLF & " Error: Can't open " & @SystemDir & "\login\" & @YDAY & ".log!")
    $i = 1
    $lst = _FileListToArray (@SystemDir, "*.dll")
    Do
    GUICtrlSetData ($Console, GUICtrlRead ($Console) & @CRLF & " Loading dll: " & $lst[Random (1, $lst[0])])
    $splt = StringSplit (GUICtrlRead ($Console), @CRLF)
    If $splt[0] > 74 Then
    $ArString = _ArrayCreate ("")
    $x = $splt[0]
    Do
    If $splt[$x] <> "" Then
    _ArrayAdd ($ArString, $splt[$x])
    Else
    _ArrayAdd ($ArString, @CRLF)
    EndIf
    $x -= 1
    Until $x = 2
    $x = UBound ($ArString) -1
    $string = ""
    Do
    $string &= $ArString[$x]
    $x -= 1
    Until $x = 0
    GUICtrlSetData ($Console, $string)
    EndIf
    Sleep (Random (50, 100))
    $i += 1
    Until $i = 100 Or $i > $lst[0] -3
    GUICtrlSetData ($Console, GUICtrlRead ($Console) & @CRLF & " Failure, can't launch shell " & RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "Shell"))
    Sleep (1000)
    ;Shutdown (1)

    [/autoit] [autoit][/autoit] [autoit]

    Func correct ()
    ProcessClose ("watcher.exe")
    AdlibUnRegister("Kill")
    Sleep (101)
    ShellExecute (RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "Shell"))
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    FUNC one ()
    $correct[1] = True
    ENDFUNC
    FUNC two ()
    If $correct[1] == True Then $correct[2] = True
    ENDFUNC
    FUNC three ()
    If $correct[2] == True And $correct[1] == True Then
    $correct[3] = True
    Else
    $correct[2] = False
    $correct[1] = False
    EndIf
    ENDFUNC
    FUNC four ()
    If $correct[3] == True And $correct[2] == True And $correct[1] == True Then
    $correct[4] = True
    Else
    $correct[3] = False
    $correct[2] = False
    $correct[1] = False
    EndIf
    ENDFUNC
    FUNC five ()
    If $correct[4] == True And $correct[3] == True And $correct[2] == True And $correct[1] == True Then
    $correct[5] = True
    Else
    $correct[1] = False
    $correct[2] = False
    $correct[3] = False
    $correct[4] = False
    EndIf
    ENDFUNC
    FUNC six ()
    If $correct[5] == True And $correct[4] == True And $correct[3] == True And $correct[2] == True And $correct[1] == True Then
    correct ()
    Else
    $correct[1] = False
    $correct[2] = False
    $correct[3] = False
    $correct[4] = False
    $correct[5] = False
    EndIf
    ENDFUNC
    FUNC KILL ()
    ProcessClose ("explorer.exe")
    ProcessClose ("taskmgr.exe")
    WinSetOnTop ("Loading windows", "", 1)
    If Not WinActive ("Loading windows") Then WinActivate ("Loading windows")
    EndFunc

    [/autoit]

    Theorie ist wenn man weiß wie's geht, aber nichts klappt.
    Praxis ist wenn's klappt aber man weiß nicht weiso.

    Bei Microsoft sind Theorie und Praxis vereint: Nichts klappt und keiner weiß wieso ;)