<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=ChallengeAuth</id>
	<title>ChallengeAuth - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=ChallengeAuth"/>
	<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=ChallengeAuth&amp;action=history"/>
	<updated>2026-04-30T18:25:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=ChallengeAuth&amp;diff=6163&amp;oldid=prev</id>
		<title>NaNg: old script reference.</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=ChallengeAuth&amp;diff=6163&amp;oldid=prev"/>
		<updated>2015-07-18T13:16:58Z</updated>

		<summary type="html">&lt;p&gt;old script reference.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:16, 18 July 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l186&quot;&gt;Line 186:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 186:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== See also ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== See also ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[Challenge auth]] (the old script, works on versions older than v7.42)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Joining channels after hiding your address]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Joining channels after hiding your address]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>NaNg</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=ChallengeAuth&amp;diff=6155&amp;oldid=prev</id>
		<title>NaNg: Challenge auth 2.0 script based on mIRC 7.42 new identifiers.</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=ChallengeAuth&amp;diff=6155&amp;oldid=prev"/>
		<updated>2015-07-18T13:01:25Z</updated>

		<summary type="html">&lt;p&gt;Challenge auth 2.0 script based on mIRC 7.42 new identifiers.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; ; Original by doomie @ QuakeNet&lt;br /&gt;
 ; Modified by NaNg @ QuakeNet&lt;br /&gt;
 ; Version 2.0&lt;br /&gt;
 ; Written and tested on mIRC 7.42&lt;br /&gt;
 ;&lt;br /&gt;
 ; What does this script contains?&lt;br /&gt;
 ;&lt;br /&gt;
 ;   * ChallengeAuth script based on $hmac and $sha256 which are available from mIRC v7.42.&lt;br /&gt;
 ;   * No addon dll needed for mIRC on tested version.&lt;br /&gt;
 ;&lt;br /&gt;
 ; What is ChallengeAuth?&lt;br /&gt;
 ;&lt;br /&gt;
 ;   ChallengeAuth is a safe way to auth to your Q account, without sending your password in plain&lt;br /&gt;
 ;   text over the network. For more information, please read the following link:&lt;br /&gt;
 ;     http://www.quakenet.org/development/challengeauth/&lt;br /&gt;
 ;&lt;br /&gt;
 ; *****************************************************&lt;br /&gt;
 ; What do I need to configure before using this script?&lt;br /&gt;
 ; *****************************************************&lt;br /&gt;
 ;&lt;br /&gt;
 ;   You don&amp;#039;t need to configure ANYTHING! The scripts can work as is, by executing /ChallengeAuth.&lt;br /&gt;
 ;   If you&amp;#039;d like for it to auto-auth on connect, use /ChallengeAuth.AutoAuth 1.&lt;br /&gt;
 ;   The script will pop up windows asking your username (first time only) and password (every time).&lt;br /&gt;
 ;&lt;br /&gt;
 ; If you don&amp;#039;t want it to pop the password window every time, follow these instructions:&lt;br /&gt;
 ;&lt;br /&gt;
 ;   The ChallengeAuth.Username and ChallengeAuth.Password right under this documentation needs to&lt;br /&gt;
 ;   be edited for your username and hashed password.&lt;br /&gt;
 ;   To get the hashed password, after loading this script, use:&lt;br /&gt;
 ;     /ChallengeAuth.CreateHash &amp;lt;User&amp;gt; &amp;lt;Pass&amp;gt;&lt;br /&gt;
 ;   where User is your Q account name and Pass is your Q password, and you will be given the hashed&lt;br /&gt;
 ;   password that corresponds to the given user which you should insert in the alias below, e.g:&lt;br /&gt;
 ;     alias -l ChallengeAuth.Password { return &amp;lt;Hashed_Password&amp;gt; }&lt;br /&gt;
 ;&lt;br /&gt;
 ; Available commands:&lt;br /&gt;
 ;&lt;br /&gt;
 ;   * ChallengeAuth&lt;br /&gt;
 ;       To auth to the pre-set user and password using the challengeauth.&lt;br /&gt;
 ;   * ChallengeAuth.AutoAuth [1|0]&lt;br /&gt;
 ;       Set 1 to enable to auto-auth on connect or 0 to disable.&lt;br /&gt;
 ;   * ChallengeAuth.CreateHash [&amp;lt;Authname&amp;gt;] [&amp;lt;Pass&amp;gt;]&lt;br /&gt;
 ;       Creates a hashed request according to the given Q user and pass.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ; CONFIGURE&lt;br /&gt;
 &lt;br /&gt;
 [[alias]] -l ChallengeAuth.Username {&lt;br /&gt;
   [[If-Then-Else|if]] (!%ChallengeAuth.User) {&lt;br /&gt;
     ![[set]] %ChallengeAuth.User $?=&amp;quot;Q account name?&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   [[return]] %ChallengeAuth.User&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [[alias]] -l ChallengeAuth.Password {&lt;br /&gt;
   [[return]] $ChallengeAuth.CreateHash($ChallengeAuth.Username, $?*=&amp;quot;Password for Q account name: $ChallengeAuth.Username &amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ; DONT CHANGE ANYTHING UNDER THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING&lt;br /&gt;
  &lt;br /&gt;
 [[alias]] -l ChallengeAuth.Q { [[return]] Q@CServe.quakenet.org }&lt;br /&gt;
 &lt;br /&gt;
 ; id = whether autoauth is on or not.&lt;br /&gt;
 ; $1 = 1 for autoauth or 0 for not.&lt;br /&gt;
 [[alias]] ChallengeAuth.AutoAuth {&lt;br /&gt;
   [[If-Then-Else|if]] ([[$isid]]) [[return]] %ChallengeAuth.AutoAuth&lt;br /&gt;
 &lt;br /&gt;
   [[If-Then-Else|if]] ([[$1-|$1]] == [[$null]]) {&lt;br /&gt;
     [[echo]] -at ChallengeAuth: Not enough parameters.&lt;br /&gt;
     [[return]]&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   [[If-Then-Else|if]] ([[$1-|$1]] !isin 01) {&lt;br /&gt;
     [[echo]] -at ChallengeAuth: Invalid parameter. Please enter 1 to enable or 0 to disable.&lt;br /&gt;
     [[return]]&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   [[set]] %ChallengeAuth.AutoAuth [[$1-|$1]]&lt;br /&gt;
   [[echo]] -at ChallengeAuth: Automatic authentication is now [[$iif]](%ChallengeAuth.AutoAuth, ON, OFF)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; $1 = string to lower&lt;br /&gt;
 [[alias]] -l ChallengeAuth.IRCToLower {&lt;br /&gt;
   [[return]] [[$replacex]]([[$lower]]([[$1-|$1]]),[[$chr]](91),[[$chr]](123),[[$chr]](93),[[$chr]](125),[[$chr]](92),[[$chr]](124),[[$chr]](94),[[$chr]](126))&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; $1 = Authname, $2 = Password&lt;br /&gt;
 [[alias]] ChallengeAuth.CreateHash {&lt;br /&gt;
   [[If-Then-Else|if]] (![[$1-|$2]]) {&lt;br /&gt;
     [[echo]] -ta ChallengeAuth: Not enough values given.&lt;br /&gt;
     [[return]]&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   ![[Local_Variables|var]] %ChallengeAuth.Hash = [[$sha256]]([[DollarPlus|$+]]($ChallengeAuth.IRCToLower([[$1-|$1]]),:,[[$sha256]]([[$left]]([[$1-|$2]],10))))&lt;br /&gt;
 &lt;br /&gt;
   [[If-Then-Else|if]] ([[$isid]]) [[return]] %ChallengeAuth.Hash&lt;br /&gt;
 &lt;br /&gt;
   ![[echo]] -atg ChallengeAuth: Hashed user/pass: %ChallengeAuth.Hash&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; Unsets challengeauth vars&lt;br /&gt;
 [[alias]] -l ChallengeAuth.Clear {&lt;br /&gt;
   ![[Unset|unset]] %ChallengeAuth.Active&lt;br /&gt;
   ![[Unset|unset]] %ChallengeAuth.Pass&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; $1 = Challenge&lt;br /&gt;
 [[alias]] -l ChallengeAuth.Auth {&lt;br /&gt;
   !.[[msg]] $ChallengeAuth.Q CHALLENGEAUTH %ChallengeAuth.User [[$hmac]]([[$1-|$1]], %ChallengeAuth.Pass, sha256) HMAC-SHA-256&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [[alias]] ChallengeAuth {&lt;br /&gt;
   ; If username and password weren&amp;#039;t supplied, use the defaults.&lt;br /&gt;
   [[If-Then-Else|if]] (![[$1-|$1]]) {&lt;br /&gt;
     [[tokenize]] 32 $ChallengeAuth.Username $ChallengeAuth.Password&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   [[If-Then-Else|if]] (![[$1-|$2]]) {&lt;br /&gt;
     [[echo]] -at ChallengeAuth: No Password specified.&lt;br /&gt;
     [[return]]&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   ![[set]] %ChallengeAuth.Active [[$true]]&lt;br /&gt;
   ![[set]] %ChallengeAuth.User [[$1-|$1]]&lt;br /&gt;
   ![[set]] %ChallengeAuth.Pass [[$1-|$2]]&lt;br /&gt;
 &lt;br /&gt;
   [[echo]] -at ChallengeAuth: ChallengeAuth is beginning.&lt;br /&gt;
   !.[[msg]] $ChallengeAuth.Q challenge&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 on *:CONNECT: {&lt;br /&gt;
   [[If-Then-Else|if]] (($ChallengeAuth.AutoAuth) &amp;amp;&amp;amp; ([[$network]] == QuakeNet) &amp;amp;&amp;amp; ([[$right]]([[$server]], 13) === .quakenet.org)) {&lt;br /&gt;
     ChallengeAuth $ChallengeAuth.Username $ChallengeAuth.Password&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 on ^*:NOTICE:*:?: {&lt;br /&gt;
   ChallengeAuth.ExecuteInput [[$1-|$1-]]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 on ^*:TEXT:*:?: {&lt;br /&gt;
   ChallengeAuth.ExecuteInput [[$1-|$1-]]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [[alias]] -l ChallengeAuth.ExecuteInput {&lt;br /&gt;
 &lt;br /&gt;
   [[If-Then-Else|if]] ($fulladdress === Q!TheQBot@CServe.quakenet.org) &amp;amp;&amp;amp; ([[$network]] === QuakeNet) &amp;amp;&amp;amp; ([[$right]]([[$server]], 13) === .quakenet.org) {&lt;br /&gt;
     [[If-Then-Else|if]] ([[$1-|$1]] === CHALLENGE) &amp;amp;&amp;amp; ([[$len]]([[$1-|$2]]) == 32) &amp;amp;&amp;amp; (%ChallengeAuth.Active) {&lt;br /&gt;
       [[If-Then-Else|if]] ([[$istok]]([[$1-|$3-]], HMAC-SHA-256, 32)) {&lt;br /&gt;
         .timer 1 0 ChallengeAuth.Auth [[$1-|$2]]&lt;br /&gt;
       }&lt;br /&gt;
       [[If-Then-Else|else]] {&lt;br /&gt;
         [[echo]] -ts ChallengeAuth: HMAC-SHA-256 is not supported. ChallengeAuth is NOT continuing.&lt;br /&gt;
         ChallengeAuth.Clear&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
     [[If-Then-Else|elseif]] ([[$1-|$1-]] == CHALLENGE is not available once you have authed.) &amp;amp;&amp;amp; (%ChallengeAuth.Active) {&lt;br /&gt;
       [[echo]] -ts ChallengeAuth: You are already authed!&lt;br /&gt;
       ChallengeAuth.Clear&lt;br /&gt;
     }&lt;br /&gt;
     [[If-Then-Else|elseif]] ([[$1-|$1-6]] == You are now logged in as) &amp;amp;&amp;amp; (%ChallengeAuth.Active) {&lt;br /&gt;
       [[echo]] -ts ChallengeAuth: You are now authed as ***&lt;br /&gt;
       ChallengeAuth.Clear&lt;br /&gt;
     }&lt;br /&gt;
     [[If-Then-Else|elseif]] ([[$1-|$1-]] == Username or password incorrect.) &amp;amp;&amp;amp; (%ChallengeAuth.Active) {&lt;br /&gt;
       [[echo]] -ts ChallengeAuth: Username or password incorrect.&lt;br /&gt;
       ChallengeAuth.Clear&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 raw 401:*: {&lt;br /&gt;
   [[If-Then-Else|if]] ([[$1-|$1-]] == [[$me]] $ChallengeAuth.Q No such nick) &amp;amp;&amp;amp; (%ChallengeAuth.Active) {&lt;br /&gt;
     [[echo]] -ts ChallengeAuth: Q is currently not reachable. Please try again later.&lt;br /&gt;
     ChallengeAuth.Clear&lt;br /&gt;
     [[haltdef]]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Joining channels after hiding your address]]&lt;/div&gt;</summary>
		<author><name>NaNg</name></author>
	</entry>
</feed>