Add more data for stretchoid
This commit is contained in:
@ -78,10 +78,18 @@ dig -4 +noauthority +noadditional +nostats -x 107.170.202.77 @1.0.0.1
|
||||
|
||||
cat stretchoid_ranges.txt | xargs -n1 prips > stretchoid_digitalocean_possible_ips.txt
|
||||
# With failure handling
|
||||
cat stretchoid_digitalocean_possible_ips.txt | xargs -P 50 -I {} bash -c 'set -eu;rev="$(dig @1.1.1.1 +short +time=1 +tries=1 -x {})"; if [[ "$rev" == *";;"* ]]; then sleep 1; rev="$(dig @8.8.8.8 +short +time=1 +tries=1 -x {})"; fi; echo "{} # $rev";' > stretchoid_revisions/v3.txt
|
||||
cat stretchoid_digitalocean_possible_ips.txt | xargs -P 50 -I {} bash -c 'set -eu;rev="$(dig @9.9.9.9 +short +time=1 +tries=1 -x {})"; if [[ "$rev" == *";;"* ]]; then sleep 1; rev="$(dig @8.8.8.8 +short +time=1 +tries=1 -x {})"; fi; echo "{} # $rev";' 1> stretchoid_revisions/v5.txt
|
||||
|
||||
grep -F "stretchoid" stretchoid_revisions/v2.txt | sort > stretchoid_revisions/v2.sorted.txt
|
||||
mv stretchoid_revisions/v2.sorted.txt stretchoid_revisions/v2.txt
|
||||
grep -F "stretchoid" stretchoid_revisions/v5.txt | sort > stretchoid_revisions/v5.sorted.txt
|
||||
mv stretchoid_revisions/v5.sorted.txt stretchoid_revisions/v5.txt
|
||||
|
||||
# Build the diff
|
||||
diff --unified=1 stretchoid_revisions/v1.txt stretchoid_revisions/v2.txt > stretchoid_revisions/v1to2.diff
|
||||
diff --unified=1 stretchoid_revisions/v2.txt stretchoid_revisions/v4.txt > stretchoid_revisions/v1to2.diff
|
||||
|
||||
# Reverse the file
|
||||
awk -F'#' '{print $2" # "$1}' OFS=, "stretchoid_revisions/v5.txt" | awk '{$1=$1;print}' | sort > stretchoid_revisions/v5-reversed.txt
|
||||
|
||||
# Build the count per name per ip
|
||||
cat stretchoid_revisions/v*-reversed.txt | sort | uniq -c > stretchoid_revisions/count-reversed.txt
|
||||
# Same but sorted not by name but by count
|
||||
cat stretchoid_revisions/v*-reversed.txt | sort | uniq -c | sort > stretchoid_revisions/count-reversed.txt
|
||||
|
Reference in New Issue
Block a user