How can I convert base64 decode a string to text in javascript file?

142 views
Skip to first unread message

SHADOW

unread,
Feb 8, 2019, 5:43:59 AM2/8/19
to HackBar
Hello my friends :)

This is my javascript source code .

===========================================================

      statementsTpro: function (choice)    {
        var str = choice;
        switch (str){     
            case 'PHP1':
                    String str = "R28gVG8gSGFja2Jhcg=="
                    Decoder decoder = Base64.getDecoder();
                    byte[] decodedByte = decoder.decode(encodedString);
                    String decodedString = new String(decodedByte);
                    System.out.println(decodedString);
                    break;                   
        }        
        hackBar.setSelectedText( txt );
      },   
   

===========================================================
As a webdeveloper I often have to decode strings in various formats. I creating a new Extension .
If you could add more string decoding options it would be much appreciated.

qqqqqqqqqqqqqq.jpg

Please place your code in the red line. Thank you for your help




Reply all
Reply to author
Forward
0 new messages