Hello. I've been trying to make a program that allows a user to know when a certain IP address connects to a certain port in my PC i.e. Spyware... Now the thing is, I want this program to be always watching/refreshing unless I stop it.
Here's the code I wrong so far...
| Code: |
Private Sub Form_Load()
' Once Form1 loads, show your own IP address
Label1.Caption = "" & Winsock1.LocalIP & ""
' Once Form1 loads, start listening to local port 3010
"Winsock1.LocalPort = "3010""
Winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
' If remote IP address tries to connect to port 3010...
' ...display following message in Listbox
List1.AddItem ("FOUND IP: " & Winsock1.RemoteHostIP & " " & "Try To Connected At " & Date &
" " & Time)
End Sub
Private Sub Command1_Click()
' If Command1 button is pressed, Stop listening on port 3010
Winsock1.Close
Advisor.Caption = "OFF"
' Just for looks drives focus out of Listbox once form loads
Option1.SetFocus
End Sub |