Skip to content

Commit 0eceb07

Browse files
authored
Ensure at least one src-url/bin-url/exploit-db is present for each exploit (#75)
Fix #74
1 parent 65589f8 commit 0eceb07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

linux-exploit-suggester.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2489,9 +2489,10 @@ for EXP_TEMP in "${SORTED_EXPLOITS[@]}"; do
24892489
# exploit name without CVE number and without commonly used special chars
24902490
name=$(echo "$NAME" | cut -d' ' -f 2- | tr -d ' ()/')
24912491

2492+
bin_url=$(echo "$EXP" | grep "bin-url: " | awk '{print $2}')
24922493
src_url=$(echo "$EXP" | grep "src-url: " | awk '{print $2}')
24932494
[ -z "$src_url" ] && [ -n "$EXPLOIT_DB" ] && src_url="https://www.exploit-db.com/download/$EXPLOIT_DB"
2494-
[ -z "$src_url" ] && exitWithErrMsg "Both 'src-url' and 'exploit-db' entries are empty for '$NAME' exploit - fix that. Aborting."
2495+
[ -z "$src_url" ] && [ -z "$bin_url" ] && exitWithErrMsg "'src-url' / 'bin-url' / 'exploit-db' entries are all empty for '$NAME' exploit - fix that. Aborting."
24952496

24962497
if [ -n "$analysis_url" ]; then
24972498
details="$analysis_url"

0 commit comments

Comments
 (0)