Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions tavern/tomes/download/main.eldritch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
def download_file(remote_src, local_dst, insecure):
if file.is_dir(file.parent_dir(local_dst)):
if file.is_file(local_dst):
file.remove(local_dst)
http.download(remote_src, local_dst, insecure)
else:
eprint("Specified path has no parent directory")

def main():
insecure = cast_bool()
if insecure == -1:
return

download_file(
input_params['url'],
input_params['dst'],
input_params['insecure'].lower() == "true"
)
18 changes: 18 additions & 0 deletions tavern/tomes/download/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Download
description: Download a file
author: hulto
support_model: FIRST_PARTY
tactic: EXECUTION
paramdefs:
- name: url
type: string
label: Remote file's URL
placeholder: "https://example.com/executable_file"
- name: dst
type: string
label: Agent side file path (not directory)
placeholder: /tmp/my_file - C:\ProgramData\MyFile.txt
- name: insecure
type: bool
label: Should TLS certificates be ignored
placeholder: "False"