Advertisement
Guest User

Perl question about what this actually does

a guest
Jul 27th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. <p> Hello Monks,
  2.  
  3. This is my first time here on your forums and I have absolutely no perl experience what-so-ever but I was hoping that someone could answer a question for me. I am working on creating a blacklist to block tor exit nodes to help thwart some of the attacks that I've been seeing take place on my website. I found a post with a perl script that will download the list of exit nodes and place them each on a new line. I'm always cautious about running a script on my machine that I have absolutely no idea what it does so I wanted someone to see if they could tell me if this is the case or not. </p>
  4.  
  5. <blockquote>
  6. found is a list of all the tornodes updated every half an hour. <a href="https://www.dan.me.uk/tornodes">This list</a> SHOULD include the exit,entries and bridge nodes used to connect and browse through tor
  7.  
  8. use this perl script to gather the ips from a downloaded webpage
  9.  
  10. <code> perl -lne 'print $& if /(\d+.){3}\d+/' downloadedwebpage.html > listofips.out </code>
  11.  
  12. it will give you a list of ips, one per line. i have tried to find something that will do this without Perl script but after many hours searching i could not find one. hope this helps
  13. </blockquote>
  14.  
  15. <p> I also found <a href="https://www.dan.me.uk/torlist/">this link</a> from the page referenced above that has the list of ips exactly how I want them to come through.
  16.  
  17. Does this seem like a reasonable solution to anyone? I would have to think there should be another way to do this but if this works they way the poster states then I might just use it. Anyone care to look at that code real quick and see if it would be safe and/or offer up a suggestion on a different solution to this. I'm trying to get the exit mode list downloaded every 30 minutes and have it update my systems banlist accordingly. I can handle the second part of this but I wanted some input as to getting the data onto my machine in the first place in a format that can be used for my banlist. </p>
  18.  
  19. Thank you in advance for your assistance, <br>
  20. <br>
  21. Bob
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement