25 lines
533 B
Python
25 lines
533 B
Python
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://gitea.gulyaipole.fun/justuser/p2p_justuser/raw/branch/main/list_server.info')
|
|
s_port = int(file.content)
|
|
|
|
# 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')
|