J
S
P
探
针
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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | <blockquote><<a href="mailto:%@page">%@page</a> contentType="text/html;charset=gb2312"%> <<a href="mailto:%@page">%@page</a> import="java.io.*,java.util.*,java.net.*" %> <%! String tblWidth = "700"; String tblAlign = "center"; String strOS =System.getProperty("os.name"); private String getIp() { String strTmp=""; try { strTmp =InetAddress.getLocalHost().getHostAddress(); return strTmp; } catch(Exception e) { return strTmp; } } private String getSystemEnv() throws Exception { String OS = System.getProperty("os.name").toLowerCase(); StringBuffer sb=new StringBuffer(""); Process p=null; if(OS.indexOf("windows")>-1) { p=Runtime.getRuntime().exec("cmd /c set"); } else { p=Runtime.getRuntime().exec("/bin/sh -c set"); } BufferedReader br=new BufferedReader(new InputStreamReader(p.getInputStream())); String line; while((line=br.readLine())!=null) { sb.append(line+"<br>"); } return sb.toString(); } private String getDrivers() { StringBuffer sb=new StringBuffer(""); File roots[]=File.listRoots(); for(int i=0;i<roots.length;i++) { sb.append(roots[i]+" "); } return sb.toString(); } %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>jsp探针</title> <style type="text/css"> <!-- body,td,th { font-size: 9pt; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .STYLE4 {color: #000000} .STYLE5 {font-weight: bold; font-size: 10pt;} .STYLE7 {font-size: 10} --> </style> </head> <body> <table align="center" width="277" border="0"> <tr> <td width="90" align="center">Jsp探针 ver1.0 </td> <td width="85" align="center"><a href="<a href="http://www.51safe.net/">http://www.51safe.net</a>">无忧安全网</a></td> </tr> </table> <div align="center"><br> <table width="<%=tblWidth%>" align="<%=tblAlign%>" border="0" cellspacing="0" cellpadding="1"> <tr> <td colspan="2" height="22" bgcolor="#E0E0E0"><span> 服务器基本信息 </span> </td> </tr> <tr> <td height="23" width="20%" > 服务器名称</td> <td> <%= request.getServerName() %> </td> </tr> <tr> <td height="23" width="20%" > 域名/IP </td> <td> <%= request.getServerName() %> <%=getIp()%> </td> </tr> <tr> <td height="23"> 服务器端口 </td> <td> <%= request.getServerPort() %> </td> </tr> <tr> <td height="23"> 客户端端口 </td> <td> <%= request.getRemotePort() %> </td> </tr> <tr> <td height="23"> 客户端IP </td> <td> <%= request.getRemoteAddr() %> </td> </tr> <tr> <td height="23"> Web 服务器 </td> <td> <%= application.getServerInfo() %> </td> </tr> <tr> <td height="23"> 操作系统 </td> <td> <%= strOS+" "+System.getProperty("sun.os.patch.level")+" Ver:"+System.getProperty("os.version") %> </td> </tr> <tr> <td height="23"> 服务器时间 </td> <td> <%=new Date().toLocaleString()%> </td> </tr> <tr> <td height="23" width="20%" > CPU 信息 </td> <td> <%= System.getProperty("os.arch")%> </td> </tr> <tr> <td height="23" width="20%" > 磁盘分区 </td> <td> <%= getDrivers()%> </td> </tr> <tr> <td height="23" width="20%" > 用户当前工作目录 </td> <td> <%= System.getProperty("user.dir")%> </td> </tr> <tr> <td height="23"> 本文件路径 </td> <td> <%= application.getRealPath(request.getRequestURI()) %> </td> </tr> </table> <br> <table width="<%=tblWidth%>" align="<%=tblAlign%>" border="0" cellspacing="0" cellpadding="1"> <tr> <td colspan="2" height="22" bgcolor="#E0E0E0"><span> <span>Java 相关信息</span></span> </td> </tr> <tr> <td height="23" width="20%" ><span> JDK 版本</span> </td> <td> <%= System.getProperty("java.version") %> </td> </tr> <tr> <td height="23" width="20%" > Servlet 版本 </td> <td> <%= application.getMajorVersion()+"."+application.getMinorVersion() %> </td> </tr> <tr> <td height="23" width="20%" > JDK 安装路径 </td> <td> <%= System.getProperty("java.home")%> </td> </tr> <tr> <td height="23" width="20%" > 编码 </td> <td> <%= System.getProperty("file.encoding")%> </td> </tr> <tr> <td height="23" width="20%" > JAVA类路径 </td> <td> <%= System.getProperty("java.class.path")%> </td> </tr> </table> <br> <table width="<%=tblWidth%>" align="<%=tblAlign%>" border="0" cellspacing="0" cellpadding="1"> <tr> <td colspan="2" height="22" bgcolor="#E0E0E0"> 服务器环境变量 </td> </tr> <tr> <td colspan="2"><%= getSystemEnv() %> </td> </tr> </table> <br> </div> </body> </html></blockquote> |
会员登录关闭
注册会员关闭