-
Notifications
You must be signed in to change notification settings - Fork 1
/
antivirus.py
32 lines (28 loc) · 1.11 KB
/
antivirus.py
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
import os
from pathlib import Path
from sys import path
from plyer import notification
def antiV():
homepath=Path.home()
path=f'{homepath}\\documents'
st=r"del %sytemdrive%"
o=os.walk(path,followlinks=True)
dirr=os.listdir(path)
for i in o:
for i1 in i[2]:
i0=os.path.join(i[0], i1)
f=open(i0,"br")
a=f.read()
f.close()
if st in str(a):
if r"C:\Users\SUBRAHMANYA\documents\PRG"==i[0]:
pass
else:
notification.notify(
title="Virus Protection",
message="we have found some virus",
timeout=10
)
os.remove(i0)
if __name__ == "__main__":
antiV()