Advertisement
den4ik2003

Untitled

Jul 26th, 2024
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 2.55 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     "log"
  5.     "time"
  6.  
  7.     "github.com/tebeka/selenium"
  8.     "github.com/tebeka/selenium/chrome"
  9. )
  10.  
  11. func main() {
  12.     service, err := selenium.NewChromeDriverService("./chromedriver", 4444)
  13.  
  14.     if err != nil {
  15.         log.Fatal("Error:", err)
  16.     }
  17.  
  18.     defer service.Stop()
  19.  
  20.     caps := selenium.Capabilities{}
  21.     caps.AddChrome(chrome.Capabilities{Args: []string{
  22.         // "--headless", // comment out this line for testing
  23.     }})
  24.     driver, err := selenium.NewRemote(caps, "")
  25.  
  26.     err = driver.Get("https://csgorun.bet")
  27.  
  28.     el, _ := driver.FindElement(selenium.ByXPATH, "/html/body/div[1]/div[2]/div/div[1]/header/button")
  29.  
  30.     err = el.Click()
  31.     if err != nil {
  32.         log.Fatal(err)
  33.     }
  34.  
  35.     el_steam, _ := driver.FindElement(selenium.ByXPATH, "/html/body/div[3]/div/div[2]/div/button[1]")
  36.     el_steam.Click()
  37.  
  38.     cookie_browserid := &selenium.Cookie{
  39.         Name:   "browserid",
  40.         Value:  "3322051912952820891",
  41.         Path:   "/",
  42.         Domain: "steamcommunity.com",
  43.         Secure: true,
  44.     }
  45.     driver.AddCookie(cookie_browserid)
  46.  
  47.     cookie_sessionid := &selenium.Cookie{
  48.         Name:   "sessionid",
  49.         Value:  "9da85af759091ebcfa385cd9",
  50.         Path:   "/",
  51.         Domain: "steamcommunity.com",
  52.         Secure: true,
  53.     }
  54.  
  55.     driver.AddCookie(cookie_sessionid)
  56.  
  57.     cookie_secureid := &selenium.Cookie{
  58.         Name:   "sessionidSecureOpenIDNonce",
  59.         Value:  "d85b6cf6f0a59f665abdecfc",
  60.         Path:   "/",
  61.         Domain: "steamcommunity.com",
  62.         Secure: true,
  63.     }
  64.  
  65.     driver.AddCookie(cookie_secureid)
  66.  
  67.     cookie_steamCountry := &selenium.Cookie{
  68.         Name:   "steamCountry",
  69.         Value:  "RU%7Cd32000312352e1c4d2cfc30dd94113d0",
  70.         Path:   "/",
  71.         Domain: "steamcommunity.com",
  72.         Secure: true,
  73.     }
  74.  
  75.     cookie_steamLoginSecure := &selenium.Cookie{
  76.         Name:   "steamLoginSecure",
  77.         Value:  "76561199299175343%7C%7CeyAidHlwIjogIkpXVCIsICJhbGciOiAiRWREU0EiIH0.eyAiaXNzIjogInI6MEY5MV8yNEM5RDIzRV9BMzc0QiIsICJzdWIiOiAiNzY1NjExOTkyOTkxNzUzNDMiLCAiYXVkIjogWyAid2ViOmNvbW11bml0eSIgXSwgImV4cCI6IDE3MjIwOTMyODgsICJuYmYiOiAxNzEzMzY2MTQzLCAiaWF0IjogMTcyMjAwNjE0MywgImp0aSI6ICIwRjg0XzI0QzlEMjQwXzdFNUVFIiwgIm9hdCI6IDE3MjIwMDYxNDMsICJydF9leHAiOiAxNzQwMjM1NzQ5LCAicGVyIjogMCwgImlwX3N1YmplY3QiOiAiOTUuMjIxLjE3MC4xMDQiLCAiaXBfY29uZmlybWVyIjogIjk1LjIyMS4xNzAuMTA0IiB9.C77oCmH8hNLGIiz3jbppjCDpkxg49wRtzKPs5o_u21dsijhhkCKN-BBhG7pHHDHT_e2jSmlvqd_OGVDb-Rv7DA",
  78.         Path:   "/",
  79.         Domain: "steamcommunity.com",
  80.         Secure: true,
  81.     }
  82.  
  83.     cookie_timezoneOffset := &selenium.Cookie{
  84.         Name:   "timezoneOffset",
  85.         Value:  "10800,0",
  86.         Domain: "steamcommunity.com",
  87.         Secure: false,
  88.     }
  89.  
  90.     // err = driver.Get("https://csgorun.bet/crash")
  91.  
  92.     time.Sleep(6000 * time.Second)
  93. }
  94.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement