V
V
Vlad2016-05-09 11:55:12
JavaScript
Vlad, 2016-05-09 11:55:12

What does this javascript do?

I'm looking for a virus on the site .. this code aroused suspicion. Does anyone understand what is written at the beginning of this code?

var uagent=navigator.userAgent.toLowerCase(),is_ie=0<=uagent.indexOf("msie")?!0:!1,is_ie9=0<=uagent.indexOf("msie 9.0")?!0:!1,ie_range_cache="",list_open_tag="",list_close_tag="",listitems="",bbtags=[],rus_lr2="\u0415\u0435\u041e\u043e\u0401\u0401\u0401\u0401\u0416\u0416\u0427\u0427\u0428\u0428\u0429\u0429\u042a\u042c\u042d\u042d\u042e\u042e\u042f\u042f\u042f\u042f\u0451\u0451\u0436\u0447\u0448\u0449\u044d\u044e\u044f\u044f".split(""),lat_lr2=("/E-/e-/O-/o-\u042bO-\u042bo-\u0419O-\u0419o-\u0417H-\u0417h-\u0426H-\u0426h-\u0421H-\u0421h-\u0428H-\u0428h-\u044a"+
String.fromCharCode(35)+"-\u044c"+String.fromCharCode(39)+"-\u0419E-\u0419e-\u0419U-\u0419u-\u0419A-\u0419a-\u042bA-\u042ba-\u044bo-\u0439o-\u0437h-\u0446h-\u0441h-\u0448h-\u0439e-\u0439u-\u0439a-\u044ba").split("-"),rus_lr1="\u0410\u0411\u0412\u0413\u0414\u0415\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0425\u0426\u0429\u042b\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0445\u0446\u0449\u044a\u044b\u044c\u044c\u044f".split(""),
lat_lr1=("A-B-V-G-D-E-Z-I-J-K-L-M-N-O-P-R-S-T-U-F-H-X-C-W-Y-Q-a-b-v-g-d-e-z-i-j-k-l-m-n-o-p-r-s-t-u-f-h-x-c-w-"+String.fromCharCode(35)+"-y-"+String.fromCharCode(39)+"-"+String.fromCharCode(96)+"-q").split("-");function setFieldName(a){a!=selField&&(selField=a)}function emoticon(a){doInsert(" "+a+" ","",!1)}function pagebreak(){doInsert("{PAGEBREAK}","",!1)}function simpletag(a){doInsert("["+a+"]","[/"+a+"]",!0)}
function DLEimagePrompt(a,d){var c={},b="",e="";-1!=a.indexOf("http://")||-1!=a.indexOf("https://")?(b=a,e=""):(b="http://",e=a);c[dle_act_lang[3]]=function(){$(this).dialog("close")};c[dle_act_lang[2]]=function(){if(1>$("#dle-promt-text").val().length)$("#dle-promt-text").addClass("ui-state-error");else{var a=$("#dle-promt-text").val(),b=$("#dle-image-alt").val(),c=$("#dleimagealign").val();$(this).dialog("close");$("#dlepopup").remove();d&&d(a,b,c)}};$("#dlepopup").remove();$("body").append("<div id='dlepopup' title='"+
dle_prompt+"' style='display:none'>"+text_enter_image+"<br /><input type='text' name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:97%; padding: .4em;' value='"+b+"'/><br /><br />"+text_alt_image+"<br /><input type='text' name='dle-image-alt' id='dle-image-alt' class='ui-widget-content ui-corner-all' style='width:97%; padding: .4em;' value='"+e+"'/><br /><br />"+img_align+"&nbsp;"+img_align_sel+"</div>");$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,
buttons:c})}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2016-05-09
@Sc0undRel

First, the user agent of the client's browser is taken
and checked for "is it ie?"

is_ie = 0 <= uagent.indexOf("msie") ? !0 : !1,
is_ie9 = 0 <= uagent.indexOf("msie 9.0") ? !0 : !1,

then some variables without values ​​(they don't seem to be used in this script)
ie_range_cache = "",
list_open_tag = "",
list_close_tag = "",
listitems = "",
bbtags = [],

then sequences are created with something like this:
rus_lr2 = ["Е", "е", "О", "о", "Ё", "Ё", "Ё", "Ё", "Ж", "Ж", "Ч", "Ч", "Ш", "Ш", "Щ", "Щ", "Ъ", "Ь", "Э", "Э", "Ю", "Ю", "Я", "Я", "Я", "Я", "ё", "ё", "ж", "ч", "ш", "щ", "э", "ю", "я", "я"]
lat_lr2 = /E-/e-/O-/o-ЫO-Ыo-ЙO-Йo-ЗH-Зh-ЦH-Цh-СH-Сh-ШH-Шh-ъ#-ь',ЙE,Йe,ЙU,Йu,ЙA,Йa,ЫA,Ыa,ыo,йo,зh,цh,сh,шh,йe,йu,йa,ыa
rus_lr1=...
lat_lr1=...

and then something begins that suspiciously resembles a piece of script from the DataLife Engine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question