home *** CD-ROM | disk | FTP | other *** search
Wrap
<% server.scripttimeout=240 on error resume next Dim Trace, DNS Set Trace = CreateObject("TCPIP.Trace") Set DNS = CreateObject("TCPIP.DNS") Dim I, IP, RoundTripTime, Status, TTL, TracedHost, bDNS, Checked, Hops, Bytes TracedHost = request("Host") If TracedHost = "" And InStr(UCase(request.servervariables("QUERY_STRING")), "HOST") = 0 Then TracedHost = request.servervariables("QUERY_STRING") If TracedHost = "" Then TracedHost = request.servervariables("REMOTE_ADDR") bDNS = request("DNS") If bDNS = "N" Then Checked = " checked" Hops = request("Hops") If IsNumeric(Hops) Then Hops = CLng(Hops) Else Hops = 0 If Hops = 0 Then Hops = 20 Bytes = request("Bytes") If IsNumeric(Bytes) Then Bytes = CLng(Bytes) Else Bytes = 0 If Bytes = 0 Then Bytes = 0 Timeout = request("TimeOut") If IsNumeric(Timeout) Then Timeout = CLng(Timeout) Else Timeout = 0 If Timeout = 0 Then Timeout = 5000 function isIP(Co) dim C, xIs, OneC xIs=True for c=1 to len(co) OneC=mid(co,c,1) if not ((onec>="0" and onec<="9") or (onec=".")) then xIs=False next isIP = xIs end function LOCAL_ADDR = request.servervariables("LOCAL_ADDR") ShowFrom = LOCAL_ADDR & " (" & GetHost(LOCAL_ADDR) & ")" 'response.write ":" & GetIP(TracedHost) if not isIP(TracedHost) then on error resume next IP = dns.GetIPByHost(TracedHost) if Err<>0 then None = True on error goto 0 end if if isIP(TracedHost) then ShowTo = TracedHost & " (" & GetHost(TracedHost) & ")" else ShowTo = GetIP(TracedHost) & " (" & TracedHost & ")" Response.write "<html><head><title>TraceRoute from " & ShowFrom & " to " & ShowTo & "</title></head><body BGPROPERTIES=FIXED BGCOLOR=WHITE LINK=RED VLINK=BLUE ALINK=GREEN>" Response.write "<center>" if None then'None Response.write "<h4>Host not found - " & ShowTo & "</h4>" else'None-OK Response.write "<h4>TraceRoute from " & ShowFrom & " to " & ShowTo & "</h4>" Response.write "<form>Trace to : <input name=Host value=""" & TracedHost & """>" Response.write "<input Value=Trace type=Submit><br>" Response.write "Maximum hops : <input size=3 name=Hops value=""" & Hops & """> " ' response.write "ytes : <input size=5 name=Bytes value=""" & Bytes & """>" Response.write "TimeOut [ms] : <input size=5 name=TimeOut value=""" & Timeout & """>" Response.write "<input name=DNS value=N type=checkbox" & Checked & "> No DNS " Response.write "</form>" Response.write "<pre>" ' response.write "<hr size=0>" Response.write OneStep("", "IP", "Time", "TTL", "Status", "Host") Trace.Timeout = Timeout Trace.RequestSize = 0 dim EndStep EndStep = 30 For I = 1 To Hops On Error Resume Next IP = Trace.OneStep(I, TracedHost) If Err Then If Trace.Status = 11010 Then Host = "Request timed out." Desc = "*" Else Desc = Err.Description Host = GetHost(IP) I = 100 End If Response.write OneStep(I , IP, Desc, Trace.TTL, Trace.Status, Host) Else Response.write OneStep(I, IP, Trace.RoundTripTime, Trace.TTL, Trace.Status, GetHost(IP)) End If If Trace.Status = 0 Then EndStep = I I = 100 end if On Error GoTo 0 Next Response.write "</pre>" dim vBandwidth vBandwidth = BandWidth(EndStep, TracedHost) if vBandwidth>0 then response.write "Bandwidth from " & ShowFrom & " to " & ShowTo & " : <b>" & formatnumber(vBandwidth,3) & "</b> kb/s" dim BandWidthStep BandWidthStep = 0 function BandWidth( Hop, TracedHost ) Trace.TimeOut = 30000 dim IP DIM ZeroTime, DataTime, DataSize Trace.RequestSize = 0 IP = Trace.OneStep(Hop, TracedHost) ZeroTime = Trace.RoundTripTime on error resume next Trace.RequestSize = 2000 IP = Trace.OneStep(Hop, TracedHost) DataTime = Trace.RoundTripTime DataSize = Trace.DataSize if Trace.RoundTripTime<1000 and Err=0 then Trace.RequestSize = 10000 IP = Trace.OneStep(Hop, TracedHost) if Err=0 then DataTime = Trace.RoundTripTime DataSize = Trace.DataSize if Trace.RoundTripTime<1000 and Err=0 then Trace.RequestSize = 60000 IP = Trace.OneStep(Hop, TracedHost) if Err=0 then DataTime = Trace.RoundTripTime DataSize = Trace.DataSize end if end if end if end if on error goto 0 if ZeroTime<DataTime then DataTime = DataTime - ZeroTime if "" & BandWidthStep="" then BandWidthStep=1 if (DataTime = 0) and (BandWidthStep < 3) then BandWidthStep = BandWidthStep +1 BandWidth = BandWidth( Hop, TracedHost ) end if if DataTime>0 then BandWidth = (1000/1024) * DataSize/DataTime*2*8 end if Trace.RequestSize = 0 end function Response.write "</CENTER>" end if'OK Response.write "<hr color=silver size=0><font size=1>ActiveX TraceRoute from <a href=http://www.pstruh.cz target=_top>PSTRUH Software</a></font>" Response.write "</body></html>" Function GetHost(IP) If bDNS = "N" Then GetHost = "-" Else On Error Resume Next GetHost = DNS.GetHostByIP(IP) If Err Then GetHost = Err.Description On Error GoTo 0 End If End Function Function GetIP(Host) If bDNS = "N" Then GetIP = "-" Else On Error Resume Next GetIP = DNS.GetIPByHost(Host) If Err Then GetHost = Err.Description On Error GoTo 0 End If End Function Function ToSize(Co, ByVal Size) Dim Kolik Kolik = Size - Len(Co) If Kolik < 0 Then Kolik = 0 ToSize = String(Kolik, "á") & Co End Function Function ToSizeR(Co, ByVal Size) Dim Kolik Kolik = Size - Len(Co) If Kolik < 0 Then Kolik = 0 ToSizeR = Co & String(Kolik, "á") End Function Function OneStep(Step, IP, RoundTripTime, TTL, Status, Host) Dim HTML ' HTML = HTML & "<pre>" HTML = HTML & "<hr size=0>" HTML = HTML & ToSize(Step, 3) HTML = HTML & ToSize(ToSizeR(IP, 15), 17) HTML = HTML & ToSize(RoundTripTime, 6) HTML = HTML & ToSize(TTL, 6) ' HTML = HTML & ToSize(Status,6) HTML = HTML & ToSize(Host, 50) OneStep = HTML End Function '<center> '<table border=0 cellspacing=0 cellpadding=1 bgcolor="#0000FF"><tr><td> '<table border=0 cellspacing=0 cellpadding=0><tr><td> '<a href="http://banner.linkexchange.com/1/X566848/clickbanner" 'target="_top"><img width=468 height=60 border=0 ismap src="http://banner.linkexchange.com/1/X566848/showbanner?free"></a></td> '</tr><tr><td><a href="http://banner.linkexchange.com/1/X566848/clickbar" 'target="_top"><img width=468 height=16 border=0 ismap lowsrc="http://banner.linkexchange.com/blankbar.gif" 'src="http://banner.linkexchange.com/1/X566848/showbar?free"></a></td> '</tr></table></td></tr></table> '</center> '<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=2 WIDTH="100%"><TR><TH ALIGN=LEFT NOWRAP width=20% bgcolor=silver>á<A HREF=http://www.pstruh.cz/help/usrmgr/library.htm>UserManager</A></TH><TD WIDTH="80%">á</TD></TR><TR><TD COLSPAN=2><BLOCKQUOTE>Contains simple objects for creating, deleting, managing and enumerating user accounts and groups. Allows remove and add users to a group and logon to the the Account Operator. <i>Samples for VB, IE and ASP.</i></BLOCKQUOTE></TD></TR></TABLE> '<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=2 WIDTH="100%"><TR><TH ALIGN=LEFT NOWRAP width=20% bgcolor=silver>á<A HREF=http://www.pstruh.cz/help/RSConv/library.htm>RSConvert</A></TH><TD WIDTH="80%">á</TD></TR><TR><TD COLSPAN=2><BLOCKQUOTE>RSConvert is a control for converting DAO or ADO recordsets to DBF files. It allows direct output of DBF files from ASP pages. The format of the Currency, Double, and Single fields can be customized.</BLOCKQUOTE></TD></TR></TABLE> '<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=2 WIDTH="100%"><TR><TH ALIGN=LEFT NOWRAP width=20% bgcolor=silver>á<A HREF=http://www.pstruh.cz/el/enhlog.hqs>EnhancedLog for MS IIS</A></TH><TD WIDTH="80%">á</TD></TR><TR><TD COLSPAN=2><BLOCKQUOTE>IIS ISAPI addin - allow redirect/customize error messages (401 Access denied, 404 Not found, ... ), custom error for each file/directory, extended logging (HTTP_REFERER, HTTP_USER_AGENT, HTTP_COOKIE), RAW data logging (IN and OUT), POST data logging, unique cookie.</BLOCKQUOTE></TD></TR></TABLE> '<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=2 WIDTH="100%"><TR><TH ALIGN=LEFT NOWRAP width=20% bgcolor=silver>á<A HREF=http://www.pstruh.cz/help/tcpip/library.htm>TCPIP</A></TH><TD WIDTH="80%">á</TD></TR><TR><TD COLSPAN=2><BLOCKQUOTE>Object for simple IP adress and host name resolution, ASP and VB TraceRoute.</BLOCKQUOTE></TD></TR></TABLE> '<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=2 WIDTH="100%"><TR><TH ALIGN=LEFT NOWRAP width=20% bgcolor=silver>á<A HREF=http://www.akcie.cz/util/stat/Default.asp?x=&DateType=1&Server=2>Access statistics for www.pstruh.cz</A></TH><TD WIDTH="80%">á</TD></TR><TR><TD COLSPAN=2><BLOCKQUOTE> </BLOCKQUOTE></TD></TR></TABLE> %>