forked from Slenderman00/grindr-access
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmpp.py
More file actions
18 lines (15 loc) · 681 Bytes
/
xmpp.py
File metadata and controls
18 lines (15 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import socket
import ssl
def connect(plainToken):
hostname = "chat.grindr.com"
context = ssl.create_default_context()
with socket.create_connection((hostname, 453)) as sock:
with context.wrap_socket(sock, server_hostname=hostname) as secure_sock:
print(secure_sock.version())
secure_sock.send(
f"<session to='chat.grindr.com' auth_data='{plainToken}' resource='3e6f228230b9c7b3' stream_management='true' carbons='true' compress='false'>".encode()
)
while True:
msgReceived = secure_sock.recv(2048)
if msgReceived:
print(msgReceived.decode())