Обнаружил подозрительный JS код в header.php, в bitrix cms, на что похоже? Анимация?

Здравствуйте.
В битриксе CMS обнаружил вот такой странный JS код в header.php.
Кто встречал такое, это действительно анимация? Или всё таки что то вредоносное?
Спасибо.

<script>
    var _0x2dce=["preloader-item12","innerWidth","preloader-item15","preloader-item9","preloader-item4","preloader-item6","round","addEventListener","random","preloader-item13","preloader-item31","preloader-item25","log","preloader-item7","preloader-item18","preloader-item29","preloader-item21","preloader-item32","translate(-50%, -50%) scale(","onresize","preloader-item17","preloader-item24","preloader-item1","DOMContentLoaded","preloader-item16","preloader-item30","active","preloader-item3","preloader-item20","preloader-item28","preloader-item26","preloader-item5","preloader-item14","preloader-item22","innerHeight","getElementsByClassName","add","preloader-item11","preloader-item19","preloader-item10","preloader-item8","classList","preloader-wrap","preloader-item23","style"];!function(e){!function(a){for(;--a;)e.push(e.shift())}(201)}(_0x2dce);var _0x1a3c=function(a,e){return _0x2dce[a=+a]};function resize(){var a,e=document[_0x1a3c("0xf")](_0x1a3c("0x16"))[0];a=0<window[_0x1a3c("0x1a")]-window[_0x1a3c("0xe")]?window[_0x1a3c("0x1a")]/2200:window[_0x1a3c("0x1a")]/800,e[_0x1a3c("0x18")].transform=_0x1a3c("0x2b")+a+")"}function animAdd(a,e,x){var m=document.getElementsByClassName(a)[0];setTimeout(function(){m[_0x1a3c("0x15")][_0x1a3c("0x10")](e)},x)}function animRem(a,e,x){var m=document[_0x1a3c("0xf")](a)[0];setTimeout(function(){m[_0x1a3c("0x15")].remove(e)},x)}function getRandom(){return 10*Math[_0x1a3c("0x1f")]((1500*Math[_0x1a3c("0x21")]()+500)/10)}function animBannerAdd(){animAdd(_0x1a3c("0x2"),_0x1a3c("0x6"),getRandom()),animAdd("preloader-item2","active",getRandom()),animAdd("preloader-item3",_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x1d"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0xb"),"active",getRandom()),animAdd(_0x1a3c("0x1e"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x26"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x14"),"active",getRandom()),animAdd(_0x1a3c("0x1c"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x13"),"active",getRandom()),animAdd("preloader-item11",_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x19"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x22"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0xc"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x1b"),_0x1a3c("0x6"),getRandom()),animAdd("preloader-item16",_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x0"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x27"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x12"),"active",getRandom()),animAdd(_0x1a3c("0x8"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x29"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0xd"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x17"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x1"),"active",getRandom()),animAdd(_0x1a3c("0x24"),"active",getRandom()),animAdd(_0x1a3c("0xa"),_0x1a3c("0x6"),getRandom()),animAdd("preloader-item27",_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x9"),_0x1a3c("0x6"),getRandom()),animAdd(_0x1a3c("0x28"),"active",getRandom()),animAdd(_0x1a3c("0x5"),"active",getRandom()),animAdd(_0x1a3c("0x23"),"active",getRandom()),animAdd(_0x1a3c("0x2a"),_0x1a3c("0x6"),getRandom())}function animBannerRem(){animRem(_0x1a3c("0x2"),_0x1a3c("0x6"),0),animRem("preloader-item2",_0x1a3c("0x6"),0),animRem(_0x1a3c("0x7"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x1d"),_0x1a3c("0x6"),0),animRem("preloader-item5",_0x1a3c("0x6"),0),animRem(_0x1a3c("0x1e"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x26"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x14"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x1c"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x13"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x11"),_0x1a3c("0x6"),0),animRem("preloader-item12",_0x1a3c("0x6"),0),animRem(_0x1a3c("0x22"),"active",0),animRem("preloader-item14","active",0),animRem(_0x1a3c("0x1b"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x4"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x0"),"active",0),animRem(_0x1a3c("0x27"),"active",0),animRem(_0x1a3c("0x12"),"active",0),animRem("preloader-item20",_0x1a3c("0x6"),0),animRem("preloader-item21",_0x1a3c("0x6"),0),animRem(_0x1a3c("0xd"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x17"),_0x1a3c("0x6"),0),animRem("preloader-item24",_0x1a3c("0x6"),0),animRem(_0x1a3c("0x24"),"active",0),animRem(_0x1a3c("0xa"),_0x1a3c("0x6"),0),animRem("preloader-item27","active",0),animRem(_0x1a3c("0x9"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x28"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x5"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x23"),_0x1a3c("0x6"),0),animRem(_0x1a3c("0x2a"),_0x1a3c("0x6"),0)}document[_0x1a3c("0x20")](_0x1a3c("0x3"),function(){resize()}),window[_0x1a3c("0x2c")]=function(a){resize()},console[_0x1a3c("0x25")](getRandom()),animBannerAdd(),setInterval(function(){animBannerRem()},3e3),setInterval(function(){animBannerAdd()},3e3);
</script>
  • Вопрос задан
  • 162 просмотра
Решения вопроса 1
delphinpro
@delphinpro Куратор тега JavaScript
frontend developer
Судите сами:

function resize() {
    const el = document.getElementsByClassName('preloader-wrap')[0];
    let scale = 0 < window.innerWidth - window.innerHeight
                ? window.innerWidth / 2200
                : window.innerWidth / 800;
    el.style.transform = 'translate(-50%, -50%) scale(' + scale + ')';
}

function animAdd(selector, className, timeout) {
    const el = document.getElementsByClassName(selector)[0];
    setTimeout(function () {
        el.classList.add(className);
    }, timeout);
}

function animRem(selector, className, timeout) {
    const el = document.getElementsByClassName(selector)[0];
    setTimeout(function () {
        el.classList.remove(className);
    }, timeout);
}

function getRandom() {
    return 10 * Math.round((1500 * Math.random() + 500) / 10);
}

function animBannerAdd() {
    animAdd('preloader-item1', 'active', getRandom());
    animAdd('preloader-item2', 'active', getRandom());
    animAdd('preloader-item3', 'active', getRandom());
    animAdd('preloader-item4', 'active', getRandom());
    animAdd('preloader-item5', 'active', getRandom());
    animAdd('preloader-item6', 'active', getRandom());
    animAdd('preloader-item7', 'active', getRandom());
    animAdd('preloader-item8', 'active', getRandom());
    animAdd('preloader-item9', 'active', getRandom());
    animAdd('preloader-item10', 'active', getRandom());
    animAdd('preloader-item11', 'active', getRandom());
    animAdd('preloader-item12', 'active', getRandom());
    animAdd('preloader-item13', 'active', getRandom());
    animAdd('preloader-item14', 'active', getRandom());
    animAdd('preloader-item15', 'active', getRandom());
    animAdd('preloader-item16', 'active', getRandom());
    animAdd('preloader-item17', 'active', getRandom());
    animAdd('preloader-item18', 'active', getRandom());
    animAdd('preloader-item19', 'active', getRandom());
    animAdd('preloader-item20', 'active', getRandom());
    animAdd('preloader-item21', 'active', getRandom());
    animAdd('preloader-item22', 'active', getRandom());
    animAdd('preloader-item23', 'active', getRandom());
    animAdd('preloader-item24', 'active', getRandom());
    animAdd('preloader-item25', 'active', getRandom());
    animAdd('preloader-item26', 'active', getRandom());
    animAdd('preloader-item27', 'active', getRandom());
    animAdd('preloader-item28', 'active', getRandom());
    animAdd('preloader-item29', 'active', getRandom());
    animAdd('preloader-item30', 'active', getRandom());
    animAdd('preloader-item31', 'active', getRandom());
    animAdd('preloader-item32', 'active', getRandom());
}

function animBannerRem() {
    animRem('preloader-item1', 'active', 0);
    animRem('preloader-item2', 'active', 0);
    animRem('preloader-item3', 'active', 0);
    animRem('preloader-item4', 'active', 0);
    animRem('preloader-item5', 'active', 0);
    animRem('preloader-item6', 'active', 0);
    animRem('preloader-item7', 'active', 0);
    animRem('preloader-item8', 'active', 0);
    animRem('preloader-item9', 'active', 0);
    animRem('preloader-item10', 'active', 0);
    animRem('preloader-item11', 'active', 0);
    animRem('preloader-item12', 'active', 0);
    animRem('preloader-item13', 'active', 0);
    animRem('preloader-item14', 'active', 0);
    animRem('preloader-item15', 'active', 0);
    animRem('preloader-item16', 'active', 0);
    animRem('preloader-item17', 'active', 0);
    animRem('preloader-item18', 'active', 0);
    animRem('preloader-item19', 'active', 0);
    animRem('preloader-item20', 'active', 0);
    animRem('preloader-item21', 'active', 0);
    animRem('preloader-item22', 'active', 0);
    animRem('preloader-item23', 'active', 0);
    animRem('preloader-item24', 'active', 0);
    animRem('preloader-item25', 'active', 0);
    animRem('preloader-item26', 'active', 0);
    animRem('preloader-item27', 'active', 0);
    animRem('preloader-item28', 'active', 0);
    animRem('preloader-item29', 'active', 0);
    animRem('preloader-item30', 'active', 0);
    animRem('preloader-item31', 'active', 0);
    animRem('preloader-item32', 'active', 0);
}

document.addEventListener('DOMContentLoaded', function () {
    resize();
});

window.onresize = function () {
    resize();
};

console.log(getRandom());

animBannerAdd();

setInterval(function () {
    animBannerRem();
}, 3000);

setInterval(function () {
    animBannerAdd();
}, 3000);
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

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

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