% 'response.write Traceroutegetip("ANONYMIZED.TLD") 'response.write MeasureBandWidth("ANONYMIZED.TLD") visitorip = Request.ServerVariables("REMOTE_ADDR") visitorhost = "" If (TraceRouteResolveDNS <> 0) Then visitorhost = TraceRouteGetHost(visitorip) If (visitorhost = "Valid name, no data record of requested type.") Then visitorhost = "" End If End If SuckerIP = visitorip SuckerRipeNcc = Whois(SuckerIP, "whois.ripe.net") Sucker = SuckerIP & vbCrLf & vbCrLf & SuckerRipeNcc SuckTrace = TraceRoute(visitorip, 0, 20, 1) SuckerAll = Now() & vbCrLf & vbCrLf & vbCrLf & Sucker & vbCrLf & vbCrLf & SuckTrace TraceRouteBW = 0 Function FleExists(ByVal FleExistsFle) FleExists = 0 Set FleExistsFsO = CreateObject("Scripting.FileSystemObject") If (FleExistsFsO.FileExists(FleExistsFle)) Then FleExists = 1 End If Set FleExistsFsO = Nothing End Function Sub FleStrApd(ByVal FleStrApdFle, ByVal FleStrApdStr) FleStrApdCrLf = "" Set FleStrApdFsO = CreateObject("Scripting.FileSystemObject") If (FleStrApdFsO.FileExists(FleStrApdFle)) Then Set FleStrApdFiO = FleStrApdFsO.OpenTextFile(FleStrApdFle) Do While Not (FleStrApdFiO.AtEndOfStream) FleStrApdRead = FleStrApdFiO.ReadLine() If (Len(FleStrApdRead) >= 2) Then If (Right(FleStrApdRead,2) <> (Chr(13) & Chr(10))) Then FleStrApdCrLf = (Chr(13) & Chr(10)) End If End If Loop FleStrApdFiO.Close Set FleStrApdFiO = FleStrApdFsO.OpenTextFile(FleStrApdFle, 8) Else Set FleStrApdFiO = FleStrApdFsO.CreateTextFile(FleStrApdFle) End If FleStrApdFiO.Write FleStrApdCrLf & FleStrApdStr FleStrApdFiO.Close Set FleStrApdFiO = Nothing Set FleStrApdFsO = Nothing End Sub Function TraceRoute(ByVal TraceRouteHost, ByVal TraceRouteTimeout, ByVal TraceRouteHops, ByVal TraceRouteResolveDNS) TraceRoute = "" If IsNumeric(TraceRouteHops) Then Hops = CLng(TraceRouteHops) Else TraceRouteHops = 0 If TraceRouteHops = 0 Then TraceRouteHops = 20 If IsNumeric(TraceRouteTimeout) Then TraceRouteTimeout = CLng(TraceRouteTimeout) Else TraceRouteTimeout = 0 If TraceRouteTimeout = 0 Then TraceRouteTimeout = 5000 If IsNumeric(TraceRouteResolveDNS) Then TraceRouteResolveDNS = CLng(TraceRouteResolveDNS) Else TraceRouteResolveDNS = 0 If TraceRouteResolveDNS <> 0 Then TraceRouteResolveDNS = 1 TraceRoute = TraceRoute & "Tracing Route to " & TraceRouteHost TraceRouteHostName = "" If (TraceRouteResolveDNS <> 0) Then TraceRouteHostName = TraceRouteGetHost(TraceRouteHost) If (TraceRouteHostName <> "Valid name, no data record of requested type.") Then TraceRoute = TraceRoute & " [" & TraceRouteHost & "]" End If End If TraceRoute = TraceRoute & Chr(13) & Chr(10) TraceRoute = TraceRoute & "over a maximum of " & TraceRouteHops & " Hops" & Chr(13) & Chr(10) TraceRoute = TraceRoute & "TimeOut [ms]: " & TraceRouteTimeOut & " Packet [bytes]: " & TraceRouteBytes & " DNS Resolve: " If (TraceRouteResolveDNS <> 0) Then TraceRoute = TraceRoute & "on" Else TraceRoute = TraceRoute & "off" TraceRoute = TraceRoute & Chr(13) & Chr(10) & Chr(13) & Chr(10) TraceRoute = TraceRoute & TraceRouteOneStep("#", "IP", Chr(9) & "Time", "TTL", "Status", "Host") Set TCPIPTrace = CreateObject("TCPIP.Trace") TCPIPTrace.Timeout = TraceRouteTimeout For TraceRouteI = 1 To TraceRouteHops On Error Resume Next TraceRouteOverIP = TCPIPTrace.OneStep(TraceRouteI, TraceRouteHost) If Err Then If TCPIPTrace.Status = 11010 Then TraceRouteDesc = "*" Else TraceRouteDesc = Err.Description TraceRouteI = 100 End If TraceRouteHostName = "" If (TraceRouteResolveDNS <> 0) Then TraceRouteHostName = TraceRouteGetHost(TraceRouteOverIP) If (TraceRouteHostName = "Valid name, no data record of requested type.") Then TraceRouteHostName = TraceRouteOverIP End If End If TraceRoute = TraceRoute & TraceRouteOneStep(TraceRouteI + 1, TraceRouteOverIP, TraceRouteDesc, "", TCPIPTrace.Status, TraceRouteHostName) Else TraceRouteHostName = "" If (TraceRouteResolveDNS <> 0) Then TraceRouteHostName = TraceRouteGetHost(TraceRouteOverIP) If (TraceRouteHostName = "Valid name, no data record of requested type.") Then TraceRouteHostName = TraceRouteOverIP End If End If TraceRoute = TraceRoute & TraceRouteOneStep(TraceRouteI, TraceRouteOverIP, TCPIPTrace.RoundTripTime , TCPIPTrace.TTL, TCPIPTrace.Status, TraceRouteHostName) If TCPIPTrace.Status = 0 Then Exit For End If If TCPIPTrace.Status = 0 Then Exit For On Error GoTo 0 Next TraceRouteBW = TCPIPTrace.DataSize/TCPIPTrace.RoundTripTime * 1000 Set TCPIPTrace = Nothing End Function Function TraceRouteOneStep(ByVal TraceRouteOneStepStep, ByVal TraceRouteOneStepIP, ByVal TraceRouteOneStepRoundTripTime, ByVal TraceRouteOneStepTTL, ByVal TraceRouteOneStepStatus, ByVal TraceRouteOneStepHost) TraceRouteOneStep = TraceRouteOneStepStep & Chr(9) TraceRouteOneStep = TraceRouteOneStep & TraceRouteOneStepIP & Chr(9) TraceRouteOneStep = TraceRouteOneStep & TraceRouteOneStepRoundTripTime & Chr(9) TraceRouteOneStep = TraceRouteOneStep & TraceRouteOneStepTTL & Chr(9) TraceRouteOneStep = TraceRouteOneStep & TraceRouteOneStepStatus & Chr(9) TraceRouteOneStep = TraceRouteOneStep & TraceRouteOneStepHost & Chr(9) TraceRouteOneStep = TraceRouteOneStep & Chr(13) & Chr(10) End Function Function TraceRouteGetHost(ByVal TraceRouteGetHostIP) On Error Resume Next Set TCPIPDNS = CreateObject("TCPIP.DNS") TraceRouteGetHost = TCPIPDNS.GetHostByIP(TraceRouteGetHostIP) If Err Then TraceRouteGetHost = Err.Description Set TCPIPDNS = Nothing On Error GoTo 0 End Function Function TraceRouteGetIP(ByVal TraceRouteGetIPHost) On Error Resume Next Set TCPIPDNS = CreateObject("TCPIP.DNS") TraceRouteGetIP = TCPIPDNS.GetIPByHost(TraceRouteGetIPHost) If Err Then TraceRouteGetIP = Err.Description Set TCPIPDNS = Nothing On Error GoTo 0 End Function Function MeasureBandWidth(ByVal MeasureBandWidthHost) On Error Resume Next Set TCPIPTrace = CreateObject("TCPIP.Trace") TCPIPTrace.Timeout = 5000 TCPIPTrace.RequestSize = 32768 MeasureBandWidth = TCPIPTrace.OneStep(TraceRouteI, MeasureBandWidthHost) MeasureBandWidthDummy = TCPIPTrace.DataSize/TCPIPTrace.RoundTripTime Set TCPIPTrace = Nothing On Error GoTo 0 End Function Function Whois(ByVal WhoisDomain, ByVal WhoisServer) On Error Resume Next Set socket = CreateObject("Socket.TCP") socket.TimeOut = 5000 socket.Host = WhoisServer + ":43" socket.Open() socket.SendLine(WhoisDomain) socket.WaitForDisconnect() whois = socket.Buffer Set Socket = Nothing End Function NDT = Now() NDT = (Year(NDT)*10000000000) + (Month(NDT)*100000000) + (Day(NDT)*1000000) + (Hour(NDT)*10000) + (Minute(NDT)*100) + Second(NDT) NDT = Right(("00000000000000" & CStr(NDT)),14) HitIdx = 0 HitFle = NDT & Right(("00" & CStr(HitIdx)),2) & ".txt" Do While FleExists(Server.Mappath("/") & "\" & HitFle) HitIdx = HitIdx + 1 HitFle = NDT & Right(("00" & CStr(HitIdx)),2) & ".txt" Loop Call FleStrApd(Server.Mappath("/") & "\" & HitFle, SuckerAll) %>
<%= Sucker %>
<%= SuckTrace %>