NAME
Cisco::Hash - De- and encrypts Cisco type 7 hashes
SYNOPSIS
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
DESCRIPTION
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.
METHODS
- decrypt(encrypted_hash)
-
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 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'
- usage
-
Usage will give hints on how to use the methods provided by this module.
AUTHOR
LORD INFERNALE infernale@cpan.org
COPYRIGHT AND LICENSE
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.