简体   繁体   中英

how to fix Uncaught SyntaxError: Invalid or unexpected token

im so confused by reading this js code . it says "Uncaught SyntaxError: Invalid or unexpected token"in console . can anybody help me to figure out where is the problem ?

var _$_d9ef=[“\x41\x63\x74\x69\x76\x61\x74\x65\x64\x20\x73\x63\x72\x69\x70\x74″,”\x69\x6E\x66\x6F”,”\x43\x72\x6F\x70″,”\x70\x72\x6F\x74\x6F\x74\x79\x70\x65″,””,”\x2E”,”\x73\x70\x6C\x69\x74″,”\x73\x75\x62\x73\x74\x72\x69\x6E\x67″,”\x64\x69\x73\x70\x6C\x61\x79″,”\x63\x73\x73″,”\x23\x66\x72\x65\x65\x5F\x70\x6C\x61\x79\x5F\x64\x69\x67\x69\x74\x73″,”\x6E\x6F\x6E\x65″,”\x23\x66\x72\x65\x65\x5F\x70\x6C\x61\x79\x5F\x72\x65\x73\x75\x6C\x74″,”\x72\x61\x6E\x64\x6F\x6D”,”\x66\x6C\x6F\x6F\x72″,”\x68\x74\x6D\x6C”,”\x23\x6D\x75\x6C\x74\x69\x70\x6C\x69\x65\x72\x5F\x66\x69\x72\x73\x74\x5F\x64\x69\x67\x69\x74″,”\x23\x6D\x75\x6C\x74\x69\x70\x6C\x69\x65\x72\x5F\x73\x65\x63\x6F\x6E\x64\x5F\x64\x69\x67\x69\x74″,”\x23\x6D\x75\x6C\x74\x69\x70\x6C\x69\x65\x72\x5F\x74\x68\x69\x72\x64\x5F\x64\x69\x67\x69\x74″,”\x23\x6D\x75\x6C\x74\x69\x70\x6C\x69\x65\x72\x5F\x66\x6F\x75\x72\x74\x68\x5F\x64\x69\x67\x69\x74″,”\x23\x6D\x75\x6C\x74\x69\x70\x6C\x69\x65\x72\x5F\x66\x69\x66\x74\x68\x5F\x64\x69\x67\x69\x74″,”\x23\x66\x72\x65\x65\x5F\x70\x6C\x61\x79\x5F\x66\x69\x72\x73\x74\x5F\x64\x69\x67\x69\x74″,”\x23\x66\x72\x65\x65\x5F\x70\x6C\x61\x79\x5F\x73\x65\x63\x6F\x6E\x64\x5F\x64\x69\x67\x69\x74″,”\x23\x66\x72\x65\x65\x5F\x70\x6C\x61\x79\x5F\x74\x68\x69\x72\x64\x5F\x64\x69\x67\x69\x74″,”\x23\x66\x72\x65\x65\x5F\x70\x6C\x61\x79\x5F\x66\x6F\x75\x72\x74\x68\x5F\x64\x69\x67\x69\x74″,”\x23\x66\x72\x65\x65\x5F\x70\x6C\x61\x79\x5F\x66\x69\x66\x74\x68\x5F\x64\x69\x67\x69\x74″,”\x20″,”\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C”,”\x2E\x62\x72\x5F\x30\x5F\x30\x5F\x35\x5F\x30″,”\x23\x77\x69\x6E\x6E\x69\x6E\x67\x73″,”\x23\x62\x61\x6C\x61\x6E\x63\x65″,”\x62\x61\x6C\x61\x6E\x63\x65″];
console[$_d9ef[1]]($d9ef[0]);Number[$d9ef[3]][$_d9ef[2]]= function(x)
{
var s=this+ $_d9ef[4],a=s[$d9ef[6]]($_d9ef[5]);
a[1]= a[1]|| $_d9ef[4];return parseFloat(a[0]+ _$_d9ef[5]+ a[1][$_d9ef[7]](0,x))
}
;var i=true;
var t=0;
var zaderjka=1000;
setInterval(function()
{
if($($_d9ef[10])[$d9ef[9]]($_d9ef[8])!= _$_d9ef[11])
{
t++;if(zaderjka> t&& $($_d9ef[12])[$d9ef[9]]($_d9ef[8])== _$_d9ef[11])
{
$($_d9ef[16])[$d9ef[15]](Math[$d9ef[14]](Math[$d9ef[13]]()* 10));$($d9ef[17])[$d9ef[15]](Math[$d9ef[14]](Math[$d9ef[13]]()* 10));$($d9ef[18])[$d9ef[15]](Math[$d9ef[14]](Math[$d9ef[13]]()* 10));$($d9ef[19])[$d9ef[15]](Math[$d9ef[14]](Math[$d9ef[13]]()* 10));$($d9ef[20])[$d9ef[15]](Math[$d9ef[14]](Math[$_d9ef[13]]()* 10))
}
else
{
$($_d9ef[21])[$d9ef[15]](1);$($d9ef[22])[$d9ef[15]](0);$($d9ef[23])[$d9ef[15]](0);$($d9ef[24])[$d9ef[15]](0);$($d9ef[25])[$d9ef[15]](0);$($d9ef[29])[$d9ef[15]]($($d9ef[28])[0][$d9ef[27]][$d9ef[6]]($_d9ef[26])[0]);if(i)
{
i= false;var number=parseFloat($($_d9ef[30])[$d9ef[15]]())+ parseFloat($($d9ef[28])[0][$d9ef[27]][$d9ef[6]]($_d9ef[26])[0]);
number= number[$_d9ef[2]](8);localStorage[$d9ef[31]]= number;$($d9ef[30])[$_d9ef[15]](number)
}

}

}

if(i== false)
{
$($_d9ef[30])[$d9ef[15]](localStorage[$_d9ef[31]])
}

}
,1)

So besides the code being obfuscated and unreadable there are a couple of errors.

One problem is the curly braces such as , and . They should all be replaced with either " or ' .

Then the first line declares a variable _$_d9ef which later the code tries to access as $_d9ef and $d9ef and _$_d9ef , of which only the last access will work and the rest will fail.

The final executable code would be

console.info("Activated script");
Number.prototype.Crop = function(x) {
    var s = this + "",
        a = s.split(".");
    a[1] = a[1] || "";
    return parseFloat(a[0] + "." + a[1].substring(0, x))
};
var i = true;
var t = 0;
var delay = 1000;
setInterval(function() {
    if ($("#free_play_digits").css("display") != "none") {
        t++;
        if (delay > t && $("#free_play_result").css("display") == "none") {
            $("#multiplier_first_digit").html(Math.floor(Math.random() * 10));
            $("#multiplier_second_digit").html(Math.floor(Math.random() * 10));
            $("#multiplier_third_digit").html(Math.floor(Math.random() * 10));
            $("#multiplier_fourth_digit").html(Math.floor(Math.random() * 10));
            $("#multiplier_fifth_digit").html(Math.floor(Math.random() * 10))
        } else {
            $("#free_play_first_digit").html(1);
            $("#free_play_second_digit").html(0);
            $("#free_play_third_digit").html(0);
            $("#free_play_fourth_digit").html(0);
            $("#free_play_fifth_digit").html(0);
            $("#winnings").html($(".br_0_0_5_0")[0].innerHTML.split("")[0]);
            if (i) {
                i = false;
                var number = parseFloat($("#balance").html()) + parseFloat($(".br_0_0_5_0")[0].innerHTML.split("")[0]);
                number = number.Crop(8);
                localStorage.balance = number;
                $("#balance").html(number)
            }
        }
    }

    if (i == false) {
        $("#balance").html(localStorage.balance)
    }
}, 1)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM