lexiforest / curl_cffi

Python binding for curl-impersonate fork via cffi. A http client that can impersonate browser tls/ja3/http2 fingerprints.
https://curl-cffi.readthedocs.io/
MIT License
2.44k stars 263 forks source link

different impersonate with the same hash #100

Closed hosny105 closed 1 year ago

hosny105 commented 1 year ago

hi bro wish u all best and thanks you for your effort and sharing your idea >> im not professional at programming but i love to learn and try new idea i have problem with your module in win 11 i installed and when i try to get ja3 hash with different impersonate its give me the same hash for all browsers ,,, i dont know what is the problem and i try to search about the problem but i dont found any thing

perklet commented 1 year ago

For some browser versions, their fingerprints are actually the same, but not all of them. Did you try safari15_3 vs chrome107? If they are still the same, please post minimal reproducible code here.

hosny105 commented 1 year ago

this is the result for all browser .. and you see if there some wrong or thing is fine ,, and whin i try chrome 110 its give me a random ja3 hash

============================== requests.get("https://tls.browserleaks.com/json", impersonate="chrome110").json() {'ja3_hash': 'f451a9b8b859a3cb42cb6e63c490851c', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-35-18-23-16-13-11-65281-43-5-10-17513-27-45-51-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': 'a345a694846ad9f6c97bcc3c75adbe26', 'akamai_text': '1:65536;2:0;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="chrome99").json() {'ja3_hash': 'cd08e31494f9531f560d64c695473da9', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': '4f04edce68a7ecbe689edce7bf5f23f3', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="chrome100").json() {'ja3_hash': 'cd08e31494f9531f560d64c695473da9', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': '4f04edce68a7ecbe689edce7bf5f23f3', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="chrome101").json() {'ja3_hash': 'cd08e31494f9531f560d64c695473da9', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': '4f04edce68a7ecbe689edce7bf5f23f3', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="chrome104").json() {'ja3_hash': 'cd08e31494f9531f560d64c695473da9', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': '4f04edce68a7ecbe689edce7bf5f23f3', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="chrome107").json() {'ja3_hash': 'cd08e31494f9531f560d64c695473da9', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': 'a345a694846ad9f6c97bcc3c75adbe26', 'akamai_text': '1:65536;2:0;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="chrome99_android").json() {'ja3_hash': 'cd08e31494f9531f560d64c695473da9', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': '4f04edce68a7ecbe689edce7bf5f23f3', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="edge99").json() {'ja3_hash': 'cd08e31494f9531f560d64c695473da9', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': '4f04edce68a7ecbe689edce7bf5f23f3', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="edge101").json() {'ja3_hash': 'cd08e31494f9531f560d64c695473da9', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': '4f04edce68a7ecbe689edce7bf5f23f3', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="safari15_3").json() {'ja3_hash': '656b9a2f4de6ed4909e157482860ab3d', 'ja3_text': '771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49188-49187-49162-49161-49192-49191-49172-49171-157-156-61-60-53-47-49160-49170-10,0-23-65281-10-11-16-5-13-18-51-45-43-21,29-23-24-25,0', 'ja3n_hash': '4e732e0294d23442159b756947e9daba', 'ja3n_text': '771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49188-49187-49162-49161-49192-49191-49172-49171-157-156-61-60-53-47-49160-49170-10,0-5-10-11-13-16-18-21-23-43-45-51-65281,29-23-24-25,0', 'akamai_hash': '9644a86c623cf05421df901accda66ca', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,s,p,a'}

requests.get("https://tls.browserleaks.com/json", impersonate="safari15_5").json() {'ja3_hash': '773906b0efdefa24a7f2b8eb6985bf37', 'ja3_text': '771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49162-49161-49172-49171-157-156-53-47-49160-49170-10,0-23-65281-10-11-16-5-13-18-51-45-43-27-21,29-23-24-25,0', 'ja3n_hash': '44f7ed5185d22c92b96da72dbe68d307', 'ja3n_text': '771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49162-49161-49172-49171-157-156-53-47-49160-49170-10,0-5-10-11-13-16-18-21-23-27-43-45-51-65281,29-23-24-25,0', 'akamai_hash': '9644a86c623cf05421df901accda66ca', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,s,p,a'}

requests.get("https://tls.browserleaks.com/json", impersonate="safari15_5").json() {'ja3_hash': '773906b0efdefa24a7f2b8eb6985bf37', 'ja3_text': '771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49162-49161-49172-49171-157-156-53-47-49160-49170-10,0-23-65281-10-11-16-5-13-18-51-45-43-27-21,29-23-24-25,0', 'ja3n_hash': '44f7ed5185d22c92b96da72dbe68d307', 'ja3n_text': '771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49162-49161-49172-49171-157-156-53-47-49160-49170-10,0-5-10-11-13-16-18-21-23-27-43-45-51-65281,29-23-24-25,0', 'akamai_hash': '9644a86c623cf05421df901accda66ca', 'akamai_text': '1:65536;3:1000;4:6291456;6:262144|15663105|0|m,s,p,a'}

requests.get("https://tls.browserleaks.com/json", impersonate="chrome110").json() {'ja3_hash': 'a6999dd6b192356e2118d70c06d94466', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,45-17513-18-0-35-23-16-13-43-11-5-27-10-51-65281-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': 'a345a694846ad9f6c97bcc3c75adbe26', 'akamai_text': '1:65536;2:0;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

requests.get("https://tls.browserleaks.com/json", impersonate="chrome110").json() {'ja3_hash': '1c028cfdb5d66d3857f32ddbef11fdf9', 'ja3_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-11-23-43-17513-65281-16-5-18-10-51-27-13-35-45-21,29-23-24,0', 'ja3n_hash': 'aa56c057ad164ec4fdcb7a5a283be9fc', 'ja3n_text': '771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-5-10-11-13-16-18-21-23-27-35-43-45-51-17513-65281,29-23-24,0', 'akamai_hash': 'a345a694846ad9f6c97bcc3c75adbe26', 'akamai_text': '1:65536;2:0;3:1000;4:6291456;6:262144|15663105|0|m,a,s,p'}

perklet commented 1 year ago

This is the expected behavior, for chrome101 ~ 107, the fingerprints are the same, for chrome 110+, Google introduced a behavior called extension permutation, but the ja3n fingerprint remains the same for each request. See the FAQ section for more details.