Skip to content

Commit

Permalink
retrieve: add error handling for if a source is unnaturally large
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Feb 2, 2025
1 parent 1e8df4f commit c9acf76
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/retrieve_domains.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ process_source_results() {
# Count number of unfiltered domains
raw_count="$(wc -l < "$source_results")"

# Error in case a source wrongly retrieves too many results.
if (( raw_count > 10000 )) then
error 'Source is unusually large.'
fi

# Remove known dead domains (dead domains file is not sorted and includes
# subdomains)
dead_count="$(filter \
Expand Down

0 comments on commit c9acf76

Please sign in to comment.