![]() ![]() If there are other hash algorithms that Cisco currently or has historically used, then I'd like to have the code for those algorithms as well. I presume that the "5" in the hashed result is some sort of hash algorithm identifier. I want code that translates "foobar" to "5 $1$pdQG$0WzLBXV98voWIUEdIiLm11", so that I can generate the already-hashed passwords in my config-generation tool, rather than putting cleartext passwords in the generated configs and waiting for the router to generate the hash. Note the use of this library in Python 3.x requires that the string be in byte string format (encoded). Then when I do a 'show config' command (assuming I have "service password-encryption" enabled), what I see is something like this: enable secret 5 $1$pdQG$0WzLBXV98voWIUEdIiLm11 Using python from the command line we can generate the MD5 hash of a string using the hashlib library. Let’s start with a brief introduction to this topic, and then I’ll show you exactly how you can use this library in your project. For example, the blueimp-md5 library will make the md5 function available, as with most other languages. I need this for an automated config-file generator that I'm working on ( Netomata Config Generator).īasically, what I want is the Cisco equivalent of the "htpasswd" command used for web servers.įor example, when I put the following command with clear-text password into a Cisco config: enable secret foobar The easiest way to generate a MD5 hash with JavaScript is to use an external library. Tool Description: This visual tool generates the hashed password using either SHA1 or MD5 hashing algorithm depending on the choice you make. I'm not trying to break into anything I'm trying to generate the appropriate "enable secret" line given a clear text password, not decode an existing "enable secret" line with a hashed password. Does anyone have a pointer to code (or just the algorithm) that Cisco uses to generate their password hashes for things like "enable secret"? ![]()
0 Comments
Leave a Reply. |