-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtasklist.html
More file actions
392 lines (349 loc) · 10.7 KB
/
tasklist.html
File metadata and controls
392 lines (349 loc) · 10.7 KB
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Process Lookup</title>
<link rel="icon" type="image/x-icon" href="./img/favicon.ico" />
<style>
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600&display=swap');
:root {
--bg-1: #0a1718;
--bg-2: #0e2426;
--accent: #1ec6a3;
--accent-2: #f1a208;
--card: rgba(16, 35, 38, 0.9);
--text: #e8f1ef;
--muted: #90a4a6;
--border: rgba(255, 255, 255, 0.08);
--shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
min-height: 100vh;
font-family: 'Noto Sans SC', 'Space Grotesk', sans-serif;
color: var(--text);
background: radial-gradient(circle at 20% 20%, rgba(30, 198, 163, 0.08), transparent 35%),
radial-gradient(circle at 80% 0%, rgba(241, 162, 8, 0.07), transparent 35%),
linear-gradient(135deg, var(--bg-1), var(--bg-2));
display: flex;
align-items: center;
justify-content: center;
padding: 40px 20px 80px;
}
.page {
width: min(1700px, 100%);
position: relative;
}
.card {
position: relative;
background: var(--card);
border: 1px solid var(--border);
border-radius: 18px;
padding: 28px;
box-shadow: var(--shadow);
backdrop-filter: blur(10px);
}
header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
margin-bottom: 22px;
}
.title {
display: flex;
flex-direction: column;
gap: 6px;
}
h1 {
font-size: clamp(26px, 4vw, 34px);
font-weight: 600;
letter-spacing: 0.4px;
}
.lead {
color: var(--muted);
line-height: 1.5;
}
.badge {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
border-radius: 999px;
background: rgba(30, 198, 163, 0.12);
border: 1px solid rgba(30, 198, 163, 0.35);
font-weight: 600;
color: var(--text);
letter-spacing: 0.3px;
}
.grid {
display: grid;
grid-template-columns: minmax(320px, 0.9fr) minmax(520px, 1.1fr);
gap: 26px;
align-items: start;
}
label {
display: block;
margin-bottom: 8px;
color: var(--muted);
font-size: 14px;
}
textarea, input, button {
width: 100%;
padding: 12px 14px;
border-radius: 12px;
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.04);
color: var(--text);
font-size: 15px;
line-height: 1.5;
}
textarea {
min-height: 180px;
resize: vertical;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
font-family: 'Space Grotesk', 'Noto Sans SC', 'SFMono-Regular', monospace;
white-space: pre-wrap;
word-break: break-word;
overflow: auto;
}
/* Scrollbar styling for all scrollable areas */
textarea::-webkit-scrollbar {
width: 10px;
height: 10px;
}
textarea::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.04);
border-radius: 10px;
}
textarea::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, #1ec6a3, #19a885);
border-radius: 10px;
border: 2px solid rgba(16, 35, 38, 0.9);
}
textarea::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, #22d6b0, #1bb592);
}
#content {
min-height: 260px;
}
textarea:focus, input:focus, button:focus {
outline: 1px solid rgba(30, 198, 163, 0.65);
box-shadow: 0 0 0 4px rgba(30, 198, 163, 0.15);
}
button {
background: linear-gradient(135deg, #1ec6a3, #19a885);
border: none;
font-weight: 600;
letter-spacing: 0.3px;
cursor: pointer;
transition: transform 0.12s ease, box-shadow 0.2s ease;
}
button:hover {
transform: translateY(-1px);
box-shadow: 0 12px 35px rgba(30, 198, 163, 0.35);
}
.results {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 16px;
margin-top: 16px;
}
.result-card {
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.02);
border-radius: 14px;
padding: 14px;
display: flex;
flex-direction: column;
gap: 8px;
}
.result-card h3 {
color: var(--muted);
font-size: 14px;
font-weight: 500;
letter-spacing: 0.2px;
}
.result-card textarea {
min-height: 200px;
background: rgba(255, 255, 255, 0.04);
}
.note {
color: var(--muted);
font-size: 13px;
margin-top: 12px;
line-height: 1.5;
}
@media (max-width: 640px) {
body { padding: 24px 16px 60px; }
header { flex-direction: column; align-items: flex-start; }
.card { padding: 22px; }
}
</style>
</head>
<body>
<div class="page">
<div class="card">
<header>
<div class="title">
<div id="badge-text" class="badge">tasklist /svc · ps -aux 查询</div>
<h1 id="heading-text">杀软 / 高危进程查询</h1>
<p id="lead-text" class="lead">粘贴 Windows tasklist 或 Linux ps -aux 输出,快速匹配常见杀软与可利用进程。</p>
</div>
</header>
<div class="grid">
<div>
<label id="content-label" for="content">粘贴进程列表</label>
<textarea id="content" placeholder="将 tasklist /svc 或 ps -aux 输出粘贴到这里"></textarea>
<div style="margin-top: 12px;">
<button id="search" type="button" onclick="getAVName();">立即查询</button>
</div>
<p id="note-text" class="note">提示:Windows 输出需包含 .exe 名称;Linux 输出会按命令包含关系匹配。</p>
</div>
<div>
<div class="results">
<div class="result-card">
<h3 id="result1-title">杀软结果</h3>
<textarea id="result1" placeholder="匹配到的杀软进程会显示在这里" readonly></textarea>
</div>
<div class="result-card">
<h3 id="result2-title">其他软件结果</h3>
<textarea id="result2" placeholder="匹配到的常见软件 / 高危进程" readonly></textarea>
</div>
<div class="result-card">
<h3 id="result3-title">Linux 进程结果</h3>
<textarea id="result3" placeholder="匹配到的 Linux 杀软或可利用进程" readonly></textarea>
</div>
</div>
</div>
</div>
</div>
<script>
(function() {
var translations = {
en: {
title: 'Process Lookup',
badge: 'tasklist /svc · ps -aux lookup',
heading: 'AV / High-Risk Process Lookup',
lead: 'Paste Windows tasklist or Linux ps -aux output to quickly match common AV and exploitable processes.',
label: 'Paste process list',
placeholderInput: 'Paste tasklist /svc or ps -aux output here',
button: 'Search now',
note: 'Tip: Windows output must include .exe names; Linux matching is by command substring.',
result1: 'AV matches',
result1Placeholder: 'Detected AV processes will appear here',
result2: 'Other software matches',
result2Placeholder: 'Common software / high-risk processes',
result3: 'Linux process matches',
result3Placeholder: 'Linux AV or exploitable processes'
},
zh: {
title: '运行查询',
badge: 'tasklist /svc · ps -aux 查询',
heading: '杀软 / 高危进程查询',
lead: '粘贴 Windows tasklist 或 Linux ps -aux 输出,快速匹配常见杀软与可利用进程。',
label: '粘贴进程列表',
placeholderInput: '将 tasklist /svc 或 ps -aux 输出粘贴到这里',
button: '立即查询',
note: '提示:Windows 输出需包含 .exe 名称;Linux 输出会按命令包含关系匹配。',
result1: '杀软结果',
result1Placeholder: '匹配到的杀软进程会显示在这里',
result2: '其他软件结果',
result2Placeholder: '匹配到的常见软件 / 高危进程',
result3: 'Linux 进程结果',
result3Placeholder: '匹配到的 Linux 杀软或可利用进程'
}
};
var userLang = (navigator.language || navigator.userLanguage || '').toLowerCase();
var selectedLang = userLang.indexOf('zh') === 0 ? 'zh' : 'en';
var t = translations[selectedLang];
document.documentElement.lang = selectedLang === 'zh' ? 'zh-Hans' : 'en';
document.title = t.title;
var setText = function(id, value) {
var el = document.getElementById(id);
if (el) {
el.textContent = value;
}
};
var setPlaceholder = function(id, value) {
var el = document.getElementById(id);
if (el) {
el.placeholder = value;
}
};
setText('badge-text', t.badge);
setText('heading-text', t.heading);
setText('lead-text', t.lead);
setText('content-label', t.label);
setPlaceholder('content', t.placeholderInput);
setText('note-text', t.note);
var searchBtn = document.getElementById('search');
if (searchBtn) {
searchBtn.textContent = t.button;
}
setText('result1-title', t.result1);
setPlaceholder('result1', t.result1Placeholder);
setText('result2-title', t.result2);
setPlaceholder('result2', t.result2Placeholder);
setText('result3-title', t.result3);
setPlaceholder('result3', t.result3Placeholder);
})();
</script>
</div>
<script src="./js/avlist.js"></script>
<script src="./js/linux.js"></script>
<script src="./js/tasklist.js"></script>
<script>
function getAVName() {
var processListText = document.getElementById('content').value;
// 正则表达式用于匹配每行的进程信息
var re = /\S+\s+(\d+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+(.+)/g;
var matches, processes = [];
// 解析每个匹配的进程信息
while ((matches = re.exec(processListText)) !== null) {
processes.push({ pid: matches[1], command: matches[2].toLowerCase() });
}
// 比较进程和 LinuxAvList
var result1 = document.getElementById('result3');
var htmlContent1 = "";
for (var i = 0; i < processes.length; i++) {
for (var av in LinuxAvList) {
if (processes[i].command.includes(av.toLowerCase())) {
htmlContent1 += processes[i].pid + " <=> " + processes[i].command + " <=> " + LinuxAvList[av] + "\n";
}
}
}
result1.innerHTML = htmlContent1;
var tasklist = document.getElementById('content').value;
var re = new RegExp("(.*?)\.exe", "g");
var tasks = tasklist.match(re);
var result = document.getElementById('result1');
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.toLowerCase() == tasks[x].toLowerCase()){
htmlContent += taskid + " <=> " + avList[taskid] + "\n"; // 如果是 cf 里 需要改为 \\n
}
}
}
result.innerHTML = htmlContent;
var result = document.getElementById('result2');
var htmlContent = "";
for(i=0; i<Object.keys(taskList).length; i++){
var taskid = Object.keys(taskList)[i];
for(x=0; x<tasks.length; x++){
if(taskid.toLowerCase() == tasks[x].toLowerCase()){
htmlContent += taskid + " <=> " + taskList[taskid] + "\n"; // 如果是 cf 里 需要改为 \\n
}
}
}
result.innerHTML = htmlContent;
}
</script>
</body>
</html>