Unknown scripts are added before the html body tag tag close

Since this morning, I have discovered that some unknown scripts are added immediately before the body tag tag, scripts:

<script> var addthis_config = {"pubid":"ra-554ac5c71847b3c2"}; </script><script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-554ac5c71847b3c2"></script>
<script> if (addthis && addthis.layers) { addthis.layers({'share':{'mobile':false}});}</script>

I have not added this piece of code to the site. I was looking for the reason for this. But up to this point, I cannot find a solution to remove this script. What I have done / observed so far:

Removed body script tag tag

I tried to add an html file (with basic tags) to an index.html file: I found that the script was entered immediately before closing the body.

Scripts are visible only on the home page.

Files uploaded to another hosting with a different domain: No scripts

The web server is Apache, and the contents of .htaccess is shown below:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*)mywebsite\.ae [NC]
RewriteRule ^(.*)$ http://www.mywebsite.org/$1 [R,L]

RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

- - Amazon. - ?

+4
3

, ! IP-, IP ( , DNS-?). → :

: Stark 1.0 (- ).

IP- AWS, . , This Via . , , .

0

http://www.addthis.com/academy/the-addthis_config-variable/

addThis, script.

, , ,

document.createElement = (function () {
   var _realCE = document.createElement;
   return function (name,options) {
      if (name.toLowerCase() === 'script') {
         try {
            throw "script added to page";
         }
         catch(e) {
            console.warn(e.message);
            console.warn(e.stack);
         }
      }
      return _realCE.apply(document,arguments);
   }
})();

, script script. , , script .

+6

:

, , , script -

script ?

, -.

?

... Google, , , , .. .

What to do to prevent this?

You can see or load the script at this address . If you use any kind of free hosting, usually you have this “advertisement” on your website, otherwise if you have regular paid hosting, try contacting support and ask why you have this script on the website or try disabling it on the admin website.

0
source

Source: https://habr.com/ru/post/1663096/


All Articles