daily pastebin goal
83%
SHARE
TWEET

AccountScanner Kappa

a guest Sep 22nd, 2016 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.DataInputStream;
  2. import java.io.File;
  3. import java.io.FileInputStream;
  4.  
  5. /**
  6.  *
  7.  * @author ProjektTrip
  8.  *
  9.  */
  10. public class AccountScanner {
  11.    
  12.     public static void main( String[] cmdLineArguments ) {
  13.         AccountScanner as = new AccountScanner("Oblivion_v1.2/settings.dat");
  14.         System.out.println(
  15.             "[ACCOUNT_DATA]" +
  16.             "\nUsername: " + as.getUsername() +
  17.             "\nPassword: " + as.getPassword()
  18.         );
  19.        
  20.     }
  21.    
  22.     /**
  23.      * Constructor
  24.      * ( YOU DONT SAY )
  25.      *
  26.      * @param fileUrl
  27.      */
  28.     public AccountScanner(String fileUrl) {
  29.         try {
  30.            
  31.             String file = home + fileUrl;
  32.             // Opens the so it can be read
  33.             DataInputStream input = new DataInputStream(new FileInputStream(new File(file)));
  34.            
  35.            
  36.             // Lets get the account details
  37.             this.username = input.readUTF();
  38.             this.password = input.readUTF();
  39.  
  40.             // Okay so lets close the input
  41.             input.close();
  42.            
  43.         // Suppress the exception since ur not gonna get it anyways
  44.         } catch(Exception e) {}
  45.     }
  46.    
  47.     public String getPassword() {
  48.         return password;
  49.     }
  50.    
  51.     public String getUsername() {
  52.         return username;
  53.     }
  54.    
  55.     private static final String home = System.getProperty("user.home") + "/";
  56.     private String username;
  57.     private String password;
  58. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top