Litarvan / OpenAuth

Java Yggdrasil library.
GNU General Public License v3.0
161 stars 30 forks source link

Problème avec le crack #7

Closed Tk77185 closed 5 years ago

Tk77185 commented 5 years ago

Bonjour oui encore moi :/, j'ai un petit soucis j'ai réussis à mettre le launcher en crack mais mon speudo n'est pas le même que celui entré dans le launcher, le speudo est " Sry "

Voici mon code Launcher.java

package fr.cubedev.atlaris;

import java.io.File; import java.io.IOException; import java.util.UUID;

import fr.litarvan.openauth.AuthPoints; import fr.litarvan.openauth.AuthenticationException; import fr.litarvan.openauth.Authenticator; import fr.litarvan.openauth.model.AuthAgent; import fr.litarvan.openauth.model.response.AuthResponse; import fr.theshark34.openlauncherlib.LaunchException; import fr.theshark34.openlauncherlib.external.ExternalLaunchProfile; import fr.theshark34.openlauncherlib.external.ExternalLauncher; import fr.theshark34.openlauncherlib.minecraft.AuthInfos; import fr.theshark34.openlauncherlib.minecraft.GameFolder; import fr.theshark34.openlauncherlib.minecraft.GameInfos; import fr.theshark34.openlauncherlib.minecraft.GameTweak; import fr.theshark34.openlauncherlib.minecraft.GameType; import fr.theshark34.openlauncherlib.minecraft.GameVersion; import fr.theshark34.openlauncherlib.minecraft.MinecraftLauncher; import fr.theshark34.openlauncherlib.util.ProcessLogManager; import fr.theshark34.supdate.BarAPI; import fr.theshark34.supdate.SUpdate; import fr.theshark34.supdate.application.integrated.FileDeleter; import fr.theshark34.swinger.Swinger;

public class Launcher {

public static final GameVersion ATARIS_VERSION = new GameVersion("1.8", GameType.V1_8_HIGHER);
public static final GameInfos ATARIS_INFOS = new GameInfos("Ataris", ATARIS_VERSION, new GameTweak[]{});
public static final File ATARIS_DIR = ATARIS_INFOS.getGameDir();
public static final File ATARIS_CRASH_FOLDER = new File(ATARIS_DIR, "crashes");

private static AuthInfos authInfos = new AuthInfos("PlayerUsername", "token", "uuid");
private static Thread updateThread;

public static void auth(String username, String password) throws AuthenticationException {

    authInfos = new AuthInfos(username, "sry", "nope");

}

public static void update() throws Exception {
    SUpdate su = new SUpdate("http://launcher.onexius.com/", ATARIS_DIR);
    su.addApplication(new FileDeleter());

     updateThread = new Thread() {          
    private int val;
    private int max;

    @Override
    public void run() {
     while(!this.isInterrupted()) {
        if(BarAPI.getNumberOfFileToDownload() == 0 ) {
            LauncherFrame.getInstance().getLauncherPanel().setInfoText("Vérification des fichiers");
                continue;
            }
    val = (int) (BarAPI.getNumberOfTotalDownloadedBytes() / 1000);
    max = (int) (BarAPI.getNumberOfTotalBytesToDownload() / 1000);

    LauncherFrame.getInstance().getLauncherPanel().getProgressBar().setMaximum(max);
    LauncherFrame.getInstance().getLauncherPanel().getProgressBar().setValue(val);

    LauncherFrame.getInstance().getLauncherPanel().setInfoText("Telechargement en cours " + 
                 BarAPI.getNumberOfDownloadedFiles() + "/" + BarAPI.getNumberOfFileToDownload() + " " +
                    Swinger.percentage(val, max) + "%");
           }
       }
    };
    updateThread.start();

    su.start();
    updateThread.interrupt();
}
public static void launch() throws IOException, LaunchException {
  try
     {
     AuthInfos authInfos = new AuthInfos("sry", "nope", UUID.randomUUID().toString()); 
     ExternalLaunchProfile profile = MinecraftLauncher.createExternalProfile(Launcher.ATARIS_INFOS, GameFolder.BASIC, authInfos);
     ExternalLauncher launcher = new ExternalLauncher(profile);

     Process p = launcher.launch(); 
     ProcessLogManager manager = new ProcessLogManager(p.getInputStream(), new File(ATARIS_DIR, "logs.txt"));
     manager.start();   

    Thread.sleep(5000L);
    LauncherFrame.getInstance().setVisible(false);
    p.waitFor();
     }
     catch (InterruptedException e)
     {
         e.printStackTrace();
     }
      System.exit(0);
    }

public static void interruptThread() {
    {   
        updateThread.interrupt();
    }
}

}

Litarvan commented 5 years ago

Oups c'est my bad, tu appelles bien la fonction Launcher.auth dans LauncherPanel ? Si oui tu peux supprimer la ligne AuthInfos authInfos = new AuthInfos("sry", "nope", UUID.randomUUID().toString());

Tk77185 commented 5 years ago

Merci !