def System_scan(): LOG.CORELET_LOG(f"Scanning {Userprofile}") Listall_items() os.chdir(Userprofile) Content = os.listdir() for Files in Content: for items in Is_virus: if items in Files: if os.path.isfile(Files) == True: LOG.CORELET_ERROR_LOG(f"Virus found, removed {Files}") os.remove(Files) os.chdir(RootDir) LOG.CORELET_LOG(f"{Userprofile} scanned successfully.") LOG.CORELET_LOG(Fore.GREEN + "Your System is safe!\n")
WinDir = os.environ['SYSTEMDRIVE'] Username = os.environ['USERNAME'] CONSOLE_DATA = "RealTime Protection is activated." Logo = pygame.image.load("Logo.png") Circle = pygame.image.load("Circle.png") clock = pygame.time.Clock() IsPressed = {'System_scan': 0, 'Custom_scan': 0, 'Realtime_protection': 0} # Setting up window Display = pygame.display.set_mode((475, 650)) pygame.display.set_caption("Corelet") pygame.display.set_icon(Logo) # Setting up Terminal os.system('title Corelet') LOG.CORELET_LOG(Fore.GREEN + "Corelet") LOG.CORELET_LOG( Fore.GREEN + f"Your Windows installtion drive \"{WinDir}\\\" has been detected for scan." ) with open("PROPERTIES.json", "r") as READ: Content = json.load(READ) for Data in Content["PROPERTIES"]: if Data["realtime_protection"] == True and Data[ "startup_protection"] == True: LOG.CORELET_LOG("Startup Protection is enabled.") LOG.CORELET_LOG("Realtime Protection is enabled.\n") RealTime_Protection(Count) elif Data["realtime_protection"] == False and Data[ "startup_protection"] == False: