Virus description
Add a certain character to the end of the file with JS in the local HTML file to achieve the memory footprint effect
http://anquan.baidu.com/bbs/forum.php?mod=viewthread&tid=395007&page=1#pid2178566
And then what
Files that deal with the virus infection
Java re-writes new files to txt
import java.io.BufferedReader;import java.io.File;import java.io.FileReader;import Java.io.ioexception;import java.io.printwriter;public class wz { public static void main (String[] args) { String s1 = "c:\\users\\administrator\\ Desktop\\zm\\c++ Courseware--v2 "; string s2 = " C:\\USERS\\ADMINISTRATOR\\DESKTOP\\ZM\\NEWC ";// copyfile (); File file = new file (S1); File file2 = new file (S2);if (!file2.exists ()) {file2.mkdir (); if (File.isdirectory ()) {file[] files = file.listfiles ();for (File f : files) {copyfile (s1 + "\ \" + f.getname (), s2 + "\ \" + F.getname () + ". txt");}}} Private static void copyfile (string name1, string name2) {BufferedReader br = null; Printwriter pw = null;try {br = new bufferedreader (New filereader (name1));p W = new printwriter ( NAME2); string s = null;while ((S = br.readline ()) != null) {int a = s.indexof ("</HTML>");if (a != -1) {String sub = S.substring (0, a + 7);p w.write (sub); Pw.write (s);p w.write ("\ r \ n");} catch (exception e) {e.printstacktrace ();} finally {if (Br != null) {try {br.close ();} catch (ioexception e) {e.printstacktrace ();}} if (Pw != null) {pw.close ();}}}
Incredibly file size does not change size HTML clears the wcripst. EXE virus (VBS interferes with Microsoft files)
Then use C language
Finding the same is not possible.
Finally find a function to change the size of the file can be done
#include <io.h> #include <fcntl.h>//#include <syspes.h> #include <sys/stat.h> #include < stdio.h> #include <iostream> #include <fstream>using namespace std;void fun (char *name,int n ) {int fh, result;unsigned int nbytes = bufsiz; if ( (Fh = open (name,std::ios::in))) {cout<< "File length before:" << Filelength ( fh ) <<endl;if ( ( result = chsize ( fh, n) ) == 0 ) cout<< "size successfully changed" <<endl;elsecout<< "problem in changing the size "<<endl;cout<<" File length after: "<< Filelength ( fh ) <<endl;close ( fh );}} int main () {char name[128] = "c:\\users\\administrator\\desktop\\zm\\newc\\1. TXT "; File* fr = fopen (name, "RB"); int size = 0;int fLag = 0;char a= ' C '; Int ct=1;int n=50;while (n--) {fgets (FR);} while ((A = fgetc (FR))!= eof) {if (a == ' < ') {flag = 1;continue;} if (a == '/' && flag == 1) {continue;} if (flag == 1 && (a== ' H ' | | a== ' h ')) {fgetc (FR); Fgetc (FR); Fgetc (FR); Fgetc (FR); Size = ftell (FR); Break; }flag = 0;} Fclose (FR); fun (name,size); return 0;}
But still not,,,,
Note that it is not possible to end the/html judgment in a normal page because the txt/html field may
Specify the file size unified to 80KB can save a bit of space behind an Annex A txt
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/81/FA/wKiom1dGkOHwgBhRAAUbZSIByfc105.png "title=" Javabug.png "alt=" Wkiom1dgkohwgbhraaubzsibyfc105.png "/>
Virus-processed Code HTML virus