mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-22 12:13:58 +08:00
猿人学第19题-Ja3指纹加密
This commit is contained in:
parent
1fc081164e
commit
26392cbbaa
@ -2,3 +2,4 @@ js逆向知识-Ja3指纹学习
|
||||
|
||||
https://blog.csdn.net/weixin_43411585/article/details/122314214
|
||||
|
||||
https://jishuin.proginn.com/p/763bfbd73fc3
|
40
猿人学第19题-Ja3指纹加密/测试2.py
Normal file
40
猿人学第19题-Ja3指纹加密/测试2.py
Normal file
@ -0,0 +1,40 @@
|
||||
from requests.adapters import HTTPAdapter
|
||||
from requests.packages.urllib3.util.ssl_ import create_urllib3_context
|
||||
import random
|
||||
|
||||
ORIGIN_CIPHERS = ('ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:'
|
||||
'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES')
|
||||
|
||||
|
||||
class DESAdapter(HTTPAdapter):
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
A TransportAdapter that re-enables 3DES support in Requests.
|
||||
"""
|
||||
CIPHERS = ORIGIN_CIPHERS.split(':')
|
||||
random.shuffle(CIPHERS)
|
||||
CIPHERS = ':'.join(CIPHERS)
|
||||
self.CIPHERS = CIPHERS + ':!aNULL:!eNULL:!MD5'
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def init_poolmanager(self, *args, **kwargs):
|
||||
context = create_urllib3_context(ciphers=self.CIPHERS)
|
||||
kwargs['ssl_context'] = context
|
||||
return super(DESAdapter, self).init_poolmanager(*args, **kwargs)
|
||||
|
||||
def proxy_manager_for(self, *args, **kwargs):
|
||||
context = create_urllib3_context(ciphers=self.CIPHERS)
|
||||
kwargs['ssl_context'] = context
|
||||
return super(DESAdapter, self).proxy_manager_for(*args, **kwargs)
|
||||
|
||||
|
||||
import requests
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)'
|
||||
' Chrome/92.0.4515.131 Safari/537.36 Edg/92.0.902.67'}
|
||||
s = requests.Session()
|
||||
s.headers.update(headers)
|
||||
|
||||
for _ in range(5):
|
||||
s.mount('https://ja3er.com', DESAdapter())
|
||||
resp = s.get('https://ja3er.com/json').json()
|
||||
print(resp)
|
Loading…
x
Reference in New Issue
Block a user