Answer the question
In order to leave comments, you need to log in
Python md5 hash not matching?
Hello.
There is a kind of php code:
$salt = "21x1231";
$code = file_get_contetns('api...');
$code = json_decode($code, true);
$token = $code->token;
$hash = strtolower(md5($token.salt));
$data = file_get_contents('url?param='.$token.'&tok='.$hash);
import hashlib
import urllib
import json
salt = "21x1231".encode()
code_request = urllib.request.urlopen('api..').read()
code = json.loads(code_request)
hash = hashlib.md5(code['token'].encode() + salt).hexdigest()
rq = urllib.request.urlopen("api?param=%s&tok=%s" % (code['token'], hash.lower())).read()
Answer the question
In order to leave comments, you need to log in
php code is complete trash, which does not work at all:
$salt = "21x1231";
$code = file_get_contetns('api...');
$code = json_decode($code);
$token = $code->token;
$hash = strtolower(md5($token.$salt));
$data = file_get_contents('url?param='.$token.'&tok='.$hash);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question