how to block a TCP/IP port using visual Basic 6?
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.
Re: how to block a TCP/IP port using visual Basic 6?
Welcome to the forums. :)
Have you read the posts in this thread? I think some of what has been posted there will help.
Re: how to block a TCP/IP port using visual Basic 6?
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.
Re: how to block a TCP/IP port using visual Basic 6?
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?
VB Code:
Private Sub Command1_Click()
Winsock1.LocalPort = 3907
Winsock1.Close
Winsock1.Listen
End Sub
Re: how to block a TCP/IP port using visual Basic 6?
Quote:
Originally Posted by Brin
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?
VB Code:
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
Re: how to block a TCP/IP port using visual Basic 6?
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...
VB Code:
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