-
Notifications
You must be signed in to change notification settings - Fork 658
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b179e75
Showing
142 changed files
with
15,340 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# AntivirusScanner | ||
|
||
## 0x01 功能说明 | ||
|
||
- 杀软进程检测`antivirus_scanner.py` | ||
- 支持进程详见`process.txt` | ||
|
||
## 0x02 运行结果 | ||
|
||
![image-20220531191024577](images/202205311910633.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
# @Author : Threekiii | ||
# @Time : 2022/5/27 19:40 | ||
# @Function: 杀软进程检测 | ||
|
||
import re | ||
import os | ||
import subprocess | ||
|
||
def banner(): | ||
print('+--------------------------------------------------') | ||
print('+ \033[36m@Function: 杀软进程检测 \033[0m') | ||
print('+ \033[36m@Author : Threekiii \033[0m') | ||
print('+ \033[31m代码仅供学习,任何人不得将其用于非法用途,否则后果自行承担。 \033[0m') | ||
print('+--------------------------------------------------') | ||
|
||
def check(): | ||
antivirus_list = [] | ||
with open('process.txt', 'r', encoding='utf-8') as f: | ||
content = f.readlines() | ||
try: | ||
print('+ \033[34m正在执行tasklist命令,当前路径: {}\033[0m'.format(os.path.abspath(os.path.dirname(__file__)))) | ||
tmp = subprocess.check_output('tasklist', shell=True).decode() | ||
tasklist = ''.join(re.findall('.*=(.*)', tmp, re.S)).strip().split('\r\n') | ||
print('+ \033[34m正在执行杀软进程检测...\033[0m') | ||
for task in tasklist: | ||
taskname = task.split()[0] | ||
for process in content: | ||
processname = process.strip('\n').split('\"')[1] | ||
if taskname == processname: | ||
result = process.strip('\n').split('\"')[3] | ||
antivirus_list.append('+ \033[31m存在进程:{}, 对应杀软:{}\033[0m'.format(processname, result)) | ||
print('\n+ \033[31m[检测完成] \033[0m') | ||
for al in antivirus_list: | ||
print(al) | ||
except Exception as e: | ||
print('\n+ \033[31m[出现异常] {}\033[0m'.format(e)) | ||
|
||
def run(): | ||
banner() | ||
check() | ||
|
||
if __name__ == '__main__': | ||
run() | ||
|
||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.