<%@ Page Language="VB" %> <% @Import Namespace="System.Net.Dns" %> <% @Import Namespace="System.Diagnostics" %> <% Response.Buffer=True 'Response.Write (request.querystring) dim ip1,IP ,IPV,HostStr ,IPstr ,res as String dim tepms Dim loop1, loop2 As Integer Dim arr1(), arr2() As String Dim coll As NameValueCollection ' Load Form variables into NameValueCollection variable. coll=Request.QueryString ' Get names of all keys into a string array. arr1 = coll.AllKeys For loop1 = 0 To arr1.GetUpperBound(0) '=arr1(loop1) ' Get all values under this key. arr2 = coll.GetValues(loop1) For loop2 = 0 To arr2.GetUpperBound(0) tepms= CStr(arr2(loop2)) ' Response.Write("Value " & CStr(loop2) & ": " & arr2(loop2) & "

") Next loop2 Next loop1 Response.Flush() if (tepms="") then IPV=Request.ServerVariables("REMOTE_HOST") else IPV=tepms end if 'IPV=Request.ServerVariables("REMOTE_HOST") res="" 'Response.Write(" Scan IP : " & IPV & "
") Response.Flush() 'Private Function IPtoHost(ByVal IPstr As String) As String IPstr=IPV Response.Flush() ' Private IP As IPEndPoint() 'Public Function ValueSepR(ByVal RawString As String, ByVal SepChar As String) As String 'If InStr(1, RawString, SepChar) <> 0 Then 'ValueSepR = Microsoft.VisualBasic.Right(RawString,Len(RawString) - InStr(1, RawString, SepChar)) 'Else 'ValueSepR = RawString 'End If 'End Function Response.Flush() 'Public Function GetMac(ByVal IP As String) As String IP=IPV res="" Try Dim dirResults As String Dim psi As ProcessStartInfo = New ProcessStartInfo() Dim proc As New Process() psi.FileName = "net" psi.RedirectStandardInput = False psi.RedirectStandardOutput = True psi.Arguments = "send " & IP &" Elvis has left the Building "&chr(10)&chr(13)& "By www.drorshalev.com" res="Try To Run NET SEND
ip:"&IP &"
Elvis has left the Building
By www.drorshalev.com" psi.UseShellExecute = False proc = Process.Start(psi) Dim x As Integer = -1 'Do Until x > -1 'If dirResults <> Nothing Then ' res=res+ dirResults+"
" 'x = dirResults.Trim.ToLower.IndexOf("mac address", 0) 'If x > -1 Then 'Exit Do 'End If 'End If Catch err As Exception Response.Write(err.Message & err.StackTrace+"
") End Try 'dirResults = proc.StandardOutput.ReadLine 'Loop 'proc.WaitForExit() 'Response.Write(dirResults+"
") 'GetMac = ValueSepR(dirResults.Trim, "=").Trim 'Catch err As Exception 'Response.Write(err.Message & err.StackTrace+"
") 'End Try Response.Flush() %> Big Mac <%=res%> <% %>