-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdatevt.py
31 lines (27 loc) · 978 Bytes
/
updatevt.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
#!/usr/bin/env python3
import time
import AndroidTrustMatrix.db
from AndroidTrustMatrix.util import CheckVT
def update_db_vt_records():
db = AndroidTrustMatrix.db.db()
db.Connect()
while(True):
unscanned = db.Get_VT_Queue()
aged = db.Get_VT_Aged()
applications = unscanned + aged
if applications:
for application in applications:
sha256sum = application[0]
isMalware = CheckVT(sha256sum)
print(f"{sha256sum} - {isMalware}")
if isMalware:
# Set db to reflect true
db.Update_Malware(sha256sum,isMalware)
db.Update_VTTime(sha256sum)
else:
# No change as undetected *Try again later
db.Update_VTTime(sha256sum)
pass
time.sleep(60)
if __name__ == "__main__":
update_db_vt_records()