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.

32 lines
536 B

import sys
import socket
from requests import get # Download file
port = sys.argv[1]
name = sys.argv[2]
##### Send our port to global list
# Get port
host = 'bore.pub'
#file = get('https://gitlab.com/justuser31/p2p_justuser/-/raw/main/list_server.info')
#s_port = int(file.content)
s_port = 43560
# Send our port
client_socket = socket.socket()
client_socket.connect((host, s_port))
# Input name of server
message = str([port, name])
client_socket.send(message.encode())
client_socket.close()
print('SERVER POSTED')