fffffffArd

This commit is contained in:
ayunami2000 2022-01-21 19:33:13 -05:00
parent b52a72e5a4
commit 56aeb213a6
5 changed files with 12382 additions and 12401 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,6 @@ package net.lax1dude.eaglercraft;
import java.io.*;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.LinkedList;
import net.minecraft.client.Minecraft;
@ -173,7 +172,6 @@ public class WebsocketNetworkManager implements INetworkManager {
}else {
DataInputStream packetStream = new DataInputStream(new ByteBufferDirectInputStream(stream));
while (stream.hasRemaining()) {
if(logpackets)System.out.println("FARD");
stream.mark();
try {
Packet pkt = Packet.readPacket(packetStream, false);
@ -186,8 +184,9 @@ public class WebsocketNetworkManager implements INetworkManager {
if(logpackets)System.out.println("RECEIVING: " + pkt);
pkt.processPacket(this.netHandler);
if(change){
processReadPackets();
return;
//processReadPackets();
//return;
break;
}
}
} catch (EOFException e) {

View File

@ -1,5 +1,7 @@
package net.minecraft.src;
import net.minecraft.client.Minecraft;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
@ -34,6 +36,7 @@ public class Packet250CustomPayload extends Packet {
* Abstract. Reads the raw packet data from the data stream.
*/
public void readPacketData(DataInputStream par1DataInputStream) throws IOException {
if(!Minecraft.getMinecraft().gameSettings.useDefaultProtocol) {
this.channel = readString(par1DataInputStream, 20);
this.length = par1DataInputStream.readShort();
@ -42,6 +45,7 @@ public class Packet250CustomPayload extends Packet {
par1DataInputStream.readFully(this.data);
}
}
}
/**
* Abstract. Writes the raw packet data to the data stream.

View File

@ -83,24 +83,4 @@ public class RSA {
s += "modulus = " + modulus;
return s;
}
public static void main(String[] args) {
int N = Integer.parseInt(args[0]);
RSA key = new RSA(N);
System.out.println(key);
// create random message, encrypt and decrypt
BigInteger message = new BigInteger(N-1, random);
//// create message by converting string to integer
// String s = "test";
// byte[] bytes = s.getBytes();
// BigInteger message = new BigInteger(bytes);
BigInteger encrypt = key.encrypt(message);
BigInteger decrypt = key.decrypt(encrypt);
System.out.println("message = " + message);
System.out.println("encrypted = " + encrypt);
System.out.println("decrypted = " + decrypt);
}
}