Skip to content

Instantly share code, notes, and snippets.

@dardo82
Last active March 17, 2021 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dardo82/ceb087e800b60b39c5ec40c5e491f37f to your computer and use it in GitHub Desktop.
Save dardo82/ceb087e800b60b39c5ec40c5e491f37f to your computer and use it in GitHub Desktop.
WebDriver DiceBot BitCoin
#!/usr/bin/env python
# 999dice.com claim faucet
import sys
import time
from selenium import webdriver as WD
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait as WDW
from selenium.webdriver.support import expected_conditions as EC
CO = WD.ChromeOptions()
CO.binary_location = sys.argv[2]
CO.add_argument("--user-data-dir="+sys.argv[3])
CO.add_experimental_option(
"excludeSwitches", ["use-mock-keychain"])
WDCO = WD.Chrome(options=CO)
WDCO.get(sys.argv[1])
time.sleep(1)
WDCO.find_element(
By.CSS_SELECTOR, "input[type=submit]").click()
WDW(WDCO,1).until(EC.element_to_be_clickable((
By.CSS_SELECTOR, "#ShowFaucetBoxButton > .CurrencyFullName"))).click()
WDW(WDCO,1).until(EC.element_to_be_clickable((
By.CSS_SELECTOR, ".FaucetClaimTitle > .CurrencyFullName"))).click()
time.sleep(1)
solution = WDCO.find_element(
By.CSS_SELECTOR, "#SimpleCaptchaContainer > span").get_attribute("data-pass")
WDW(WDCO,1).until(EC.element_to_be_clickable((
By.CSS_SELECTOR, "#SimpleCaptchaContainer > input"))).click()
WDCO.find_element(
By.CSS_SELECTOR, "#SimpleCaptchaContainer > input").send_keys(solution)
WDW(WDCO,1).until(EC.element_to_be_clickable((
By.CSS_SELECTOR, "#SimpleCaptchaContainer > .TextButton"))).click()
time.sleep(1)
WDCO.quit()
-- dicebot.lua
chance = (100-1)/3 -- sets your chance for placing a bet
bethigh = true -- bet high when true, bet low when false
nextbet = balance/10000 -- sets your first bet
function getmulti()
payout=(100-1)/chance
return payout/(payout-1)
end
function dobet()
if balance > 1 then
stop()
end
if !win then
nextbet = previousbet * getmulti()
else
if currentstreak > 1 then
nextbet = previousbet * getmulti()
else
nextbet = balance/10000
end
end
if nextbet > balance then
nextbet = balance
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment