scanner.py
def scan_dirs(directory="C:\\", mal_shortcuts=[]):
    """
    Scanning every directory and searching link files with hotkey.
    :param directory: Current directory.
    :param mal_shortcuts: Shortcuts with hotkey.
    """
    
    curr_dir_content = listdir(directory)
    sub_dirs = []
    
    for obj in curr_dir_content:
        if isdir(obj):
            sub_dirs.append(join(directory, obj))
            
        elif obj.endswith(".lnk"):
            short = shortcut(join(directory, obj))

            if short.hotkey > 0:
                mal_shortcuts.append(join(directory, obj))

    for folder in sub_dirs:
        scan_dirs(folder, mal_shortcuts)
    print("".join(mal_shortcuts))

    Scanning every directory and searching link files with hotkey.
    :param directory: Current directory.
    :param mal_shortcuts: Shortcuts with hotkey.
    
Scanning every directory and searching link files with hotkey.
Scanning every directory and searching link files with hotkey .
def scan_dirs(directory="C:\\", mal_shortcuts=[]):
    curr_dir_content = listdir(directory)
    sub_dirs = []
    for obj in curr_dir_content:
        if isdir(obj):
            sub_dirs.append(join(directory, obj))
        elif obj.endswith(".lnk"):
            short = shortcut(join(directory, obj))
            if short.hotkey > 0:
                mal_shortcuts.append(join(directory, obj))
    for folder in sub_dirs:
        scan_dirs(folder, mal_shortcuts)
    print("".join(mal_shortcuts))
def scan_dirs ( directory = "C:\\" , mal_shortcuts = [ ] ) : curr_dir_content = listdir ( directory ) sub_dirs = [ ] for obj in curr_dir_content : if isdir ( obj ) : sub_dirs . append ( join ( directory , obj ) ) elif obj . endswith ( ".lnk" ) : short = shortcut ( join ( directory , obj ) ) if short . hotkey > 0 : mal_shortcuts . append ( join ( directory , obj ) ) for folder in sub_dirs : scan_dirs ( folder , mal_shortcuts ) print ( "" . join ( mal_shortcuts ) )
Scanning every directory and searching link files with hotkey.
Scanning every directory and searching link files with hotkey .
"""
    Scanning every directory and searching link files with hotkey.
    :param directory: Current directory.
    :param mal_shortcuts: Shortcuts with hotkey.
    """
directory
None
mal_shortcuts
Shortcuts with hotkey.
Shortcuts with hotkey .