Jump to content

help with scanning ports


ODPOA
 Share

Recommended Posts

ok for example if i put in 200 it would scan

200.0.0.0-200.225.225.225

The only problem it it takes 20 seconds per ip address.

I have tried to edit tcp timeout but it does not help.

Is there any way to make tcp stop attempting a connection and set the the socket to -1 after maybe 200ms? instead of 20 seconds?

code:

AutoItSetOption("TCPTimeout", "1")
radmin("200")
func radmin($startip, $endip="225.225.225.225")
    
    TCPStartup()
    
    for $x=0 to 225
        $timer = TimerInit()
        $ip = $startIP&"."&$x&".0.0"
        Consolewrite($ip&@CRLF)
$socket = TCPConnect($ip,"4899")

If $socket = -1 Then
    ConsoleWrite($ip&" - NO - "&timerdiff($timer)&@CRLF)
Else
    
   ConsoleWrite($ip&" - YES - "&timerdiff($timer)&@CRLF)
   EndIf
   Next
   
   TCPShutdown()
EndFunc
Edited by ODPOA
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...