Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. function obfuscator(str){
  2. return parseInt(
  3. str.split('')
  4. .map(function(e){
  5. return e.charCodeAt(0).toString(2);
  6. })
  7. .join(''),10)//parseInt end
  8. .toString().split('')
  9. .map(function(e){
  10. console.log(e.charCodeAt(0).toString(16));
  11. return e.charCodeAt(0).toString(16)}).join('');
  12. }
  13. //31 2e 31 30 30 31 31 31 31 31 30 30 31 30 31 31 31 65 2b 34 31
  14. //1 ok 1 0 0 1 1 1 1 1 0 0 1 0 1 1 1 ok ok ok 1
  15. //2e->46,65->101 ,2b->43 ,34->52
  16. function asd(str){
  17. a =parseInt(
  18. str.split('')
  19. .map(function(e){
  20. return e.charCodeAt(0).toString(2);
  21. })
  22. .join(''),10);
  23. console.log(a);
  24. main = a.toString().split('')
  25. .map(function(e){
  26. // console.log(e.charCodeAt(0).toString(16));
  27. return e.charCodeAt(0).toString(16)}).join('');
  28. console.log(main);
  29. }
  30. //converted each into binary
  31. //praseInt to 10 means converted to base 10
  32. //joined and converted to decimal
  33. //converted into hex and joined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement