use sha1 generate flag
This commit is contained in:
4
mswp.py
4
mswp.py
@@ -46,9 +46,9 @@ class Datapack:
|
|||||||
self.head['from'] = process_plugins_name(self.head['from'])
|
self.head['from'] = process_plugins_name(self.head['from'])
|
||||||
if gen_flag:
|
if gen_flag:
|
||||||
randseed = str(random.random()).encode()
|
randseed = str(random.random()).encode()
|
||||||
h = hashlib.blake2b(digest_size = 4)
|
h = hashlib.sha1()
|
||||||
h.update(randseed)
|
h.update(randseed)
|
||||||
self.head['flag'] = h.hexdigest()
|
self.head['flag'] = h.hexdigest()[:8]
|
||||||
|
|
||||||
def encode(self):
|
def encode(self):
|
||||||
if self.method == 'file':
|
if self.method == 'file':
|
||||||
|
|||||||
Reference in New Issue
Block a user