Advertisement
Guest User

Untitled

a guest
Sep 6th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1.  
  2. user = "admin";
  3. pass = "admin";
  4. host = get_host_name();
  5.  
  6. rand = rand_str( length:17, charset: "0123456789");
  7.  
  8. username = "admin";
  9. password = "admin";
  10. passphrase = "admin:admin";
  11. #   var passphrase = CryptoJS.enc.Utf8.parse("admin:admin"); //UTF8 encodet
  12. passphrase = "61646d696e3a61646d696e";
  13. display ( "\npassphrase = " , passphrase, "\n");
  14. #var secret = CryptoJS.enc.Hex.parse('4545453030304234303039452035343938393333383020323031362D30392D30352030383A34343A3139');
  15. secret = hexstr("4545453030304234303039452035343938393333383020323031362d30392d30352030383a34343a3139");
  16. display ("secret = ", secret, "\n");
  17. #    var securityHash = CryptoJS.HmacSHA1(passphrase,secret);
  18.  
  19. securityHash = HMAC_SHA1(data: passphrase, key: key);
  20.  
  21. display ("securityHash = ", securityHash, "\n");
  22. websockey_key = newHandshakekey();# should be base64 encoded and then to string converted
  23.  
  24. exit( 99 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement