added jspl_encoder_wrapper.py

This commit is contained in:
2025-08-13 16:26:49 +02:00
parent 9b191be6d6
commit 32eb83c5d6
6 changed files with 122 additions and 40 deletions
+5 -3
View File
@@ -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,