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
430 B

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