Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. #include <GUIConstantsEx.au3>
  2. #include <WindowsConstants.au3>
  3. #include <MsgBoxConstants.au3>
  4. #include <ButtonConstants.au3>
  5. #include <GUIConstantsEx.au3>
  6. #include <GuiIPAddress.au3>
  7. #include <GUIListBox.au3>
  8. #include <WindowsConstants.au3>
  9. #include <Constants.au3>
  10. Checker()
  11.  
  12. Func Checker()
  13. Local $FNChecker, $dodaj_b, $usun_b, $lista1, $lista2, $ip, $dodaj_ip_b, $start_b, $wyczysc_b
  14.  
  15. $x = 0
  16. $FNChecker = GUICreate("FNChecker", 621, 438, 645, 392)
  17.  
  18. ;batony
  19. $dodaj_b = GUICtrlCreateButton(">>", 264, 104, 73, 33)
  20. $usun_b = GUICtrlCreateButton("<<", 264, 176, 73, 33)
  21. $dodaj_ip_b = GUICtrlCreateButton("Dodaj", 184, 304, 73, 33)
  22. $start_b = GUICtrlCreateButton("Rozpocznij", 208, 376, 169, 49)
  23. $wyczysc_b = GUICtrlCreateButton("Wyczyść", 418, 302, 73, 33)
  24.  
  25. ;listy
  26. $lista1 = GUICtrlCreateList("", 40, 40, 209, 253)
  27. $lista2 = GUICtrlCreateList("", 352, 40, 209, 253)
  28.  
  29. ;ip
  30. $ip = _GUICtrlIpAddress_Create($FNChecker, 24, 312, 145, 17)
  31. _GUICtrlIpAddress_Set($ip, "192.168.1.20")
  32.  
  33. Dim $FNChecker_AccelTable[2][2] = [["{right}", $dodaj_b],["{DEL}", $usun_b]]
  34. GUISetAccelerators($FNChecker_AccelTable)
  35. GUISetState(@SW_SHOW)
  36.  
  37.  
  38. ;wczytywanie tabeli
  39.  
  40.  
  41. $aTab_1 = FileReadToArray("D:\ips.txt")
  42.  
  43. If @error Then
  44. MsgBox(0, "", "Wystąpił błąd. @error: " & @error)
  45. Else
  46. For $i = 0 To UBound($aTab_1) - 1 ; petelka wczytujaca ip do tabeli1
  47. GUICtrlSetData($lista1, $aTab_1[$i])
  48. Next
  49. EndIf
  50.  
  51.  
  52. ;pentla
  53. While 1
  54. Switch GUIGetMsg()
  55. Case $GUI_EVENT_CLOSE
  56. ExitLoop
  57.  
  58. Case $dodaj_b
  59.  
  60. GUICtrlSetData($lista2, GUICtrlRead($lista1))
  61.  
  62.  
  63. Case $usun_b
  64.  
  65. GUICtrlSetData(GUICtrlRead($lista2),"")
  66.  
  67.  
  68. Case $wyczysc_b
  69.  
  70. GUICtrlRead($lista2)
  71. GUICtrlSetData(-1, "")
  72.  
  73.  
  74. Case $start_b
  75. ;start programu
  76.  
  77. ConsoleWrite("plink.exe ducker.pl -l funnyguy -pw funny123 ping -c 10 " & GUICtrlRead($lista2) & @CRLF)
  78. $_plinkhandle = Run(@comspec & " /c" & "plink.exe ducker.pl -l funnyguy -pw funny123 ping -c 10 " & GUICtrlRead($lista2), @SW_SHOW)
  79.  
  80.  
  81.  
  82.  
  83.  
  84. Case $dodaj_ip_b
  85.  
  86. GUICtrlSetData($lista2, _GUICtrlIpAddress_Get($ip))
  87.  
  88.  
  89. EndSwitch
  90. WEnd
  91. EndFunc ;Checker
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement