From 25aacbd1fa8595a6e5066d80ba390e49044b4685 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 17 Apr 2016 22:31:11 -0700 Subject: [PATCH] nefarious: actually check RECVPASS --- protocols/nefarious.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/protocols/nefarious.py b/protocols/nefarious.py index 56b5c7c..041a891 100644 --- a/protocols/nefarious.py +++ b/protocols/nefarious.py @@ -850,6 +850,12 @@ class P10Protocol(Protocol): # no IRCds can ever connect behind us... self._send(self.irc.sid, 'Z %s %s %s %s' % (target, orig_pingtime, timediff, currtime)) + def handle_pass(self, source, command, args): + """Handles authentication with our uplink.""" + # <- PASS :testpass + if args[0] != self.irc.serverdata['recvpass']: + raise ProtocolError("Error: RECVPASS from uplink does not match configuration!") + def handle_pong(self, source, command, args): """Handles incoming PONGs.""" # <- AB Z AB :Ay