Ejemplo n.º 1
0
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")
Ejemplo n.º 2
0
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:
            LOG.CORELET_ERROR_LOG("Startup Protection is disabled.")
            LOG.CORELET_ERROR_LOG("Realtime Protection is disabled.\n")

        elif Data["realtime_protection"] == False:
            LOG.CORELET_ERROR_LOG("Realtime Protection is disabled.\n")
        elif Data["startup_protection"] == False:
            LOG.CORELET_ERROR_LOG("Startup Protection is disabled.\n")
        elif Data["startup_protection"] == True:
            LOG.CORELET_LOG("Startup Protection is enabled.\n")
            RealTime_Protection(Count)

        elif Data["realtime_protection"] == True:
            LOG.CORELET_LOG("Realtime Protection is enabled.\n")
            RealTime_Protection(Count)

# Virus names