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 bf2d5f9 commit 4be3fca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dead.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ function check_for_alive {
dead-domains-linter -i x00 --export x00.tmp & dead-domains-linter -i x01 --export x01.tmp &
dead-domains-linter -i x02 --export x02.tmp & dead-domains-linter -i x03 --export x03.tmp &
dead-domains-linter -i x04 --export x04.tmp & dead-domains-linter -i x05 --export x05.tmp
cat x*.tmp >> dead.tmp # note dead domains file is unsorted
cat x*.tmp >> dead.tmp

alive_domains=$(comm -23 <(sort "$dead_domains_file") <(sort dead.tmp)) # Find resurrected domains in the dead domains file
[[ -z "$alive_domains" ]] && return # Return if no resurrected domains found
cp dead.tmp "$dead_domains_file" # Update dead domains file to exclude resurrected domains
# Update dead domains file to exclude resurrected domain
grep -Ff dead.tmp "$dead_domains_file" > dead_domains_file.tmp && mv dead_domains_file.tmp "$dead_domains_file"
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 4be3fca

Please sign in to comment.