Ports Network
Publié : lun. 27/août/2012 19:43
Voici un code qui determine si les 6 ports (entre 1 et 7000) sont pret pour un network :
86.208.215.22
Code : Tout sélectionner
If InitNetwork() = 0
MessageRequester("Error", "Can't initialize the network !", 0)
End
EndIf
Debug("Ports : ")
Debug("")
For i = 1 To 6
Read port.l
ConnectionID = OpenNetworkConnection("127.000.000.001", Port)
If ConnectionID
Debug(Str(port)+" : ouvert")
CloseNetworkConnection(ConnectionID)
Else
Debug(Str(port)+" : fermé")
EndIf
Next
Repeat
ForEver
; ports ouverts : 135, 445, 4664, 5151, 5939, 6832
DataSection
Data.l 135, 445, 4664, 5151, 5939, 6832
EndDataSection