|
-
Apr 27th, 2005, 06:40 AM
#1
Thread Starter
New Member
-
Apr 27th, 2005, 07:00 AM
#2
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.
Last edited by Hack; Apr 27th, 2005 at 08:36 AM.
-
Apr 27th, 2005, 12:49 PM
#3
PowerPoster
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.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Apr 27th, 2005, 05:14 PM
#4
Lively Member
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
-
May 2nd, 2005, 06:17 AM
#5
Thread Starter
New Member
Re: how to block a TCP/IP port using visual Basic 6?
 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
-
May 6th, 2005, 05:24 PM
#6
Lively Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|