-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
27 lines (21 loc) · 713 Bytes
/
Copy pathscript.py
File metadata and controls
27 lines (21 loc) · 713 Bytes
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
import os
import json
def main():
string_to_search = os.getenv('keyval')
file_database = "Database/malwaresignatures.txt"
database_set = set()
if not string_to_search:
return False
if os.path.exists(file_database):
with open(file_path, 'r', encoding='utf-8') as f:
database_set = {line.strip() for line in f if line.strip()}
found = False
if string_to_search in database_set:
found = True
result_text = "MALWARE" if found else "good"
requests.post("https://github.com/fabiodefilipposoftware/fdsec.it", json={
"string": string_to_search,
"verdict": result_text
})
if __name__ == "__main__":
main()