|
-
Aug 29th, 2000, 12:14 AM
#1
Thread Starter
Addicted Member
Does anyone know where I can find code for a multiple IP port scanner? I've found a hundred that will scan multiple ports but none that scan multiple IP's.
I've tried to write one but I keep getting a buffer overflow from all of the winsock stuff it runs. Any ideas?
Thanks.
-
Aug 30th, 2000, 06:46 PM
#2
Addicted Member
Hmm...
Well, a cheap way around that (and not too effective) is to use multiple controls... like 5 for 5 different IPs. The problem with that is that you can only get up to about ten IPs with Winsock, and only a few more with TCP/IP before getting a buffer overflow. Maybe you've already tried this... dunno, hope it helps.
Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89
-ShardsOfSilence.net- ^ My name in ASCII ^
You forget something new every day
| WinME | VB6 Pro | MSC++ | Lambda MOO |
-
Aug 30th, 2000, 06:49 PM
#3
Thread Starter
Addicted Member
I have tried it with just one winsock control and am able to get upto 100 Ip addresses then it says there is no buffer space left,
do you know of any way around this, or it there another control that I should use instead of winsock.
Thanks
Hurgh
-
Aug 30th, 2000, 06:52 PM
#4
Addicted Member
Ooh
Well... I have a few ideas. How many winsock controls do you need to use? I'm not too used to using winsock, just a little. Is buffer overflow a matter of time? If so, maybe use a timer to space out multiple winsock control's scanning. IE: Have 1 winsock control do 100... wait a second, have the same one or a new one do another 100... wait a second, etc.
Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89
-ShardsOfSilence.net- ^ My name in ASCII ^
You forget something new every day
| WinME | VB6 Pro | MSC++ | Lambda MOO |
-
Aug 30th, 2000, 06:58 PM
#5
Thread Starter
Addicted Member
I will try and have a fiddle round with it,
If you have any code on how to do the timer thing that would be much appreciated, I am not too use to the use fo timers.
Hurgh
-
Aug 30th, 2000, 07:09 PM
#6
Addicted Member
Timer
Timers are really easy to use, once you know how. Simply enter how long you want it to wait inbetween whatever it's doing in the .interval prop... 800 is around 1 second I believe, not sure though. Double click on the timer to get its main function and enter the code for whatever you want it to do every 800 or whatever.
Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89
-ShardsOfSilence.net- ^ My name in ASCII ^
You forget something new every day
| WinME | VB6 Pro | MSC++ | Lambda MOO |
-
Aug 30th, 2000, 07:12 PM
#7
Thread Starter
Addicted Member
Ok will try and work it out
Hurgh
-
Aug 31st, 2000, 07:03 AM
#8
Lively Member
Look at me.. I know something... ;)
Have you tried using the MSWinsock Component?
sample:
Public function Scan_IP()
dim myPort as integer
dim myHost as string
myPort = 1002
set myWinsock = creatobject("MSWinsock.Winsock")
for a = 0 to 255
myHost = "10.0.0." & a
myWinsock.RemoteHost = myHost
myWinsock.RemotePort = myPort
myWinsock.Connect
s = DoEvents
Do While myWinsock.State = 4
s = DoEvents()
Loop
Do While myWinsock.State = 6
s = DoEvents()
Loop
If myWinsock.State <> 7 Then GoTo nosend 'If we couldn't connect the we won't send anything, just move on to the next IP.
lstAvaliableIP.additem myHost
GoTo ending
nosend:
ending:
s = DoEvents
myWinsock.Close
next a
End Function
I think that should take care of your Buffer problem.
-
Aug 31st, 2000, 08:23 PM
#9
Thread Starter
Addicted Member
It would not let me use the CreatObject thing,
is there a component that I need to add or something??
Hurgh
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
|