|
-
Nov 17th, 2000, 10:35 AM
#1
Thread Starter
Addicted Member
How would one go about coding a small app that will try every port/ip out of a proxy to find a path that goes successfully through the proxy.
I am not trying to hack into a proxy.
At my work, we have our systems all on a proxy, and I need to be able to get all systems here to reach my static IP at home where I have a Chat server setup.
Naturally, this is a no-no with my IT team.
Are there any Winsock/Proxy Gurus out there that can enlighten me?
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
-
Nov 17th, 2000, 10:49 AM
#2
Guru
You wouldn't want to do it from home (or at all). This is an action called "port scanning", which most ISPs consider illegal.
Most ISPs can also detect when you perform a port scan, and even send you an E-mail saying "one more time and you get no service" or something like that. 
For educational purposes ONLY:
Code:
Option Explicit
Dim nPort As Long
Sub PortScan(ByVal sIPAddress As String, Optional ByVal nStartPort As Long = 1, Optional ByVal nEndPort As Long = 65535)
Dim I As Long
Call wskPortScan.Close
For I = nStartPort To nEndPort
wskPortScan.LocalPort = 0
Call wskPortScan.Connect(sIPAddress, I)
Do
DoEvents
Loop Until wskPortScan.State = sckClosed
Next
End Sub
Private Sub wskPortScan_Close()
Call wskPortScan.Close
End Sub
Private Sub wskPortScan_Connect()
Debug.Print "Found open port: " & nPort
Call wskPortScan.Close
End Sub
Private Sub wskPortScan_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Call wskPortScan.Close
End Sub
-
Nov 18th, 2000, 02:51 AM
#3
Thread Starter
Addicted Member
How do I make this code work?
I copied to source, but it seems to be unfinished. I can not seem to start it.
I tried:
Code:
Private Sub Command1_Click()
Call PortScan("127.0.0.1", 1, 65535)
End Sub
But this did nothing for me...
any ideas?
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
-
Nov 18th, 2000, 04:30 AM
#4
Guru
- It takes time.
- You need the Debug (Immediate) Window open.
- Maybe you have no ports open.

-
Nov 18th, 2000, 04:58 AM
#5
Frenzied Member
I can send you the project files of mine that allow you to port scan. It then lists all of the open ports in a listbox.
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
|