Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user = "admin";
- pass = "admin";
- host = get_host_name();
- rand = rand_str( length:17, charset: "0123456789");
- username = "admin";
- password = "admin";
- passphrase = "admin:admin";
- # var passphrase = CryptoJS.enc.Utf8.parse("admin:admin"); //UTF8 encodet
- passphrase = "61646d696e3a61646d696e";
- display ( "\npassphrase = " , passphrase, "\n");
- #var secret = CryptoJS.enc.Hex.parse('4545453030304234303039452035343938393333383020323031362D30392D30352030383A34343A3139');
- secret = hexstr("4545453030304234303039452035343938393333383020323031362d30392d30352030383a34343a3139");
- display ("secret = ", secret, "\n");
- # var securityHash = CryptoJS.HmacSHA1(passphrase,secret);
- securityHash = HMAC_SHA1(data: passphrase, key: key);
- display ("securityHash = ", securityHash, "\n");
- websockey_key = newHandshakekey();# should be base64 encoded and then to string converted
- exit( 99 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement