Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- from hashlib import md5
- from base64 import b64encode
- # Type in the real parameters here
- MODEL = "DSOX0000Y"
- SERIAL = "AB12345678"
- MAC = "00-01-02-03-04-05"
- def makepwd( model, serial, mac ):
- mac = mac.translate( None, ':- ' ).upper()
- hstr = md5( model + serial + mac ).digest()
- pwd = b64encode( hstr, 'a1' )[7::-1]
- print 'Model : {0}\nSerial: {1}\nMAC : {2}\nPasswd: {3}'.format(model, serial, mac, pwd)
- return pwd
- def main():
- makepwd( MODEL, SERIAL, MAC )
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement