Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Apr 1, 2024
1 parent b355252 commit 23e861a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions functions/check_dead.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ main() {
format_file "$DEAD_DOMAINS"
}

# Function 'check_subdomains' removes dead domains from the subdomains file
# and raw file.
check_subdomains() {
find_dead "$SUBDOMAINS" || return

Expand All @@ -59,6 +61,8 @@ check_subdomains() {
log_event "$dead_root_domains" dead raw
}

# Function 'check_redundant' removes dead domains from the redundant domains
# file and raw file.
check_redundant() {
find_dead "$REDUNDANT_DOMAINS" || return

Expand Down Expand Up @@ -88,6 +92,7 @@ check_redundant() {
log_event "$(<dead_wildcards.tmp)" dead wildcard
}

# Function 'check_dead' removes dead domains from the raw file.
check_dead() {
# Exclude wildcards and root domains of subdomains
comm -23 "$RAW" <(sort "$ROOT_DOMAINS" "$WILDCARDS") > raw.tmp
Expand All @@ -103,6 +108,8 @@ check_dead() {
log_event "$(<dead_in_raw.tmp)" dead raw
}

# Function 'check_alive' finds resurrected domains from the dead domains file
# and adds them back into the raw file.
check_alive() {
find_dead "$DEAD_DOMAINS" || return

Expand Down

0 comments on commit 23e861a

Please sign in to comment.