Socket
Socket
Sign inDemoInstall

randssl

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

randssl

A Python library for generating random SSL.


Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc