• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

AutoIT Network Scanner

Status
Not open for further replies.

rayane888

LvL-23
User
Joined
Dec 5, 2011
Messages
131
Reputation
0
Reaction score
735
Points
93
Credits
0
‎13 Years of Service‎
44%
[HIDE-THANKS]

; Level-23 Tutorial

#include "inet.au3"

#include "array.au3"

#include

#include

#include

#include

#include

#include

#include 'string.au3'

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("888 Network Scanner Autoit Tutorial", 651, 304, -1, -1)

$ListView1 = GUICtrlCreateListView("IP|Name", 16, 16, 481, 273)

GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 190)

GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 190)

$Button1 = GUICtrlCreateButton("Scanne", 512, 112, 129, 177)

$Label1 = GUICtrlCreateLabel("", 512, 88, 132, 17)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

$arr=StringSplit(@IPAddress1,".")

TCPStartup()

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

_GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($ListView1))

For $rra=1 to 21

$ips=$arr[1]&"."&$arr[2]&"."&$arr[3]&"."&$rra

GUICtrlSetData($Label1,$ips)

$aexxx=Run("ping " & $ips & " -n 1 -w " & 500, "", @SW_HIDE, $STDOUT_CHILD)

$eats=''

While 1

$data = StdoutRead($aexxx,0)

if @error Then ExitLoop

$eats&=$data

WEnd

If _StringBetween($eats,"= ","ms") <> "" Then

$name=_TCPIpToName($ips)

If $name = "" Then

$name = "Unknow"

EndIf

_GUICtrlListView_InsertItem($ListView1, 0, "")

_GUICtrlListView_AddSubItem($ListView1,0, $ips, 0)

_GUICtrlListView_AddSubItem($ListView1,0,$name,1)

EndIf

Next

EndSwitch

WEnd

[/HIDE-THANKS]

 
Status
Not open for further replies.
Back
Top