Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: proper local file naming for sudo_killer.zip #330

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions secator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,16 +472,17 @@ def download_files(data: dict, target_folder: Path, offline_mode: bool, type: st
local_path = Path(url_or_path)
target_path = target_folder / local_path.name
if not target_path.exists():
console.print(f'[bold turquoise4]Symlinking {type} [bold magenta]{local_path.name}[/] ...[/] ', end='')
console.print(f'[bold turquoise4]Symlinking {type} [bold magenta]{name}[/] ...[/] ', end='')
try:
target_path.symlink_to(local_path)
console.print('[bold green]ok.[/]')
except Exception as e:
console.print(f'[bold red]failed ({str(e)}).[/]')
data[name] = target_path.resolve()
else:
# Download files from URL
filename = url_or_path.split('/')[-1]
# Download file from URL
ext = url_or_path.split('.')[-1]
filename = f'{name}.{ext}'
target_path = target_folder / filename
if not target_path.exists():
try:
Expand Down Expand Up @@ -522,14 +523,12 @@ def download_files(data: dict, target_folder: Path, offline_mode: bool, type: st
dir.mkdir(parents=False)
console.print('[bold green]ok.[/]')


# Download wordlists and set defaults
download_files(CONFIG.wordlists.templates, CONFIG.dirs.wordlists, CONFIG.offline_mode, 'wordlist')
for category, name in CONFIG.wordlists.defaults.items():
if name in CONFIG.wordlists.templates.keys():
CONFIG.wordlists.defaults[category] = str(CONFIG.wordlists.templates[name])


# Download payloads
download_files(CONFIG.payloads.templates, CONFIG.dirs.payloads, CONFIG.offline_mode, 'payload')

Expand Down
Loading