Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // https://ringzer0team.com/challenges/14/
- function binaryAgent(str) {
- var binString = '';
- str.split(' ').map(function(bin) {
- binString += String.fromCharCode(parseInt(bin, 2));
- });
- return binString;
- }
- $.getScript("https://cdn.rawgit.com/emn178/js-sha512/master/src/sha512.js", function(){
- // selecting the message from SRC
- let selectorBox = $(".message").text();
- // Removing the unnecessary stuffs from the message
- let arr= [];
- selectorBox = selectorBox.split("\n")[2].substring(2,selectorBox.lenght);
- arr = selectorBox.match(/.{1,8}/g);
- res = '';
- for(var i=0;i<arr.length;i++){
- res += binaryAgent(arr[i]);
- }
- var encrypted_ = sha512(res);
- window.location.href += '/' + encrypted_;
- });
Add Comment
Please, Sign In to add comment