NAME

SYNOPSIS

DESCRIPTION

The following subs implement the type-7 password encryption / decryption. The algorithm is freely available on the Internet on several sites; thus, I can/will NOT take credit or ANY liability for its use.

FUNCTIONS

NOTE: The legacy functions are deprecated and will be removed from a future release:

NOTE: Cisco routers by default only seem to use the first 16 indexes (0 - 15) to encrypt passwords. You notice this by looking at the first two characters of any type 7 encrypted password in a Cisco router configuration. However, testing on IOS 12.x and later shows that manually entering a password encrypted with a higher index (generated from this script) to a Cisco configuration will not only be allowed, but will function normally for authentication. This may be a form of "security through obscurity" given that some older Cisco password decrypters don't use the entire translation index and limit 'valid' passwords to those starting with the fist 16 indexes (0 - 15). Using passwords with an encryption index of 16 - 52 inclusive may render older Cisco password decrypters useless.

Additionally, the Cisco router command prompt seems to be limited to 254 characters, making the largest password 250 characters (254 - 4 characters for the pas (followed by space) command to enter the password).

EXPORTS

Load them: use Crypt::Cisco qw(:subs);

cisco_decrypt

cisco_encrypt

EXAMPLES

This distribution comes with a script (installed to the default bin install directory) that not only demonstrates example uses but also provides functional execution.

LICENSE

This software is released under the same terms as Perl itself. If you don't know what that means visit http://perl.com/.