国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > VBScript > 正文

可以修改腳本自身運行次數的vbs(Self modifying script)

2020-07-26 11:47:41
字體:
來源:轉載
供稿:網友
This script behaves like a virus
This script shows you how a script can be self modifying, like viruses.
It is a warning about the possibilities of macro viruses.

File Name : selfmodify.vbs
Requirement : none
Author : Jean-Luc Antoine
Submitted : 01/09/2001
Category : Other

復制代碼 代碼如下:

Const n = 1
Dim f, a, s, w
w = WScript.ScriptFullName
Set f = CreateObject("Scripting.FileSystemObject")
Set a = f.OpenTextFile(w, 1)
a.SkipLine
s = chr(13) & Chr(10) & a.ReadAll
a.Close

Set a = f.CreateTextFile(w, True)
a.Write "Const n = " & n + 1 & s
a.Close

WScript.echo "This script has been run " & n & " times"


原理就是每次運行腳本自身的代碼就會被修改Const n = 1,這個1是一直變化的。

原文:http://www.interclasse.com/scripts/selfmodify.php
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 苏州市| 昆明市| 邵武市| 马鞍山市| 怀远县| 新乡县| 孟州市| 忻城县| 军事| 出国| 左贡县| 东乡族自治县| 长丰县| 丹寨县| 安阳市| 海淀区| 遵义县| 泰宁县| 彝良县| 元氏县| 正镶白旗| 乌海市| 宁海县| 昔阳县| 新邵县| 田林县| 张家界市| 石家庄市| 萨嘎县| 高要市| 手机| 淮南市| 深圳市| 子长县| 南和县| 灵丘县| 礼泉县| 全椒县| 济阳县| 舒城县| 晋州市|