Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- #include <MsgBoxConstants.au3>
- #include <ButtonConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <GuiIPAddress.au3>
- #include <GUIListBox.au3>
- #include <WindowsConstants.au3>
- #include <Constants.au3>
- Checker()
- Func Checker()
- Local $FNChecker, $dodaj_b, $usun_b, $lista1, $lista2, $ip, $dodaj_ip_b, $start_b, $wyczysc_b
- $x = 0
- $FNChecker = GUICreate("FNChecker", 621, 438, 645, 392)
- ;batony
- $dodaj_b = GUICtrlCreateButton(">>", 264, 104, 73, 33)
- $usun_b = GUICtrlCreateButton("<<", 264, 176, 73, 33)
- $dodaj_ip_b = GUICtrlCreateButton("Dodaj", 184, 304, 73, 33)
- $start_b = GUICtrlCreateButton("Rozpocznij", 208, 376, 169, 49)
- $wyczysc_b = GUICtrlCreateButton("Wyczyść", 418, 302, 73, 33)
- ;listy
- $lista1 = GUICtrlCreateList("", 40, 40, 209, 253)
- $lista2 = GUICtrlCreateList("", 352, 40, 209, 253)
- ;ip
- $ip = _GUICtrlIpAddress_Create($FNChecker, 24, 312, 145, 17)
- _GUICtrlIpAddress_Set($ip, "192.168.1.20")
- Dim $FNChecker_AccelTable[2][2] = [["{right}", $dodaj_b],["{DEL}", $usun_b]]
- GUISetAccelerators($FNChecker_AccelTable)
- GUISetState(@SW_SHOW)
- ;wczytywanie tabeli
- $aTab_1 = FileReadToArray("D:\ips.txt")
- If @error Then
- MsgBox(0, "", "Wystąpił błąd. @error: " & @error)
- Else
- For $i = 0 To UBound($aTab_1) - 1 ; petelka wczytujaca ip do tabeli1
- GUICtrlSetData($lista1, $aTab_1[$i])
- Next
- EndIf
- ;pentla
- While 1
- Switch GUIGetMsg()
- Case $GUI_EVENT_CLOSE
- ExitLoop
- Case $dodaj_b
- GUICtrlSetData($lista2, GUICtrlRead($lista1))
- Case $usun_b
- GUICtrlSetData(GUICtrlRead($lista2),"")
- Case $wyczysc_b
- GUICtrlRead($lista2)
- GUICtrlSetData(-1, "")
- Case $start_b
- ;start programu
- ConsoleWrite("plink.exe ducker.pl -l funnyguy -pw funny123 ping -c 10 " & GUICtrlRead($lista2) & @CRLF)
- $_plinkhandle = Run(@comspec & " /c" & "plink.exe ducker.pl -l funnyguy -pw funny123 ping -c 10 " & GUICtrlRead($lista2), @SW_SHOW)
- Case $dodaj_ip_b
- GUICtrlSetData($lista2, _GUICtrlIpAddress_Get($ip))
- EndSwitch
- WEnd
- EndFunc ;Checker
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement