find-linked-players.sh 899 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. echo "Preparing to discover all names linked to target player!"
  3. echo "Warning: this finds all names which logged in using the same IP(s) as the target name."
  4. echo "This does not prove that the names are the same person, or even remotely related!"
  5. echo "Use good judgement when deciding what to do with this information."
  6. target=${1}
  7. debug="/home/minetest/logs/debug.txt"
  8. list="$(cat $debug | grep "joins game" | grep $target | grep -P "\[\d+\.\d+\.\d+\.\d+\]" -oh | uniq)"
  9. total="$(for item in $list; do grep -F "$item" $debug | grep -P "\w+\s+\[\d+\.\d+\.\d+\.\d+\]\s+joins game\." -o; done)"
  10. lines="$(echo "$total" | grep -P "^\w+" -o)"
  11. sorted="$(echo "$lines" | sort)"
  12. echo "================================================================================"
  13. echo "$sorted" | uniq
  14. echo "================================================================================"
  15. echo "Done!"