|
-
Apr 8th, 2007, 07:00 AM
#1
Thread Starter
New Member
keeping log of default gateway
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
-
Apr 9th, 2007, 06:12 AM
#2
Addicted Member
Re: keeping log of default gateway
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
-
Apr 9th, 2007, 12:51 PM
#3
Re: keeping log of default gateway
Most routers (gateways) can be set to keep a log. Then just connect to the gateway, download the log and clear it.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
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
|