Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Mar 28, 2024
1 parent bebf513 commit 56044ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dead.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ function main {

function check_for_alive {
sed 's/^/||/; s/$/^/' "$dead_domains_file" > formatted_dead_domains_file.tmp # Format dead domains file
dead-domains-linter -i formatted_dead_domains_file.tmp --export dead.tmp # Find dead domains in the dead domains file
alive_domains=$(comm -23 <(sort "$dead_domains_file") <(sort dead.tmp)) # Find resurrected domains in dead domains file (note dead domains file is unsorted)
[[ -z "$alive_domains" ]] && return # Return if no resurrected domains found
# Update dead domains file to exclude resurrected domain
grep -xFf dead.tmp "$dead_domains_file" > dead_domains_file.tmp && mv dead_domains_file.tmp "$dead_domains_file"
cp dead.tmp "$dead_domains_file" # Update dead domains file to exclude resurrected domains
printf "%s\n" "$alive_domains" >> "$raw_file" # Add resurrected domains to raw file
format_list "$dead_domains_file" && format_list "$raw_file"
log_event "$alive_domains" "resurrected" "dead_domains_file"
Expand Down

0 comments on commit 56044ef

Please sign in to comment.