| 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. | #!/usr/bin/python #Searches phpBB's memberlist.php and extracts users. #d3hydr8[at]gmail[dot]com import urllib, sys, re, time if len(sys.argv) != 2: print "\nUsage: ./phpBBmembers.py <url>" print "Ex: ./phpbbmembers.py http://www.site.com/phpbb/memberlist.php\n" sys.exit(1) url = sys.argv[1] if url[:7] != "http://": url = "http://"+url print "\nSearching:",url site = urllib.urlopen(url).read() users = re.findall("u=\d*&sid=\w+\" >\w+</a>", site) if len(users) >= 1: print "\nAttempt failed: Trying another\n" else: users = re.findall("\">\w+</a>", site) print "Found:",len(users),"\n" time.sleep(3) for user in users: u = user.split('>') mem = u[1].replace("</a", "") #Lets take care of some garbage. if mem.isdigit() == False and mem != "Next" and mem != "phpBB": print mem |