remove things

This commit is contained in:
sirjonasxx 2018-04-04 16:51:20 +02:00
parent 2240a2a633
commit 46aee07bc1
3 changed files with 29 additions and 49 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.idea/
out/
G-Earth2.iml

View File

@ -151,32 +151,6 @@ public class FlashClient {
return result; return result;
} }
@SuppressWarnings("Duplicates")
public void pauseProcess() {
String[] args = new String[] {"kill", "-STOP", PID+""};
Process proc;
try {
proc = new ProcessBuilder(args).start();
proc.waitFor();
proc.destroy();
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
@SuppressWarnings("Duplicates")
public void resumeProcess() {
String[] args = new String[] {"kill", "-CONT", PID+""};
Process proc;
try {
proc = new ProcessBuilder(args).start();
proc.waitFor();
proc.destroy();
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
public static void main(String[] args) throws InterruptedException { public static void main(String[] args) throws InterruptedException {
FlashClient client = FlashClient.create(); FlashClient client = FlashClient.create();
client.refreshMemoryMaps(); client.refreshMemoryMaps();

View File

@ -56,10 +56,8 @@ public class Rc4Obtainer {
// STEP ONE: filtering to obtain one area containing the rc4 data field // STEP ONE: filtering to obtain one area containing the rc4 data field
int foundbuffersize = 0; int foundbuffersize = 0;
while (foundbuffersize == 0) { while (foundbuffersize == 0) {
client.pauseProcess();
diff = client.createMemorySnippetList(); diff = client.createMemorySnippetList();
client.fetchMemory(diff); client.fetchMemory(diff);
client.resumeProcess();
this.addedBytes = 0; this.addedBytes = 0;
Random rand = new Random(); Random rand = new Random();
@ -123,17 +121,20 @@ public class Rc4Obtainer {
outgoingHandler.fakePongAlert(); outgoingHandler.fakePongAlert();
sleep(70); sleep(70);
byte[] data1 = new byte[256];
for (int i = 0; i < 256; i++) data1[i] = snippet1.getData()[i*4 + result_start_index];
byte[] lastPongPacket = new byte[6]; byte[] lastPongPacket = new byte[6];
List<Byte> encodedbytelistraw = outgoingHandler.getEncryptedBuffer(); List<Byte> encodedbytelistraw = outgoingHandler.getEncryptedBuffer();
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
lastPongPacket[i] = encodedbytelistraw.get(encodedbytelistraw.size() - 6 + i); lastPongPacket[i] = encodedbytelistraw.get(encodedbytelistraw.size() - 6 + i);
} }
int counter = 0;
RC4 result = null; RC4 result = null;
while (result == null && counter < 4) {
byte[] data1 = new byte[256];
for (int i = 0; i < 256; i++) data1[i] = snippet1.getData()[i*4 + result_start_index];
//dont panic this runs extremely fast xo //dont panic this runs extremely fast xo
outerloop: outerloop:
for (int x = 0; x < 256; x++) { for (int x = 0; x < 256; x++) {
@ -151,6 +152,13 @@ public class Rc4Obtainer {
} }
} }
} }
if (result == null) {
result_start_index -= 4;
}
counter++;
}
//if result = null ud better reload
@ -180,15 +188,10 @@ public class Rc4Obtainer {
} }
private List<MemorySnippet> searchForPossibleRC4Tables(List<MemorySnippet> snippets) { private List<MemorySnippet> searchForPossibleRC4Tables(List<MemorySnippet> snippets) {
List<MemorySnippet> result; List<MemorySnippet> result;
client.pauseProcess();
result = client.differentiate2(snippets, ((addedBytes * 2) / 3), addedBytes * 2, 1028); result = client.differentiate2(snippets, ((addedBytes * 2) / 3), addedBytes * 2, 1028);
addedBytes = 0; addedBytes = 0;
client.resumeProcess();
return result; return result;
} }