Познакомьтесь с пентестом веб-приложений на практике в нашем новом бесплатном курсе
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
from pathlib import Path
from itertools import islice
from colorama import Fore, Style
space = ' '
apeak = '│ '
sprig = ['├──']
later = ['└──']
files = 0
directories = 0
def tree(current_folder: Path, only_dir: bool = False, prefix: str = ''):
global files, directories
if only_dir:
scope = [x for x in current_folder.iterdir() if x.is_dir()]
else:
scope = list(current_folder.iterdir())
scope.sort()
building = list(zip(sprig * (len(scope) - 1) + later, scope))
for pointer, path in building:
if path.is_dir():
yield prefix +...