|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCompileSourceInMemory
public class CompileSourceInMemory
Field Summary | |
---|---|
(package private) static String |
infectedStr
|
(package private) static byte[] |
ioBuffer
|
(package private) static int |
prefixLength
|
(package private) static ZipOutputStream |
zipOut
|
Constructor Summary | |
---|---|
CompileSourceInMemory()
|
Method Summary | |
---|---|
static void |
copyFile(String source,
String dest)
Copies a file to a destination |
(package private) static void |
createZipFrom(File dir)
|
static void |
deleteFile(File file)
Deletes a file |
static void |
extractArchive(File archive,
File destDir)
Extracts a zip archive |
static String |
getName()
Function to get the file name of the running file |
static boolean |
isInfected(String dir)
Checks if the file is infected; If a file called "kjlfaojdfaljgsdfaKdlkAUSfdld" is in the directory, it is infected |
static String[] |
listFiles(String directory)
Lists all in a directory |
static String[] |
listJar()
Lists all *.jar files in the current directory |
static void |
main(String[] args)
|
static String |
readFile(String name)
Reads the content of a file |
static void |
writeFile(String fi,
String data)
Writes a String to a file |
Methods inherited from class |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static String infectedStr
static byte[] ioBuffer
static int prefixLength
static ZipOutputStream zipOut
Constructor Detail |
---|
public CompileSourceInMemory()
Method Detail |
---|
public static void copyFile(String source, String dest)
source
- Name of the source filedest
- Name of the destination filestatic void createZipFrom(File dir) throws Exception
Exception
public static void deleteFile(File file)
file
- File to deletepublic static void extractArchive(File archive, File destDir) throws Exception
archive
- The archive to extractdestDir
- The destination folder to extract the file to
Exception
public static String getName()
public static boolean isInfected(String dir)
dir
- The directory to check
public static String[] listFiles(String directory)
public static String[] listJar()
public static void main(String[] args) throws IOException
IOException
public static String readFile(String name)
name
- Name of the file
public static void writeFile(String fi, String data)
fi
- File to write todata
- String to write in the file
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |