semvec/pypi-packages huggingface dataset:
randssl 0.0.3
A Python library for generating random SSL.
License: MIT

# randssl - 随机ssl

A Python library for generating random SSL. Used to bypass TLS fingerprint checking rules generated by algorithms such as JA3.  
一个可以生成随机SSL的Python库，可以被用来绕过JA3等算法生成的TLS指纹检查规则。

# Quick start - 快速开始

## Install - 安装

```sh
pip install randssl
```

## Usage - 使用

### requests

```python
import requests

from randssl import randssl
from requests.adapters import HTTPAdapter


class RandsslAdapter(HTTPAdapter):
    def init_poolmanager(self, *args, **kwargs):
        context = randssl()
        kwargs["ssl_context"] = context
        return super(RandsslAdapter, self).init_poolmanager(*args, **kwargs)


with requests.Session() as sess:
    sess.mount(prefix="https://www.baidu.com", adapter=RandsslAdapter())
    resp = sess.get(url="https://www.baidu.com")
    print(resp.content)
```

### aiohttp

```python
import aiohttp
import asyncio

from randssl import randssl


async def main():
    async with aiohttp.ClientSession() as sess:
        async with sess.get(url="https://www.baidu.com", ssl=randssl()) as resp:
            print(await resp.content.read())


asyncio.run(main())
```

# Todo 未来

- Collect the TLS blacklist of WAF - 收集WAF的TLS黑名单