We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa8213b commit a25c215Copy full SHA for a25c215
pythonbits/api_utils.py
@@ -3,12 +3,15 @@
3
4
from .config import config
5
6
-seed = config.get('Tracker', 'domain').encode('utf8')
7
-test = sha224(seed).hexdigest()
8
-if not test.endswith('f280f') and not test.endswith('5abc3'):
9
- raise Exception('Wrong domain! Manually fix {}'.format(config.config_path))
10
-psk = sha256(seed).hexdigest()
11
+def get_psk():
+ seed = config.get('Tracker', 'domain').encode('utf8')
+ test = sha224(seed).hexdigest()
+ if not test.endswith('f280f') and not test.endswith('5abc3'):
+ raise Exception('Wrong domain! '
12
+ 'Manually fix {}'.format(config.config_path))
13
+ return sha256(seed).hexdigest()
14
15
def d(a):
16
+ psk = get_psk()
17
return "".join([chr(ord(a[i]) ^ ord(psk[i])) for i in range(len(a))])
0 commit comments