mirror of
https://github.com//cppla/ServerStatus
synced 2025-09-01 23:42:21 +08:00
ipv6, ipv4 for client
This commit is contained in:
parent
d94e6cadbf
commit
ddea313536
@ -280,8 +280,7 @@ if __name__ == '__main__':
|
||||
while True:
|
||||
try:
|
||||
print("Connecting...")
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((SERVER, PORT))
|
||||
s = socket.create_connection((SERVER, PORT))
|
||||
data = byte_str(s.recv(1024))
|
||||
if data.find("Authentication required") > -1:
|
||||
s.send(byte_str(USER + ':' + PASSWORD + '\n'))
|
||||
|
@ -260,8 +260,7 @@ if __name__ == '__main__':
|
||||
while 1:
|
||||
try:
|
||||
print("Connecting...")
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((SERVER, PORT))
|
||||
s = socket.create_connection((SERVER, PORT))
|
||||
data = byte_str(s.recv(1024))
|
||||
if data.find("Authentication required") > -1:
|
||||
s.send(byte_str(USER + ':' + PASSWORD + '\n'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user