Waraxe IT Security Portal
Login or Register
November 18, 2024
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 90
Members: 0
Total: 90
Full disclosure
SEC Consult SA-20241112-0 :: Multiple vulnerabilities in Siemens Energy Omnivise T3000 (CVE-2024-38876, CVE-2024-38877, CVE-2024-38878, CVE-2024-38879)
Security issue in the TX Text Control .NET Server for ASP.NET.
SEC Consult SA-20241107-0 :: Multiple Vulnerabilities in HASOMED Elefant and Elefant Software Updater
Unsafe eval() in TestRail CLI
4 vulnerabilities in ibmsecurity
32 vulnerabilities in IBM Security Verify Access
xlibre Xnest security advisory & bugfix releases
APPLE-SA-10-29-2024-1 Safari 18.1
SEC Consult SA-20241030-0 :: Query Filter Injection in Ping Identity PingIDM (formerly known as ForgeRock Identity Management) (CVE-2024-23600)
SEC Consult SA-20241023-0 :: Authenticated Remote Code Execution in Multiple Xerox printers (CVE-2024-6333)
APPLE-SA-10-28-2024-8 visionOS 2.1
APPLE-SA-10-28-2024-7 tvOS 18.1
APPLE-SA-10-28-2024-6 watchOS 11.1
APPLE-SA-10-28-2024-5 macOS Ventura 13.7.1
APPLE-SA-10-28-2024-4 macOS Sonoma 14.7.1
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> PhpBB -> Java-based PHPBB Username Grabber
Post new topicReply to topic View previous topic :: View next topic
Java-based PHPBB Username Grabber
PostPosted: Sat Nov 22, 2008 3:09 am Reply with quote
tehhunter
Valuable expert
Valuable expert
Joined: Nov 19, 2008
Posts: 261




Hey guys,

Much like that other guy (who posted his code in php), I also took advice from waraxe and went ahead creating the following code to allow you to easily accumulate words (aka usernames) from phpbb forums. It's simple and easy to add more forums to the list to grab from, but I also added a bunch of forums anyway.

To add more forums to the list, simply copy the code in the main method:
Code:
harvest.add("http://www.yourforumhere.net/memberlist.php");


If it would be easier for some, I can compile it and release it in a zip ready to run. Anyway, have fun with it, and I'll probably continue making more additions soon enough. If you want to make this run in your own Java IDE (I recommend NetBeans by Sun), just make a new project and a class therein called 'RoundUp.java'.

Oooh, and last thing, I also included a method I was working on for generating a new list from the ones you download with permutations, though at this point I would say its unfinished. Still, it gets the job done. Just uncomment one.permutate(); in the main method.

Have fun, and happy cracking!

Code:
/****************************
/ @author tehhunter @ waraxe.us
/***************************/
import java.io.*;
import java.net.*;
import java.util.*;

public class RoundUp
{
private int totalWords;
private String baseSite;
private String siteName;
private String proxyURL;
private ArrayList<String> words;
private int usersPerPage;
private int currentPage;
private int pagesTotal;

public RoundUp(String site)
{
baseSite = site;
words = new ArrayList<String>();
usersPerPage = 0;
currentPage = 1;
pagesTotal = 1;
proxyURL = "http://www.cantblock.me/browse.php?u=";

siteName = baseSite.replace("http://","");
siteName = siteName.replace("www.","");
siteName = siteName.replace(siteName.substring(siteName.indexOf("/"),siteName.length()),"");
System.out.println(siteName);
}

public static void main(String[] args)
{
ArrayList<String> harvest = new ArrayList<String>();
harvest.add("http://rozentul.com/phpBB2//memberlist.php");
harvest.add("http://www.dd-wrt.com/phpBB2/memberlist.php");
harvest.add("http://pleistorm.com/forum/memberlist.php");
harvest.add("http://www.southamptonhc.org/bbs/memberlist.php");
harvest.add("http://www.broenink-art.nl/Aeolus/memberlist.php");
harvest.add("http://www.lindhe.com/boards/memberlist.php");
harvest.add("http://www.radres.org/ECOMradres/timssnet/phpBB2/memberlist.php");
harvest.add("http://sjsbatch1983.7.forumer.com/memberlist.php");
harvest.add("http://www.forum.paris.icao.int/memberlist.php");
harvest.add("http://www.nelp-forum.org.uk/phpBB2/memberlist.php");
harvest.add("http://hkmdb.com/phpbb/memberlist.php");

RoundUp.clearList();
for (int i=0; i<harvest.size(); i++)
{
RoundUp one = new RoundUp(harvest.get(i));
one.collect();
//This method, if uncommented, with generate permutations of the words you create
//one.permutate();
}
}

public void collect()
{
int start=0;
while (currentPage <= pagesTotal)
{
if (currentPage == 1)
System.out.println("-->Retrieving page 1 of ?");
else
System.out.println("-->Retrieving page " + currentPage + " of " + pagesTotal + " (" + usersPerPage*currentPage + " names gathered from this forum)");
if (currentPage != 1)
{
start = currentPage*usersPerPage;
}
try
{
URL url = new URL(baseSite + "?mode=username&order=ASC&start=" + start);
URLConnection conn = url.openConnection();
conn.setReadTimeout(4000);
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line=in.readLine()) != null)
if (line.indexOf("profile.php?mode=viewprofile") >= 0)
{
words.add(removeHTML(line));
if (start == 0)
usersPerPage++;
}
else if (line.indexOf("<td><span class=\"nav\">Page <b>1</b> of <b>") >= 0)
{
pagesTotal = Integer.parseInt(removeHTML(line).replace("Page1of",""));
}
}
catch(SocketTimeoutException e)
{
System.out.println(">>>EXCPT: Socket timeout occurred, moving forward");
}
catch (Exception e)
{
System.out.println(e);
}
currentPage++;
try
{
FileWriter out = new FileWriter("words.dic",true);
for (int i=0; i<words.size(); i++)
if (words.get(i).length() <= 11)
out.write(words.get(i).toLowerCase() + "\n");
out.close();
}
catch(Exception e)
{
System.out.println(">>>EXCPT: " + e);
}
}


}

public String removeHTML(String s)
{
s = s.replaceAll(" ;;","");
s = s.replaceAll("&amp;","");
s = s.replaceAll(" ", "");
s = s.replaceAll(" ","");
while ((s.indexOf("<")>=0) && (s.indexOf(">",s.indexOf("<")+1) >= 0))
s = s.replace(s.substring(s.indexOf("<"),s.indexOf(">",s.indexOf("<"))+1),"");
return removeRandoms(removeBrackets(s));
}


public String removeBrackets(String s)
{
while ((s.indexOf("[")>=0) && (s.indexOf("]",s.indexOf("[")+1) >= 0))
s = s.replace(s.substring(s.indexOf("["),s.indexOf("]",s.indexOf("["))+1),"");
return s;
}

public String removeRandoms(String s)
{
for (int i=32; i<48; i++)
s = s.replace((char)i + "","");
return s;
}

public void dump()
{
for (int i=0; i<words.size(); i++)
System.out.println(words.get(i));
}

public void permutate()
{
File words = new File("words.dic");
File newWords = new File("newWords.dic");
if (words.exists())
{
ArrayList<String> permutations = new ArrayList<String>();
try
{
Scanner in = new Scanner(words);
FileWriter out = new FileWriter(newWords);

String word="";
while (in.hasNextLine())
{
word = in.nextLine();
permutations.add(word); //Keep the original
{ //One number added to the end
for (int i=0; i<9; i++)
permutations.add(word + i);
}
{ //Two numbers added to the end
for (int i=0; i<102; i++)
if (i<10)
permutations.add(word + "0" + i);
else
permutations.add(word + i);
}
/*{ //Three numbers added to the end
for (int i=0; i<1020; i++)
if (i<100)
{
if (i<10)
permutations.add(word + "00" + i);
else
permutations.add(word + "0" + i);
}
else
permutations.add(word + i);
}*/
{ //Duplicate word added to the end (e.g. adminadmin, admin.admin) and others...
permutations.add(word + word);
permutations.add(word + "." + word);
permutations.add("." + word);
permutations.add(":" + word);
permutations.add("/" + word);
permutations.add("\\" + word);
permutations.add(word + ".");
permutations.add(word + " ");
}
{ //Replace characters with common counterparts
permutations.add(word.replaceFirst("a", "@"));
permutations.add(word.replaceFirst("a","4"));
permutations.add(word.replaceFirst("l", "1"));
permutations.add(word.replaceFirst("e","3"));
permutations.add(word.replaceFirst("o", "0"));
}
{ //Write permutations to file
for (int j=0; j<permutations.size(); j++)
out.write(permutations.get(j) + "\n");
}
}
}
catch(Exception e)
{
System.out.println(">>>EXCPT: Permutation error, exiting:\n" + e);
System.exit(0);
}

}

}

public static void clearList()
{
try
{
File list = new File("words.dic");
if (list.exists())
{
FileWriter cleaner = new FileWriter(list);
cleaner.write("");
cleaner.close();
}
list = new File("newWords.dic");
if (list.exists())
{
FileWriter cleaner = new FileWriter(list);
cleaner.write("");
cleaner.close();
}
}
catch(Exception e)
{
System.out.println(e);
}
}
}
View user's profile Send private message
PostPosted: Sat Nov 22, 2008 1:25 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Nice job Smile
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sun Nov 23, 2008 8:17 am Reply with quote
tehhunter
Valuable expert
Valuable expert
Joined: Nov 19, 2008
Posts: 261




waraxe wrote:
Nice job Smile
Thanks waraxe. You wouldn't happen to have any other good ideas of where to harvest good wordlists from would you? I was considering the idea of a MySpace crawler that would just take the user's name from each page and then traveling to linked pages.
View user's profile Send private message
PostPosted: Wed Jul 13, 2011 12:11 pm Reply with quote
haka20
Beginner
Beginner
Joined: Jul 13, 2011
Posts: 1




Works perfect with boards where i dont have to be logged in.

Is it possible to edit the script so i can use it with a phpbb3 board where i have to be logged in to see the memberlist?

for Example:

www.landoflegends.de
View user's profile Send private message
Java-based PHPBB Username Grabber
www.waraxe.us Forum Index -> PhpBB
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 1

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.047 Seconds