Skip to content

Instantly share code, notes, and snippets.

@jeremyBanks
Created August 5, 2008 02:25
Show Gist options
  • Save jeremyBanks/4022 to your computer and use it in GitHub Desktop.
Save jeremyBanks/4022 to your computer and use it in GitHub Desktop.
Generating a 128-bit uppercase hex number, for use as a WEP key.
~ $ python
Python 2.5.2 Stackless 3.1b3 060516 (python-2.52:61022, Feb 27 2008, 16:52:03)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
>>> print("%032X" % (random.getrandbits(128)))
9BC16245BF668D1637236C6422B48A54
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment