mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Use a site games salt, and use more random bits for the server seed
This commit is contained in:
parent
c03f518b96
commit
7b95991248
2 changed files with 4 additions and 2 deletions
|
@ -13,6 +13,7 @@ import random
|
||||||
import hashlib
|
import hashlib
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
|
from Crypto.Random.random import getrandbits
|
||||||
import tipbot.coinspecs as coinspecs
|
import tipbot.coinspecs as coinspecs
|
||||||
from tipbot.command_manager import *
|
from tipbot.command_manager import *
|
||||||
from utils import *
|
from utils import *
|
||||||
|
@ -101,8 +102,8 @@ def GetServerSeed(link,game):
|
||||||
def GenerateServerSeed(link,game):
|
def GenerateServerSeed(link,game):
|
||||||
identity=link.identity()
|
identity=link.identity()
|
||||||
try:
|
try:
|
||||||
salt="kfn3kjg4nkngvekjvn3u4vgb" + ":" + game
|
salt="kfn3kjg4nkngvekjvn3u4vgb:" + config.site_game_salt + ":" + game
|
||||||
s=salt+":"+identity+":"+str(time.time())+":"+str(random.randint(0,1000000))
|
s=salt+":"+identity+":"+str(time.time())+":"+str(getrandbits(128))
|
||||||
seed=hashlib.sha256(s).hexdigest()
|
seed=hashlib.sha256(s).hexdigest()
|
||||||
SetServerSeed(link,game,seed)
|
SetServerSeed(link,game,seed)
|
||||||
except Exception,e:
|
except Exception,e:
|
||||||
|
|
|
@ -26,6 +26,7 @@ withdrawal_mixin=0
|
||||||
disable_withdraw_on_error = True
|
disable_withdraw_on_error = True
|
||||||
payment_confirmations = 6
|
payment_confirmations = 6
|
||||||
tipbot_balance_cache_time = 35 # seconds
|
tipbot_balance_cache_time = 35 # seconds
|
||||||
|
site_game_salt = ''
|
||||||
|
|
||||||
admins = ["freenode:moneromooo", "freenode:moneromoo"]
|
admins = ["freenode:moneromooo", "freenode:moneromoo"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue