Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.0 kB
2
Indexable
Never
import websocket


header = [
        "Pragma: no-cache",
        "Cache-Control: no-cache",
        "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36",
        "Accept-Encoding: gzip, deflate, br",
        "Accept-Language: en-GB,en-US;q=0.9,en;q=0.8",
        "Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits",
        "Sec-WebSocket-Protocol: graphql-transport-ws"]
msg_con = '{"type":"connection_init"}'
cookie = "__cf_bm=FRBkAbP0p3a0WlgcZiDVxgcNE.91uUILQuOZWnRafrY-1682459811-0-AUB2xa8c846ohspCKSjSbwrQxP+G1XnrkBGzrcAdbrBHpD3K0SBdOTGP/h7n/9EZrQI/Gbm7LBYucdi35t6uViV0ojX7ns1Wo2Bl6IOwj0sW8g6kfMxJzqYWZrydz6vZKeutXT31YFACpx4kldVG97Y="

websocket.enableTrace(True)
ws = websocket.create_connection("wss://api.csgoroll.com/graphql", header=header, origin="https://www.csgoroll.com", cookie=cookie)
ws.send(msg_con)
while not "connection_ack" in ws.recv():
    pass
print("connected")

while True:
    pass