Hi All,
This is Nepaliman from Nepal.
Is it possible to keep log of default gateway. Log can be client IP, remote IP, remote port, client computer name etc.
I have little knowledge in VB6 and don't know VB.NET
Printable View
Hi All,
This is Nepaliman from Nepal.
Is it possible to keep log of default gateway. Log can be client IP, remote IP, remote port, client computer name etc.
I have little knowledge in VB6 and don't know VB.NET
easyest way i know of is:
vb Code:
Open app.path & "\gateway.bat" for output as #1 print #1, "@echo Off" print #1, "ipconfig >> " & app.path & "\Gatewaydat.txt" print #1, "exit" Close #1 Shell app.path & "\gateway.bat" doevents doevents doevents doevents doevents dim LineDataIn as string Open app.path & "\Gatewaydat.txt" for input as #1 do while not eof(1) line input #1, LineDataIn if Instr(LineDataIn, "Default Gateway") then text1.text=text1.text & linedatain loop close #1
Most routers (gateways) can be set to keep a log. Then just connect to the gateway, download the log and clear it.