Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function obfuscator(str){
- return parseInt(
- str.split('')
- .map(function(e){
- return e.charCodeAt(0).toString(2);
- })
- .join(''),10)//parseInt end
- .toString().split('')
- .map(function(e){
- console.log(e.charCodeAt(0).toString(16));
- return e.charCodeAt(0).toString(16)}).join('');
- }
- //31 2e 31 30 30 31 31 31 31 31 30 30 31 30 31 31 31 65 2b 34 31
- //1 ok 1 0 0 1 1 1 1 1 0 0 1 0 1 1 1 ok ok ok 1
- //2e->46,65->101 ,2b->43 ,34->52
- function asd(str){
- a =parseInt(
- str.split('')
- .map(function(e){
- return e.charCodeAt(0).toString(2);
- })
- .join(''),10);
- console.log(a);
- main = a.toString().split('')
- .map(function(e){
- // console.log(e.charCodeAt(0).toString(16));
- return e.charCodeAt(0).toString(16)}).join('');
- console.log(main);
- }
- //converted each into binary
- //praseInt to 10 means converted to base 10
- //joined and converted to decimal
- //converted into hex and joined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement