added jspl_encoder_wrapper.py
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
|
||||
def encrpte_to_jspl(fingerprint):
|
||||
def encrpte_to_jspl(fingerprint_json):
|
||||
dir = os.path.dirname(__file__)
|
||||
# print(fingerprint_json)
|
||||
p = subprocess.Popen(['node', dir + '/jspl_encoder.js', fingerprint_json], stdout=subprocess.PIPE)
|
||||
_timestamp = int(time.time())
|
||||
p = subprocess.Popen(['node', dir + '/jspl_encoder.js', fingerprint_json, str(_timestamp)], stdout=subprocess.PIPE)
|
||||
encrypted_fingerprint = p.stdout.read()
|
||||
_result = encrypted_fingerprint.decode('utf-8')
|
||||
return _result
|
||||
@@ -44,7 +46,7 @@ if __name__ == '__main__':
|
||||
"nm": False,
|
||||
"geb": False,
|
||||
"sqt": False,
|
||||
"pf": "MacIntel",
|
||||
"pf": "Linux armv81",
|
||||
"hc": 8,
|
||||
"br_oh": 745,
|
||||
"br_ow": 393,
|
||||
|
||||
Reference in New Issue
Block a user