File size: 304 Bytes
d7ea605 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
"""
send a "quit" signal to a remote server
"""
from __future__ import annotations
import socket
import sys
host, port = sys.argv[1].split(":")
hostport = (host, int(port))
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(hostport)
sock.sendall(b'"raise KeyboardInterrupt"\n')
|