commit 959d95706883c1a69f9527bf90cb72c2eb33f51b Author: Ketan Date: Thu Oct 1 13:25:32 2026 -0400 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..057d39d --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Vanti +> Anti + V(irus) backwards pronounced Van-tee + +Vanti is a simple anti-virus that checks the download folder (and others if you specify it) file's file hashes with MalwareBazaar \ No newline at end of file diff --git a/ha.txt b/ha.txt new file mode 100644 index 0000000..e69de29 diff --git a/libs/__init__.py b/libs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/libs/filesearch.py b/libs/filesearch.py new file mode 100644 index 0000000..716e662 --- /dev/null +++ b/libs/filesearch.py @@ -0,0 +1,27 @@ +import time +from watchdog.observers import Observer +from watchdog.events import FileSystemEventHandler +from pathlib import Path +downloads_path = Path.home() / "Downloads" + +class NewFileHandler(FileSystemEventHandler): + def on_created(self, event): + if not event.is_directory: + print(f"New file detected: {event.src_path}") + +if __name__ == "__main__": + path_to_watch = downloads_path + + event_handler = NewFileHandler() + observer = Observer() + observer.schedule(event_handler, path=path_to_watch, recursive=False) + + print(f"Monitoring folder: {path_to_watch}...") + observer.start() + + try: + while True: + time.sleep(1) + except KeyboardInterrupt: + observer.stop() + observer.join() diff --git a/libs/hashchecker.py b/libs/hashchecker.py new file mode 100644 index 0000000..b04987f --- /dev/null +++ b/libs/hashchecker.py @@ -0,0 +1,11 @@ +import hashlib + +def hashcheck(fileToCheck): + with open(fileToCheck, "rb") as f: + digest = hashlib.file_digest(f, "sha256") + file_hash = digest.hexdigest() + print(file_hash) + +hashcheck("ha.txt") + +