Skip to content

Instantly share code, notes, and snippets.

View valentinas's full-sized avatar

Valentinas Bakaitis valentinas

  • Wellington, New Zealand
View GitHub Profile

Keybase proof

I hereby claim:

  • I am valentinas on github.
  • I am vbakaitis (https://keybase.io/vbakaitis) on keybase.
  • I have a public key whose fingerprint is F38B 8EB5 8232 DE1D 2CF9 5351 1E6E BDB7 FC68 9984

To claim this, I am signing this object:

@valentinas
valentinas / CISCO_Password_7_decrypt.js
Last active August 29, 2015 14:15
CISCO Password 7 decryption algorithm
function decrypt_passw_7(input){
var xlat = [0x64, 0x73, 0x66, 0x64, 0x3b, 0x6b, 0x66, 0x6f, 0x41, 0x2c, 0x2e, 0x69, 0x79, 0x65, 0x77, 0x72, 0x6b, 0x6c, 0x64, 0x4a, 0x4b, 0x44, 0x48, 0x53 , 0x55, 0x42]
var e = input.substring(2)
var o = input.substring(0,2)
var r = ""
for(var i = 0; i < e.length; i+=2) {
h = (1 * ('0x' + e.substring(i,i+2)))
c = h^xlat[o++];
document.getElementsByTagName("body")[0].setAttribute("style", "background-color:#059600;")