Secure your IRCd.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
431 B

#!/usr/bin/env python3
import socket
import sys
HOST = sys.argv[1]
PORT = 6667
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
while 1:
conn, addr = s.accept()
#print('Connection accept: %s' % (addr[0]))
conn.sendall(':irc.example.org ERROR Please use TLS (SSL) to connect to this IRC network on port 6697\r\n'.encode('utf-8'))
conn.close()
#print('Connection close: %s' % (addr[0]))