mirror of
https://github.com/danielmiessler/SecLists
synced 2026-03-31 10:34:37 +02:00
feat(cicd): Added error handling to the etc-files wordlist pipeline
This commit is contained in:
parent
fdd59a8ee1
commit
435888e884
1 changed files with 8 additions and 2 deletions
|
|
@ -1,10 +1,16 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# get new package URLs
|
||||
# load the list of amd64 packages from ubuntu
|
||||
export dist="$(cat current_distro)"
|
||||
export repo="http://archive.ubuntu.com/ubuntu"
|
||||
export url="$repo/dists/$dist/main/binary-amd64/Packages.gz"
|
||||
|
||||
# print URLs
|
||||
curl $repo/dists/$dist/main/binary-amd64/Packages.gz | \
|
||||
gzip -d | awk '/^Filename: / { print ENVIRON["repo"] "/" $2 }'
|
||||
if ! data="$(curl -fsSL "$url")"; then
|
||||
echo "[ERROR] The download of package lists from Ubuntu failed. The URL was: \"$url\". Either the server is down, or it's time to update the distro name in this file: \"SecLists/.bin/etc-files-list-update/current_distro\"" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s' "$data" | gzip -d | awk -v repo="$repo" '/^Filename: / { print repo "/" $2 }'
|
||||
Loading…
Reference in a new issue