1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| <html>
<head><title>Traceroute</title>
<HTA:APPLICATION ID="oHTA";
APPLICATIONNAME="Traceroute";
BORDER="thin";
SCROLL="yes"
SINGLEINSTANCE="yes"
WINDOWSTATE="Maximize"
icon="verifier.exe"
>
</head>
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="YES">
<script language="VBScript" type="text/vbscript">
Function CmdPrompt(sCmd)
Dim strOut,alines, sCmdLine, stemp, ofs, oWS, nRes
'On Error Resume Next
strOut =""
sCmdLine = """%comspec%"" /c " & sCmd & " 1>> "
set ofs = CreateObject("Scripting.FileSystemObject")
stemp = ofs.GetTempName
set oWS = CreateObject("Wscript.Shell")
stemp = oWS.Environment("PROCESS")("TEMP") & "\" & stemp
nRes = oWS.Run(sCmdLine & Chr(34) & sTemp & Chr(34),Abs(cSng(bConsoleSw)),True)
' optional
'alines = "ERRORLEVEL: " & nRes & vbCRLF
if ofs.FileExists(sTemp) Then
with ofs.OpenTextFile(stemp)
if Not .AtEndofStream Then
alines = aLines & .ReadAll
alines = Replace(aLines,"","é")
'Set regEx = New RegExp
'regEx.Pattern = "[\f\n\r\v]+"
'regEx.Global = True
'regEx.Multiline = True
'alines = regEx.Replace(alines,"<br>")
alines = Replace(alines,VbNewLine,"<br>")
'MsgBox alines
Message.style.visibility="visible"
document.body.style.cursor = "default"
TraceOut.InnerHTML = aLines
End if
End With
ofs.DeleteFile stemp
alines = Split(aLines, vbNewline)
Else
aLines = Array(nRes, "")
End if
ReDim Preserve alines(Ubound(alines) - 1)
if Err.Number <> 0 Then _
aLines = Array("Error Number:" & CStr(Err.Number),Err.Description)
CmdPrompt = alines
Message.style.visibility="visible"
document.body.style.cursor = "default"
TraceOut.InnerHTML = alines
End Function
Sub Execution()
Message.InnerHTML = "<center><hr noshode color=""#000000""><b><font color='DarkOrange' size='5'>Détermination de l'itinéraire vers "&T1.Value&" </font><hr noshode color=""#000000"">"
document.body.style.cursor = "wait"
Call CmdPrompt("Tracert "&T1.Value&"")
End Sub
</script>
<body bgcolor="#12345678" text=white>
<center><font size=3 face="Century Gothic, Tahoma, Arial" color="White">
<p><b>Traceroute</b><hr noshode color="#000000"><br>
<p>Nom de la Hôte ou bien son adresse IP: <input type="text" size="25" name="T1" Value="www.developpez.com"></font></center>
<center><p><input type="submit" name="B1" value="Tracer la Hôte" onclick="Execution()"></p></center>
<span id ="Message"><hr noshode color="#000000"></span>
<font size=3 face="Century Gothic, Tahoma, Arial" color="White"><div id=TraceOut></div></font>
</body> |
Partager