~ IP Check

« Older   Newer »
  Share  
Aaly
CAT_IMG Posted on 1/5/2010, 11:00     +1   -1




Semplice programma per il controllo dell'IP.
Il programma ti dice il tuo IP attuale, lo stato della connessione, e offre la possibilità di aggiornare l'IP senza far saltare la connessione.



Stavo pensando alla possibilità di farlo sparire premendo il tasto INS, come ho fatto in alcuni altri programmi..
Ma per adesso lascio così


Eseguibile

IP Check.au3
SPOILER (click to view)
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=F:\immagini\icone\ICO\Icon Pack\Icone (ico)\internet e.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=~ IP Check
#AutoIt3Wrapper_Res_Description=~ IP Check
#AutoIt3Wrapper_Res_Fileversion=0.0.0.3
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Res_LegalCopyright=Jugasoft©
#AutoIt3Wrapper_Res_Language=1040
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****


;-------------------------------------------------------------------------


#include <guiconstantsex.au3>
#include <guilistbox.au3>
#include <staticconstants.au3>
#include <windowsconstants.au3>
#include <timers.au3>
#include <ie.au3>

$Form1 = GUICreate(" ~Ip Check", 394, 460, 597, 122)
GUISetBkColor(0xFFFFFF)

FileInstall("ai.ico",@AppDataDir & "\ai.ico")

$List1 = GUICtrlCreateList("", 8, 96, 121, 331)
$List2 = GUICtrlCreateList("", 136, 96, 121, 331)
$List3 = GUICtrlCreateList("", 264, 96, 113, 331)

GUICtrlCreateLabel("Ip(1) in uso:", 8, 8, 59, 17)
GUICtrlCreateLabel(@IPAddress1, 8, 24, 108, 20, $SS_CENTER)

$stato1 = GUICtrlCreateLabel("Unchanged", 8, 48, 117, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$ip1 = GUICtrlCreateLabel("", 8, 72, 116, 20, $SS_CENTER)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")



GUICtrlCreateLabel("Ip(2) in uso:", 140, 11, 59, 17)
GUICtrlCreateLabel(@IPAddress2, 140, 27, 108, 20, $SS_CENTER)

$stato2 = GUICtrlCreateLabel("Unchanged", 140, 48, 109, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$ip2 = GUICtrlCreateLabel("", 140, 72, 108, 20, $SS_CENTER)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")


GUICtrlCreateLabel("Ip(3) in uso:", 269, 8, 59, 17)
GUICtrlCreateLabel(@IPAddress3, 269, 27, 100, 20, $SS_CENTER)

$stato3 = GUICtrlCreateLabel("Unchanged", 269, 48, 109, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$ip3 = GUICtrlCreateLabel("", 269, 72, 92, 20, $SS_CENTER)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")


$tmp = GUICtrlCreateLabel("Tempo trascorso: " & 0&"h" & " : " & 0&"m" & " : " & 0&"s", 8, 436, 150, 17)
$cn = GUICtrlCreateLabel("", 320, 436, 58, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x00FF00)


GUICtrlCreateLabel("Ottieni nuovo IP", 207, 436, 80, 17)
$Icon1 = GUICtrlCreateIcon(@AppDataDir & "\ai.ico", -1, 188, 435, 16, 16, BitOR($SS_NOTIFY,$WS_GROUP))
GUICtrlSetCursor (-1, 0)

GUISetState(@SW_SHOW)

$iee = ObjCreate("shell.explorer")
$iee = _IECreate("https://www.youtube.com/",0,0)


$state1 = True
$state = True
$m = 0
$h = 0
$11 = 0
$12 = 0
$13 = 0


GUICtrlSetData($ip1,@IPAddress1)
GUICtrlSetData($ip2,@IPAddress2)
GUICtrlSetData($ip3,@IPAddress3)



$inizio = _Timer_Init()


While 1

$re = _Timer_Diff($inizio)


If $state1 = True Then
$ini = _Timer_Init()
$state1 = False
EndIf
$return = _Timer_Diff($ini)
If $return >= 250 Then

$source = _IEDocReadHTML($iee)
If $source <> "" Then
GUICtrlSetData($cn,"WEB: ON")
GUICtrlSetColor($cn, 0x00FF00)
Else
GUICtrlSetData($cn,"WEB: OFF")
GUICtrlSetColor($cn, 0xFF0000)
EndIf
If GUICtrlRead($ip1) <> @IPAddress1 Then
GUICtrlSetData($stato1,"["&$11&"]Changed")
$11 += 1
Beep(5,5)
GUICtrlSetData($List1,@IPAddress1)
GUICtrlSetFont($stato1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor($stato1, 0x00FF00)
GUICtrlSetData($ip1,@IPAddress1)
EndIf
If GUICtrlRead($ip2) <> @IPAddress2 Then
$12 += 1
Beep(5,5)
GUICtrlSetData($stato2,"["&$12&"]Changed")
GUICtrlSetData($List2,@IPAddress2)
GUICtrlSetFont($stato2, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor($stato2, 0x00FF00)
GUICtrlSetData($ip2,@IPAddress2)
EndIf
If GUICtrlRead($ip3) <> @IPAddress3 Then
$13 += 1
Beep(5,5)
GUICtrlSetData($stato3,"["&$13&"]Changed")
GUICtrlSetData($List1,@IPAddress3)
GUICtrlSetFont($stato3, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor($stato3, 0x00FF00)
GUICtrlSetData($ip3,@IPAddress3)
EndIf


$state1 = True
EndIf




If $state = True Then
$ini2 = _Timer_Init()
$state = False
EndIf
$return2 = _Timer_Diff($ini2)
If $return2 >= 1000 Then


$sec = Round($re/1000,0)


GUICtrlSetData($tmp,"Tempo trascorso: " & $h&"h" & " : " & $m&"m" & " : " & $sec&"s")
If $sec = 59 Then
$m += 1
$inizio = _Timer_Init()
EndIf
If $m = 59 Then $h += 1

$state = True
EndIf









$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
$iee = 0
FileDelete(@AppDataDir & "\ip.bat")
FileDelete(@AppDataDir & "\ai.ico")
Exit

Case $Icon1
FileInstall("ip.bat",@AppDataDir & "\ip.bat")
ShellExecuteWait(@AppDataDir & "\ip.bat","","","",@SW_HIDE)
While 1
If ProcessExists("ip.bat") Then
; null
Else
ExitLoop
EndIf
WEnd
FileDelete(@AppDataDir & "\ip.bat")




EndSwitch
WEnd
 
Top
MHack
CAT_IMG Posted on 1/5/2010, 11:21     +1   -1




g00d work! ;)
(MisterX ti ho preceduto :P)
 
Top
Kurt_Black_hat 2.0
CAT_IMG Posted on 2/5/2010, 02:55     +1   -1




Davvero ottimo :)
Continua così :P
 
Top
2 replies since 1/5/2010, 11:00   260 views
  Share