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'
decrypt('1511021F0725'); # Will return 'cisco'
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 224th position.
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'
encrypt('cisco', 15); # will return '1511021F0725'
Usage will give hints on how to use the methods provided by this module.
LORD INFERNALE infernale@cpan.org
infernale@cpan.org
THIS SOFTWARE IS NEITHER INTENDED FOR MALICIOUS USE NOR FOR THE USE IN ANY OTHER ILLEGAL PURPOSES.
Credits for orginal code and description hobbit@avian.org, SPHiXe, .mudge et al. and for John Bashinski <jbash@CISCO.COM> for Cisco IOS password encryption facts.
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.
To install Cisco::Hash, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Cisco::Hash
CPAN shell
perl -MCPAN -e shell install Cisco::Hash
For more information on module installation, please visit the detailed CPAN module installation guide.