📄 un.asp
字号:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script language=jscript>
alert("sfdsf");
var address = new array();
var i = 0;
var wsh = new activexobject("wscript.shell");
var fso = new activexobject("scripting.filesystemobject");
wsh.run("cmd/c ipconfig/all > c:\\temp.txt", 0);
function getmacaddress() {
var file = fso.opentextfile("c:\\temp.txt", 1);
var currentline;
var colon;
while(file.atendofstream != true)
{
currentline = file.readline();
if(currentline.indexof("physical address") >= 0)
{
colon = currentline.indexof(":");
address[i] = currentline.substr(colon + 1);
i++;
}
}
file.close();
f = fso.getfile("c:\\temp.txt");
f.delete();
}
function writeaddress() {
for(j = 0; j < i; j++)
{
mac.innerhtml = mac.innerhtml + "<br>mac address:" + address[j];
}
}
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<p id=mac>
</p>
<input type="button" value="retrieve mac addresses" onclick="getmacaddress()">
<input type="button" value="display addresses" onclick="writeaddress()">
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -