Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. "666f6f6c 6973686e 6573732c 20697420 77617320 74686520 65706f63 68206f66 2062656c 6965662c 20697420 77617320 74686520 65706f63 68206f66 20696e63 72656475 6c697479 2c206974 20776173 20746865 20736561 736f6e20 6f66204c 69676874 2c206974 20776173 20746865 2073656"
  2.  
  3. var s = "666f6f6c 6973686e 6573732c 20697420 77617320 74686520 65706f63 68206f66 2062656c 6965662c 20697420 77617320 74686520 65706f63 68206f66 20696e63 72656475 6c697479 2c206974 20776173 20746865 20736561 736f6e20 6f66204c 69676874 2c206974 20776173 20746865 2073656";
  4. var r = decodeURIComponent(s.replace(/s+/g, '').replace(/[0-9a-f]{2}/g, '%$&'));
  5.  
  6. function HexToString(s) {
  7. var escaped = "";
  8. var hex = "";
  9. if(s.length%4 > 0) {
  10. for (i = 0; i < (4 - (s.length % 4)); i++) {
  11. hex += "0";
  12. }
  13. }
  14. hex += s;
  15. for (var i = 0; i < hex.length; i += 4) {
  16. escaped += "%u" + hex.charAt(i) + hex.charAt(i + 1) + hex.charAt(i + 2) + hex.charAt(i + 3);
  17. }
  18. return unescape(escaped).split(unescape("%00")).join("");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement