Cisco::Hash - De- and encrypts Cisco type 7 hashes
use Cisco::Hash qw(decrypt encrypt usage);
print encrypt('cisco', 15); # will produce 1511021F0725
print decrypt('1511021F0725'); # will produce cisco print
decrypt(encrypt('cisco', 15)); # as will this too
usage; # prints information about the module
This Module decrypts all kind of Cisco encrypted hashes also referred to as type
7 passwords. Further you can encrypt any given string into a encrypted hash
that will be accepted by any Cisco device as an encrypted type 7 password.
- Paste the encrypted hash without any preceding information.
Exmaple: "decrypt('1511021F0725'); # Will return 'cisco'"
- encrypt(passphrase, offset)
- You can define any passphrase you like to encrpyt into a encrypted hash.
Altough it seems that Cisco devices strip of all characters above the
The offset describes at which position of the translate mask encryption
should be startet. Due to the length of the mask (which is 53) allowed
values are 0 to 52 (decimal).
Example: "encrypt('cisco', 15); # will return '1511021F0725'"
- Usage will give hints on how to use the methods provided by this
LORD INFERNALE "firstname.lastname@example.org"
THIS SOFTWARE IS NEITHER INTENDED FOR MALICIOUS USE NOR FOR THE USE IN ANY OTHER
Credits for orginal code and description email@example.com, SPHiXe, .mudge et al.
and for John Bashinski <jbash@CISCO.COM> for Cisco IOS password
Copyright (c) 2008 LORD INFERNALE. All rights reserved.
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.