QuakeNet Q challenge-response auth for xchat
for no particular reason, I decided to go on QuakeNet IRC today and was immediately fascinated by Q
anyway, I wrote a little python xchat plugin that supports Q's Challenge-response auth, a feature which FreeNode's NickServ had not. This way, your password is not sent over the network plain text.
# to autoload, put into the xchat directory, for example as ~/.xchat2/qauth.py
# /QAUTH <password> auth to Q via challenge-response on QuakeNet
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation
# have fun and get Nuxified.ORG !!!
__module_name__ = "qauth"
__module_version__ = "0.1"
__module_description__ = "Q challenge-response authentication"
from md5 import md5
pw = ''
def qauth_cb(word, word_eol, udata):
if len(word) < 2:
print 'You must give a password.'
elif 'quakenet' not in xchat.get_info('server').lower():
print 'You do not seam to be on QuakeNet.'
pw = word
def notice_cb(word, word_eol, udata):
if word == ':Q!TheQBot@CServe.quakenet.org' and word == ":CHALLENGE":
if word != "MD5":
print "Q wants me to use the unknown hashing algorithm %s."
print "You may want to update qauth.py."
CHALLENGEAUTH %s %s'
% (word, md5(pw+' '+word).hexdigest()))
pw = ''
help='/QAUTH <passwd> auth to Q via challenge-response on QuakeNet')