About Web page source code shield (3)

Source: Internet
Author: User
Tags add generator key return window microsoft frontpage
Web page | Source code The last thing we do is to encrypt every page, or the key page you think is important, OK. How to encrypt the source code of the Web page do I have to say more? There are all over the Internet, you can use tools, you can also write an HTM file to convert. Encryption software, I recommend "Batch HTML encryptor", go to Google to find it. There are also code to convert encrypted Web pages as follows:

〈html〉〈head〉〈title〉 Web page encryption and decryption 〈/title〉
〈meta http-equiv=content-type content= "text/html; charset=gb2312 "
〈meta content= "MSHTML 6.00.2600.0" Name=generator〉〈!--Dadi software Studio--〉〈link
href= "Style.css" rel=stylesheet〉
〈meta content= "Microsoft FrontPage 4.0" name=generator〉
〈/head〉
〈body bgcolor= #ffffff leftmargin=0 topmargin=0 onload=initstyleelements ()
〈div
Style= "LEFT:139PX; width:106px; Position:absolute; top:52px; Height:36px "
〈table cellspacing=0 cellpadding=0 width=760 align=center border=0〉〈!--dwlayouttable--〉
〈tbody〉
〈tr〉
〈TD valign=top align=middle width=760 height=310〉
〈div align=center〉
〈h2〉
〈script language=javascript〉
〈!--
var i=0;
var ie= (document.all)? 1:0;
var ns= (document.layers)? 1:0;

function initstyleelements ()/* Styles for Buttons Init * *
{
var c = Document.pad;
if (IE)
{
C.text.style.backgroundcolor= "#DDDDDD";
C.compileit.style.backgroundcolor= "#C0C0A8";
C.compileit.style.cursor= "Hand";
C.select.style.backgroundcolor= "#C0C0A8";
C.select.style.cursor= "Hand";
C.view.style.backgroundcolor= "#C0C0A8";
C.view.style.cursor= "Hand";
C.retur.style.backgroundcolor= "#C0C0A8";
C.retur.style.cursor= "Hand";
C.clear.style.backgroundcolor= "#C0C0A8";
C.clear.style.cursor= "Hand";
}
else return;
}

/* Buttons Enlightment of "compilation" Panel * *
function Lighton (what)
{
if (ie) What.style.backgroundColor = ' #E0E0D0 ';
else return;
}
function Focuson (what)
{
if (ie) What.style.backgroundColor = ' #EBEBEB ';
else return;
}
function Lightout (what)
{
if (ie) What.style.backgroundColor = ' #C0C0A8 ';
else return;
}
function Focusoff (what)
{
if (ie) What.style.backgroundColor = ' #DDDDDD ';
else return;
}
/* Buttons Enlightment of "compilation" Panel * *

function generate ()/* Generation of "compilation" * *
{
Code = Document.pad.text.value;
if (code)
{
Document.pad.text.value= ' Compiling ... Please wait! ';
SetTimeout ("Compile ()", 1000);
}
else alert (' something to compile and then press CompileIt ')
}
function compile ()/* the "compilation" * *
{
Document.pad.text.value= ';
Compilation=escape (code);
Document.pad.text.value= "〈script〉\n〈!--\ndocument.write (unescape (\" "+compilation+" \ ")); \n//--〉\n〈\/script〉";
i++;
if (i=1) alert ("Page compiled 1 time!");
else alert ("Page compiled" +i+ "times!");
}
function Selectcode ()/* Selecting "compilation" for copying * *
{
if (document.pad.text.value.length〉0)
{
Document.pad.text.focus ();
Document.pad.text.select ();
}
else alert (' Nothing for is selected! ')
}
function Preview ()/* Preview for the "compilation" * *
{
if (document.pad.text.value.length〉0)
{
Pr=window.open ("", "Preview", "scrollbars=1,menubar=1,status=1,width=700,height=320,left=50,top=110");
Pr.document.write (Document.pad.text.value);
}
else alert (' Nothing for is previewed! ')
}
function Uncompile ()/* decompiling a "compilation" * *
{
if (document.pad.text.value.length〉0)
{
Source=unescape (Document.pad.text.value);
Document.pad.text.value= "" +source+ "";
}
else alert (' Your need compiled code to uncompile it! ')
}
--〉
〈/script〉
〈br〉〈b〉〈font color= #333333 Web page HTML source code encryption and decryption device 〈/font〉〈/b〉〈/h2〉〈/div〉
〈table cellspacing=0 bordercolordark= #000000 cellpadding=10 width=750
Align=center bordercolorlight= #ffffff border=2〉
〈tbody〉
〈tr〉
〈td〉
〈div align=center〉〈br〉 put your source code in the editing area 〈br〉〈br〉
〈table cellspacing=0 cellpadding=0 width= "100%" border=0〉
〈tbody〉
〈tr〉
〈TD width= "100%" 〉〈!--compilation panel--〉
〈form name=pad method=post align= "center"
〈div align=center〉〈textarea style= "width:95%; Background-color: #ebebeb "Name=text rows=11 cols=58〉〈/textarea〉
〈br〉〈br〉〈br〉〈input Onmouseover=lighton (This) onclick=generate () onmouseout=lightout (this) Type=button value= encryption Name= compileit〉
〈input Onmouseover=lighton (This) Onclick=selectcode () onmouseout=lightout (this) Type=button value= Select All name=select〉
〈input Onmouseover=lighton (This) Onclick=preview () onmouseout=lightout (this) Type=button value= preview name=view〉
〈input Onmouseover=lighton (This) onclick=uncompile () onmouseout=lightout (this) Type=button value= decryption name=retur〉
〈input Onmouseover=lighton (This) onmouseout=lightout (this) Type=reset value= clear name=clear〉
〈/div〉〈/form〉〈!--compilation Panel--〉〈/td〉〈/tr〉〈/tbody〉〈/table〉〈/div〉〈/td〉〈/tr〉〈/tbody〉〈/table〉
〈div align=center〉〈br〉〈/div〉
〈div align=center〉〈/div〉〈/td〉〈/tr〉〈/tbody〉〈/table〉
〈/div〉
〈div〉〈/div〉〈/body〉〈/html〉

To sum up ... According to my thinking, shielding Web page source code is mainly divided into the following several steps:

1. Make a web springboard, eject the banner page you want to protect, and close itself to avoid revealing the address of the Web page you need to protect.

2. Because the above conditions block the banner of the Web page source code, so you can use this page as a welcome page.

3. In the Welcome page, use JavaScript as a hyperlink to open a new window without Windows to display the content of the Web site.

4. Encrypt the source code for each page or key critical page, and add a lock to the source code. Some people say it's no use encrypting the source code, but I think it's OK to use alternative points of encryption, such as the software encryption method is very common. But with my own write HTM file encryption source code, the general software can not be decrypted. You can try if you are interested. )

5. Finally have to mention is the Windows Web page temporary folder, which will be the source code records. But don't be afraid, add a code, you can make Windows not download the source code of the Web page, directly browsing. You can go and look for it.

Some things to note:

1. In the text of the statement that automatically closes the page: Window.close () has a disadvantage. You will be asked whether to close the window before closing the window, or you can not reach it if you choose not.

2. All of the above is only effective for IE browser, if you use another browser to browse, it is possible to screen the phenomenon of unsuccessful.

3. On the Web page source code shielding, has been elusive. I just write down the idea, concrete realization, or rely on the study of their own.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.