Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // @Author -> [email protected] [n0va]
- function evaluate_expression(){
- //Selecting the Expression
- let selectorBox = $(".message").text();
- // Extracting the Expression 3877 + 0x213d - 1111011011001
- selectorBox = selectorBox.split("\n")[2].substring(2,selectorBox.lenght);
- // getting individual Values to play with
- let arr = selectorBox.split(' ');
- // 0 , 2, 4 are the numbers holder
- let a = arr[0]; let b = arr[2]; let c = arr[4];
- // string to number
- a = parseInt(a);
- b = parseInt(b, 16); // converting hex to number [0x213d -> 8509]
- c = parseInt(c, 2).toString(16); // binary to hex [1111011011001 -> 1ed9]
- c = parseInt(c, 16); // hex to decimal [1ed9 -> 7897]
- return a + b - c; //work finished
- }
- window.location.href += '/' + evaluate_expression();
Add Comment
Please, Sign In to add comment