Skip to content

Instantly share code, notes, and snippets.

@Avyd
Created August 10, 2013 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Avyd/6202184 to your computer and use it in GitHub Desktop.
Save Avyd/6202184 to your computer and use it in GitHub Desktop.
Cisco MB5 Hasher - using salt size 4
#! /usr/bin/env python
#
# Passlib is required to run Cisco md5 hasher.
# You can install simply with "easy_install passlib"
#
# Cisco didn't want to use normal md5 for their passwords.
# So they changed the salt size.
# That kind of hashing is used in routers / switches.
# You can test simply by a "show run" output.
from passlib.hash import md5_crypt
p=raw_input("What to hash? ")
c=md5_crypt.encrypt(p, salt_size=4)
print c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment