Voici encore un petit scanner multi-ports / ip, fonctionnant via proto tcp. ( heu ça va pas être ATA/ATAPI c'est sûr lol =)) Sachant que vbfrance proposait déjà beaucoup de scanner dans ce style, j'ai essayé d'innover en optimisant mon prog performances ( pour du vb bien sûr..), ainsi le src du scanner est contenue entièrement sur une unique form, la form1. Je ne vois pas l'intêret de mettre le zip pour une form, néanmoins, je vous propose un screenshot.... Alors ai-je réussi mon pari? Non je ne pense pas, ce scanner étant d'une simplicité qui n'a d'égale que sa consicion, il ne rivalise pas face au BlackScan.. Mais il se défend bien et se limite à des utilisateurs novices. Voila tout.. ++++, bonne prog' et joyeux Noel à toute la communautée des programmeurs vb c/c++ !
Lion7
Source / Exemple :
// Lion's Skan by Lion7
// version 1.0, améliorations à venir.
/* Form1 */
Dim port1 As Double
Dim portfin As Double
Dim bin As Byte
Sub listmodif()
List1.AddItem ("++++++++++++++++++++++++++++++++++++++++++++++++++++")
End Sub
Sub porttimer()
bin = 0
Timer1.Enabled = True
Winsock1.Connect
End Sub
Sub TrouverPort()
On Error Resume Next
bin = 0
Winsock1.Close
port1 = port1 + 1
If port1 = portfin Then
Text7 = Text7 + 1: listmodif: port1 = 1
If Text7 = Text11 And Text6 = Text10 And Text5 = Text9 And Text4 = Text8 Then
Exit Sub: MsgBox "Scanning terminé"
If Text7 = "255" And Text6 <> Text10 Then
Text7 = "0": listmodif
If Text6 = "255" And Text5 <> Text9 Then
Text6 = "0": listmodif
If Text5 = "255" And Text4 <> Text8 Then
Text5 = "0": listmodif
End If
End If
End If
End If
End If
Winsock1.RemoteHost = Text4 & "." & Text5 & "." & Text6 & "." & Text7
Winsock1.RemotePort = port1
porttimer
End Sub
Private Sub Label10_Click()
Form2.Show
End Sub
Private Sub Label11_Click()
List1.Clear
End Sub
Private Sub label5_Click()
On Error Resume Next
port1 = Text2
portfin = Text3
ip1 = Text4: ip2 = Text5: ip3 = Text6: ip4 = Text7: ip5 = Text8: ip6 = Text9: ip7 = Text10: ip8 = Text11
Winsock1.Close
Winsock1.RemoteHost = Text4 & "." & Text5 & "." & Text6 & "." & Text7
porttimer
Timer2.Enabled = True
Text4.Locked = True: Text5.Locked = True: Text6.Locked = True: Text7.Locked = True: Text8.Locked = True: Text9.Locked = True: Text10.Locked = True: Text11.Locked = True
End Sub
Private Sub label6_Click()
Text4.Locked = False: Text5.Locked = False: Text6.Locked = False: Text7.Locked = False: Text8.Locked = False: Text9.Locked = False: Text10.Locked = False: Text11.Locked = False
Winsock1.Close
Timer1.Enabled = False: Timer2.Enabled = False: Label12.Caption = "Port:"
End Sub
Private Sub Label7_Click()
Unload Me
End Sub
Private Sub Timer1_Timer()
bin = bin + 1
If bin = 10 Then Winsock1.Close
If bin = 10 Then TrouverPort
End Sub
Private Sub Timer2_Timer()
Label12.Caption = "Port: " & port1
End Sub
Private Sub winsock1_connect()
List1.AddItem (" " & Winsock1.RemoteHost & ": " & port1 & " ")
Winsock1.Close
End Sub
/* Form2 */
Private Sub Command1_Click()
Open Text1 For Output As #1
Print #1, Form1.List1
Close #1
End Sub
Private Sub Command2_Click()
Form2.Hide
End Sub
Conclusion :
N'oubliez pas de laissez vos commentaires et/ou critiques!
Lion7
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.