-
Notifications
You must be signed in to change notification settings - Fork 4
/
getAV.html
39 lines (34 loc) · 1.44 KB
/
getAV.html
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
<!DOCTYPE html>
<html>
<head>
<title>getAVName</title>
<meta charset="utf-8">
</head>
<body>
<center>
<h4>tasklist /svc</h4><br>
<textarea style="width: 950px; height: 341px;" id="content"></textarea><br><br>
<input type="submit" id="search" value="查询" onclick="getAVName();"><br>
<div id="result"></div>
</center>
<script src="./avlist.js"></script>
<script>
function getAVName() {
var tasklist = document.getElementById('content').value;
var re = new RegExp("(.*?)\.exe", "g");
var tasks = tasklist.match(re);
var result = document.getElementById('result');
var htmlContent = "";
for (i = 0; i < Object.keys(avList).length; i++) {
var taskid = Object.keys(avList)[i];
for (x = 0; x < tasks.length; x++) {
if (taskid == tasks[x]) {
htmlContent += taskid + " <=> " + avList[taskid] + "<br>";
}
}
}
result.innerHTML = htmlContent;
}
</script>
</body>
</html>