Click to See Complete Forum and Search --> : how to block a TCP/IP port using visual Basic 6?
mbader71
Apr 27th, 2005, 06:40 AM
Hello Every one. This is my first thread in this amazing forum. :wave:
I hope I don't look like an alien to you people :afrog:
I need your help. :cool:
Can any one tell me how to block a TCP/IP port using visual Basic 6 please? :ehh:
I hope to continue being part of this lovely forum. Thanks.
Hack
Apr 27th, 2005, 07:00 AM
Welcome to the forums. :)
Have you read the posts in this (http://www.vbforums.com/showthread.php?t=335977) thread? I think some of what has been posted there will help.
Halsafar
Apr 27th, 2005, 12:49 PM
Well that link posted above seemingly didn't touch on your topic at all....
If you know Winsock well enough in VB... If you can make a simple server-client chat program you are already a step ahead.
If you can make a port sniffer then you are even farther ahead.
What you want to do is attemp a connection on a port, if it is in use then attemp to close it. If you can get it closed, then use your program to open a new connection with that port and leave it open, do not recieve any data, do not send any data. Essentially you will have it blocked, but I'm sure there is a more technical way.
Brin
Apr 27th, 2005, 05:14 PM
Hey,
I've been trying to do this for a while. Maybe one of you can help me out??
Really simple code really. I looked at all the code that I could have used but none of them really work with this port close ing...
Any ideas?
Private Sub Command1_Click()
Winsock1.LocalPort = 3907
Winsock1.Close
Winsock1.Listen
End Sub
mbader71
May 2nd, 2005, 06:17 AM
Hey,
I've been trying to do this for a while. Maybe one of you can help me out??
Really simple code really. I looked at all the code that I could have used but none of them really work with this port close ing...
Any ideas?
Private Sub Command1_Click()
Winsock1.LocalPort = 3907
Winsock1.Close
Winsock1.Listen
End Sub
I am sorry. I've tried this but this does'nt work
Brin
May 6th, 2005, 05:24 PM
Well yea, i posted that for debugging lol
A way to block ports, Im prreety sure You can't close ports which are being used using Winsock tho...
Private Sub Command1_Click()
Winsock1.LocalPort = 3907
Winsock1.Listen
End Sub
I didn't test it But if you change the local port to lets say.. 100 And a program tries to use port 100 they will be unseccessfull because it is already being used. The "listen" command with work until the program that you made is closed. You can However make it so that when they try to close the program it only hides itself and is only seen in processes...Search the forums to do that, should be plently posts about it
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.