Ticket #228: bindcmd.diff

File bindcmd.diff, 597 bytes (added by jinmei, 10 years ago)
  • bindcmd.py

     
    8787        '''Generate one session id for the connection. '''
    8888        rand = os.urandom(16)
    8989        now = time.time()
    90         ip = socket.gethostbyname(socket.gethostname())
    91         session_id = sha1(("%s%s%s" %(rand, now, ip)).encode())
     90        session_id = sha1(("%s%s%s" %(rand, now,
     91                                      socket.gethostname())).encode())
    9292        digest = session_id.hexdigest()
    9393        return digest
    9494