About Web page code encryption and decryption protection

Source: Internet
Author: User
Tags add html tags net return string window
Encryption | decryption | Web page

Text-code protection is a big headache, and the more you know how to protect it, the more it means the vulnerability.

[-Method of adjusting the original code-]

1: Right-View the original file
2: View-Original file
3: File-Save As
4:ie Cache
5: Can also be extracted by code
Tutorial Code:
<SCRIPT>
function Add ()
{
var ress=document.forms[0].it315zhangxx.value
window.location= "View-source:" +ress;
}
</SCRIPT>

<p> Enter the URL address in the Web page Source Viewer to view the source code of the Web page:
<p>
<form><input name=it315zhangxx size=56 value=http://></form>
<FORM>
<input Onclick=add () Type=button value= View Web page source code ></FORM>

[-About protection-]

To prohibit some operation of IE by code first

: Prohibit Save As
<noscript><iframe src= "/*.html>";</iframe></noscript>

: deselect, prevent copy from pasting prevent copying >
<body onselectstart= ' return false ' oncut= ' return false; ' onpaste= ' return false ' oncopy= ' return false; bgcolor=# FFFFFF leftmargin=0 topmargin=0>

: No right button >
<script language=javascript>
<!--

if (window. Event)
Document.captureevents (Event.mouseup);

function Nocontextmenu ()
{
Event.cancelbubble = True
Event.returnvalue = false;

return false;
}

function Norightclick (e)
{
if (window. Event)
{
if (E.which = 2 E.which = = 3)
return false;
}
Else
if (Event.button = 2 Event.button = = 3)
{
Event.cancelbubble = True
Event.returnvalue = false;
return false;
}

}

Document.oncontextmenu = Nocontextmenu; For ie5+
Document.onmousedown = Norightclick; For all others
-->
</SCRIPT>
: Status bar fixed
<body bgcolor= "#fef4d9" >

: Prevent caching of HTML tags in a page, such as the following:
<HEAD>
<meta Http-equiv=pragma content=no-cache>
<meta Http-equiv=cache-control content=no-cache>
<meta Http-equiv=expires content=0>

-By using the above code you can prohibit the following methods-
1: Right-View the original file
3: File-Save As
4:ie Cache

-It is difficult to use the code itself to prohibit the following means the way I'm confusing the door to prevent the original code-
2: View-Original file
5: Can also be extracted by code

URL spoofing (can hide the real address)
Tutorial Code:

<meta http-equiv= "Refresh" content= "0;url= ' http://East evil." Tomorrow is a new day after all @www.hack.net/index.htm ' ">

Note that the code url= ' http://East Evil. Tomorrow is a new day after all @www.hack.net/index.htm ' "
The [http://] front of the @ symbol. Tomorrow is another day after all. The effect that appears in IE after deception can also be http://www.163.com
Not to mention the real address of the connection www.hack.net/index.htm

URL Obfuscation
<meta http-equiv= "Refresh" content= "0;url= ' http://East evil." Tomorrow is a new day after all @.htm ' ">
Notice what the difference is between this paragraph and the above. htm what is that. htm is actually the real address
How to access it. htm?
Oh, I want to do the door to do a No name htm
The method is simple to create a xxx.htm upload to the QQ network hard disk double excited file name xxx delete how to. htm out?

So it's hard to see the real address if you get the original code.
Column 1:http://East Evil. Tomorrow is a new day after all @.htm
Column 2:http://www.163.com/@.htm
Oh, it's hard to see what the real address is.

[JS prohibited with IE-view-original file]
It's also a confusing way, but it's absolutely forbidden to invoke the original file in the way above.
To use the JS
Tutorial JS Code
var opopup = Window.createpopup ();
var poptop=50;
function Popmsg (MSGSTR) {
var winstr= "<table style=/" border:1 solid #000000/"width=/" 241/"height=/" 172/"border=/" 0/"cellpadding=/" 0/" cellspacing=/"0/" > ";
winstr+= "<tr><td height=/" 150/"></td><td align=/" center/"><table width=/" 90%/"height=/ "110/" "border=/" 0/"cellpadding=/" 0/"cellspacing=/" 0/">";
winstr+= "<tr><td valign=/" top/"style=/" FONT-SIZE:12PX; Color: #F00000; face:tahoma/">" +msgstr+ "</td></tr></table></td></tr></table>";
OPopup.document.body.innerHTML = Winstr;
Popshow ();
}
function Popshow () {
Window.status=poptop;
if (poptop>1720) {
Cleartimeout (MyTime);
Opopup.hide ();
Return
}else if (poptop>1520&&poptop<1720) {
Opopup.show (Screen.width-250,screen.height,241,1720-poptop);
}else if (poptop>1500&&poptop<1520) {
Opopup.show (screen.width-250,screen.height+ (popTop-1720), 241,172);
}else if (poptop<180) {
Opopup.show (Screen.width-250,screen.height,241,poptop);
}else if (poptop<220) {
Opopup.show (screen.width-250,screen.height-poptop,241,172);
}
poptop+=10000;
var mytime=settimeout ("Popshow ();", 1);
}
Popmsg ("");

Save As 17789897.js

HTM call JS code
<script Language=javascript
Src= "/17789897.js" ></SCRIPT>
Well there are writing friends may be familiar with but I want to tell you his role is to prohibit the same [IE-View-Original file]
The difference in this piece of code
poptop+=10000;
var mytime=settimeout ("Popshow ();", 1);
You see that? speed is 10000.
No, I know what it means.

The above JS and HTM call JS code
Add to the Web page can be banned [IE-View-Original file]
That's all I know about protection.

[-About Encryption-]
I recommend that important code use composite encryption
There are basically the following kinds of ways
JS Code
Escape encryption
8 in-process escape string
16 in-Process escape string
The 10 binary HTML encoding is as follows
The 16 binary HTML encoding is as follows
All can use <script>
<!--
document.write (unescape ("Encrypted Code"));
-->
</script>
Because the code of his door is very large and JS file I will not give
We can go to baidu.com search.

[-about cracking-]
Is the so-called magic ruler, road, and then complex encryption, in many confusion, or to use IE to decode
Give us a super tip.
In the address bar or press Ctrl+o, enter:

Javascript:s=document.documentelement.outerhtml;document.write (' <body></body> '); Document.body.innertext=s;

The source code comes out. No matter how complex encryption is, it will eventually be restored to the HTML code that the browser can parse, and documentelement.outerhtml is the end result.



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.