Execute a js script problem!!


  • Banned

    Hi
    i want to execute this code to generate a unique token
    Please can anyone help me

    function getToken() {
    return new String("e") + new String("1") + "8" + new String("6") + 'f' + '1' + '3' + String.fromCharCode(56) + String.fromCharCode(57) + String.fromCharCode(100) + new String("4") + new String("e") + 'b' + '7' + new String("8") + 'd' + new String("6") + '4' + "7" + '2' + "1" + new String("c") + "f" + "e" + '9' + "0" + String.fromCharCode(57) + 'd' + '9' + 'f' + new String("f") + String.fromCharCode(54);
    }

    Thanks a lot
    @Ruri


  • Admin

    Look into LoliScript's documentation for BEGIN SCRIPT with js, and simply take the body of the getToken function and paste it inside. Assign it to a variable, like var a = new String("e")... so then you can output like -> VARS "a" and use <a> inside blocks


  • Admin

    If the function changes every time you get the source, simply parse the javascript part inside the function declaration and assign it to an OB variable like code, then you can access "code" directly in your BEGIN SCRIPT js and you can write something like var a = eval(code); and do the same as above.


  • Banned

    Hi @Ruri Thanks a lot for your help really
    Im a n00b can you please make me an example of the code I posted to understand more
    thanks again


  • Admin

    BEGIN SCRIPT JavaScript
    var a = new String("e") + new String("1") + "8" + new String("6") + 'f' + '1' + '3' + String.fromCharCode(56) + String.fromCharCode(57) + String.fromCharCode(100) + new String("4") + new String("e") + 'b' + '7' + new String("8") + 'd' + new String("6") + '4' + "7" + '2' + "1" + new String("c") + "f" + "e" + '9' + "0" + String.fromCharCode(57) + 'd' + '9' + 'f' + new String("f") + String.fromCharCode(54);
    END SCRIPT -> VARS "a"
    PRINT <a>
    

  • Banned

    @Ruri
    I parsed data between return and } and i gave it a name CODE

    and i made the script like this
    BEGIN SCRIPT JavaScript
    var a = "<CODE>"
    END SCRIPT -> VARS "a"
    PRINT <a>

    But it didnt work can you please help me


  • Admin

    BEGIN SCRIPT JavaScript
    var a = eval(CODE);
    END SCRIPT -> VARS "a"
    PRINT <a>


  • Banned

    @Ruri Thanks a lot
    you save me


Log in to reply