Hide or Obfuscate Iframe SRC

Asked

Viewed 1,600 times

0

Opa,

I need to hide the src code of the html iframe, I tried as follows change

$('#iframe').attr('src', 'http://www.site.com/');

Unsuccessfully, how can I hide or obfuscate the iframe src?

Vlw

  • What is the objective?

  • Customer request

1 answer

1


The answer is to obfuscate (make difficult) the src code of the html iframe, since it is impossible to hide.

 <script src="http://code.jquery.com/jquery-1.8.3.min.js" type="text/javascript"></script>

 <script src="a.js"></script>

 <iframe src="javascript:;" id="myframe"></iframe>

JS file (a. js)

First copy the code below paste into your text editor and replace the URL.

  $('#myframe').attr('src', 'http://dominio.com');

Go to javascript Obfuscator and paste the code to be "obfuscated". Don’t forget to clear the field before pasting the code there.

Once done, you should return something like:

 var _0x5a5d=["\x73\x72\x63","\x68\x74\x74\x70\x3A\x2F\x2F\x6B\x69\x74\x68\x6F\x6D\x65\x70\x61\x67\x65\x2E\x63\x6F\x6D","\x61\x74\x74\x72","\x23\x6D\x79\x66\x72\x61\x6D\x65"];$(_0x5a5d[3])[_0x5a5d[2]](_0x5a5d[0],_0x5a5d[1])

Finally, compose your a.js as follows:

   $(document).ready(function() {
      var _0x5a5d=["\x73\x72\x63","\x68\x74\x74\x70\x3A\x2F\x2F\x6B\x69\x74\x68\x6F\x6D\x65\x70\x61\x67\x65\x2E\x63\x6F\x6D","\x61\x74\x74\x72","\x23\x6D\x79\x66\x72\x61\x6D\x65"];$(_0x5a5d[3])[_0x5a5d[2]](_0x5a5d[0],_0x5a5d[1])
   });
  • 1

    But even so it still keeps being displayed. It will just not display while loading, but while running the URL will be there

  • If you use the alert(_0x5a5d); it delivers the result. But, I believe this is as close as it can get, the only other alternative would be to use proxy.

  • @Inkeliz is true, but few know of this feature and do not believe that sNniffer will put an Alert on his page kkkk, nor comment on this with your client!!!

  • I don’t have a flash, but the iframe is for http://petecasaofrancisco.com/Inkeliz.html? Just give a view-source: then go on http://kithomepage.com/sos/ocultar-src.js and copy the _0xc407, after F12 > alert(_0xc407). Another way, in F12 is to see in iframe the src. Another way is simply alert($('iframe').attr('src')).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.