mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Made jamessan's code agree with his comment (and the maximum integer that can fit into two bytes).
This commit is contained in:
parent
699bb15f23
commit
bec12b6877
@ -113,7 +113,7 @@ class Unix(callbacks.Plugin):
|
|||||||
def makeSalt():
|
def makeSalt():
|
||||||
s = '\x00'
|
s = '\x00'
|
||||||
while self._cryptre.sub('', s) != '':
|
while self._cryptre.sub('', s) != '':
|
||||||
s = struct.pack('<h', random.randrange(-(2**15), 2**15))
|
s = struct.pack('<h', random.randrange(-(2**15), 2**15-1))
|
||||||
return s
|
return s
|
||||||
if not salt:
|
if not salt:
|
||||||
salt = makeSalt()
|
salt = makeSalt()
|
||||||
|
Loading…
Reference in New Issue
Block a user