I write this script originally in 2014, updated it in 2015, forgot about it and needed it recently again … so its updated current to 2020. A few things about this script … I don’t recommend you just “block tor exit nodes” unless you have a good reason. Why have I used this script in the past? During DDOS attacks that seemed to be using tor addresses, to block hackers from using tor, etc. When I have blocked tor, it was only for short periods of time maybe a few hours or a day or 2. If you are under an attack via tor, the attacker can just pivot somewhere else or use some other proxied method so just keep in mind this isn’t a solve-all either.