NSLookup - Ron Crumbaker Web Remote Console 3.21
George K (MeenEnta) shared his code for some of his Ron Console edits in this thread. RickyM & I are hoping to share some of them here.
This one is for performing an NSlookup against the target computer. I've modified it a bit from being a button to being an icon.
In this attached file are the snippets and the .png file you could use. Place the network-32x32.png file in your \Images folder; the folder is located where machrest.asp resides.
Edit machrest.asp, and put this snippet near the top (it was around line 70 for me, but I've edited my machrest quite a bit, might not be the same line number. It's above the "First Specifiy a machine name".
<IMG title="NSLookup" style="CURSOR: hand" onclick="NSLookup()"
height="24" src="images/Network-32x32.png" width="24" border="0">
--------------------------
Put this snippet near the bottem by all the other sub/end sub routines:
Sub nsLookup
On Error Resume Next
strComputer = Trim(document.frmMain.txtValue.value)
Set objShell = CreateObject("WScript.Shell")
If strComputer = "" Then
MsgBox "Computer Name or IP required",,"NSLookup"
Else
strCommand = "Nslookup " & strComputer
Set objExecObject = objShell.Exec(strCommand)
MsgBox objExecObject.StdOut.ReadAll()
End If
End Sub
-----------------------
Both of these snippets are also in the attached file in case word-wrap modifies the lines.
Save machrest.asp. Mine ended up looking a bit like this:
