Skip to main content

A Python library for generating random SSL.

Project description

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 - 安装

pip install randssl

Usage - 使用

requests

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

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黑名单

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

randssl-0.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

randssl-0.0.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file randssl-0.0.2.tar.gz.

File metadata

  • Download URL: randssl-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for randssl-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e115ca4acdada8e8b1304062c4b21d2f2efef26056f8eea1c4ae0bab526280f5
MD5 1c406737436e42a7a338a4a24842ea43
BLAKE2b-256 9a1861a8499f4c608bf85b470d73ef343c1214d58d3660faf785672bcd456d0e

See more details on using hashes here.

File details

Details for the file randssl-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: randssl-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for randssl-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7bede09b8f251307af16dddf4e373dd61a3144a14b4f257d8656a9a1e95a6366
MD5 602684196aee261cd96c42cb1bad1f91
BLAKE2b-256 5d950761bbf67c2de51f5a6c8463f3d25f42dd366768a489d9c7d8aff7e3d1eb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page