genRandPort.py 247 B

12345678
  1. import random
  2. import string
  3. def generateRandomPort(default):
  4. firstLetter = random.choice(string.ascii_letters);
  5. lastLetter = random.choice(string.ascii_letters + string.digits);
  6. return (default + ord(firstLetter) * ord(lastLetter));