Python Forum
Need Help with an Antivirus script in py3
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Help with an Antivirus script in py3
#3
my question here:This is a basic av script in py3
>my os is windows 7 -32
>my python ver is 3.6
>i uses the standard python shell
>when i tried to run the script,it worked but when i typed the filename to scan it showed this error
>i typed in "C:\windows
Error:
SyntaxError: unexpected character after line continuation character
def scan(pathname, signatures, depth):
    for item in os.listdir(pathname) and depth > 0:
        n = os.path.join(pathname, item)
        try:
            scan(n, signatures, depth-1)
        except:
            f = open(n, 'r')
            s = f.read()
            for virus in signatures:
                if s.find(signatures[virus]) > 0:
                    print('{}, found virus {}'.format(n,virus))
            f.close()
>Hope you guys will help me
Reply


Messages In This Thread
help,Av Script not running(Renewed by the opinion from some user) - by RandoomDude - Apr-26-2017, 03:02 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020