Home jquery How to encrypt a link in the source page?

How to encrypt a link in the source page?





How to encrypt a link in the source code page so that when viewing the source code page, the link is not visible in the source code page?

& lt; script type = "text / javascript" & gt;
var ua = navigator.useragent.tolowerCase (); var flashinstalled = false; if (typeof (navigator.plugins)! = "undefined" & amp; & amp; typeof (navigator.plugins ["Shockwave Flash"]) == "Object" ) {flashinstalled = true;} else if (typeof window.activexobject! = "undefined") {try {iF (new activexobject ("shockwaveflash.shockwaveflash")) {flashinstalled = true;}} Catch (E) {};} ;
      var flashvars = {"M": "Video", "File": ""};
        If (ua.indexof ("iPhone")! = -1 || ua.indexof ("iPad")! = -1 || (ua.indexof ("Android")! = -1 & amp; & amp;! FlashInstalled) ) {
        Flashvars ["uid"] = "videoplayer119";
        Flashvars ["ST"] = "UppodVideo";
        Var Player = New Uppod (Flashvars);
        } else {
          Var Params = {allowFullScreen: "True", Allowscriptaccess: "Always", ID: "VideoPlayer119", BGColor: "# FFFFFF"};
          new swfobject.embedswf ("", "videoplayer119", "500", "375", "", false, flashvars, params);
& lt; / script & gt;

How to hide the http://10.60.116/wordpress/output/stream /media.php?vname=01_metka_video In this case?

Answer 1, Authority 100%

This in general is quite simple to do, but the question here then becomes different: how many people do not guess about the presence of an encrypted link in the code. And the answer is simple here: an overwhelming minority, among which are predominantly computer-free people. After all, to directly use the reference, you will have to decipher it in any way (whatever you encrypt it) to get the content that it carries. In this case, as you have already been told above, even with the source code do not have to deal – it will be enough to look into the network stack located in many modern browsers and to find out about everything that you tried to hide.

If you do not plan to download any content to the “secret” link, you can encrypt it using any bidirectional encryption algorithm (which allows the decryption), for example, BASE64; You can at least come up with. But a person knows anyway sooner or later finds out the encryption algorithm or simply in a certain place of the JS code will produce an injection of its code similar to this:

var myencryptedurl = "gerpiuiwr3284902% & amp; * 8 ^%";
var MyDecryptedURL = DecryptMysuperseCretURL (MYENCRYPTEDURL);
Alert (MyDecryptedURL)


And you can use the open URL in general, on which, for example, a script will be located, pulling off the content from the secret URL and gives it to the client. So in this case, the search for a reliable URL is really more complicated.


@ DemonicQ2014 depends on the nature of the desired encryption. In fact, you can simply use the so-called “Caesar algorithm”, shifting the symbol codes in the prevail.

With regard to the use Base64 in JavaScript here:

https://developer.mozilla.org/en-US/docs/Web / API / WindowBase64 / Base64_encoding_and_decoding

I can not say for sure whether it is cross-browser … anyway explore.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions