{"id":22353947,"url":"https://github.com/5eroo/venus-chub-wrapper","last_synced_at":"2025-07-26T03:10:56.677Z","repository":{"id":244643214,"uuid":"815673040","full_name":"5eroo/Venus-Chub-Wrapper","owner":"5eroo","description":"A Wrapper for https://venus.chub.ai to create accounts and access premium LLMs using local Python scripts.","archived":false,"fork":false,"pushed_at":"2024-06-16T09:53:03.000Z","size":55,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T17:08:39.843Z","etag":null,"topics":["ai","asha","llm","mistral","mixtral","py","py3","python","reverse-engineering","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/5eroo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-15T19:43:40.000Z","updated_at":"2024-06-16T11:17:44.000Z","dependencies_parsed_at":"2024-06-16T11:23:53.306Z","dependency_job_id":"cc06f608-86e5-4e5c-9ec1-cdf88e2191bb","html_url":"https://github.com/5eroo/Venus-Chub-Wrapper","commit_stats":null,"previous_names":["itszerrin/venus-chub-wrapper","5eroo/venus-chub-wrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/5eroo/Venus-Chub-Wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5eroo%2FVenus-Chub-Wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5eroo%2FVenus-Chub-Wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5eroo%2FVenus-Chub-Wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5eroo%2FVenus-Chub-Wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5eroo","download_url":"https://codeload.github.com/5eroo/Venus-Chub-Wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5eroo%2FVenus-Chub-Wrapper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267110030,"owners_count":24037633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","asha","llm","mistral","mixtral","py","py3","python","reverse-engineering","wrapper"],"created_at":"2024-12-04T13:10:33.281Z","updated_at":"2025-07-26T03:10:56.645Z","avatar_url":"https://github.com/5eroo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Venus-Chub-Wrapper\nA Wrapper for https://venus.chub.ai to create accounts and access premium LLMs using local Python scripts.\n\n# Table of Contents\n1. [Introduction](#introduction)\n2. [Setup](#setup)\n3. [Using the Script](#using-the-script)\n4. [Registering an Account](#registering-an-account)\n5. [Logging In](#logging-in)\n6. [Creating a Dummy Chat](#creating-a-dummy-chat)\n7. [Getting Your API Key Automatically](#getting-your-api-key-automatically)\n8. [Closing the Webdriver](#closing-the-webdriver)\n9. [Example 1 - Getting Your API Key](#example-1-getting-your-api-key)\n10. [Chatting with Chub's LLMs](#chatting-with-chubs-llms)\n11. [Example 2 - Full Code to Chat](#example-2-full-code-to-chat)\n\n## Introduction\n\n1. **Purpose**\n\nThe purpose of this script is to demonstrate the capabilities of reverse-engineering with Python. This project is purely for educational purposes and falls under the [GPL-3 License](LICENSE). For more information, you may always contact me under zerrin@zerrin.online. For legal reasons, please thoroughly read [The legal sheet](LEGAL.md)\n\nThis README is beginner-friendly and step-by-step. It takes the process slowly.\n\n2. **Execution**\n\nThis simple project utilizes modules such as ``selenium``, ``requests`` and a bit of exploiting the site's security vulnerabilities and inconsistencies. Adding Cloudflare also won't help - I'll only have to use nodriver instead of selenium\n\n## Set up\n\n1. **Installing needed dependencies**\n\nRun ``git clone https://github.com/Recentaly/Venus-Chub-Wrapper.git``\n\nInstall the dependencies by opening a console in the **Venus-Chub-Wrapper** directory and running ``pip install -r requirements.txt``\n\n## Using the script\n\nFor context, an **example script** is provided. This project only ships individual code snippets to **register** an account, **fetch your Mars Token**, **log in**, and so on. You'll need to make your own **main.py** but this script will guide you in the process. (Update: The main.py was accidentally shipped along. It's just example 2 though. It will be deleted but feel free to check commit logs if you're that clueless)\n\nTo start off, create a **main.py** in the root of the project.\n\n## Section 1: Registering an account\n\nRegistering requires only 2 imports. View below and copy these into your main.py. The first one is needed to get a Cloudflare Cross-Site request forgery token and the second one is the registering function itself.\n\n```py\nfrom assets.scripts.webdriver.csrf_cookie import get_csrf_cookie\nfrom assets.scripts.register import register\n```\n\n(Optional)\n\n```py\nfrom assets.scripts import make_fake_mail, make_fake_password, make_fake_username\n```\n\n`make_fake_mail`: Returns a UUIDv4 + \"@gmail.com\" at the end. \u003cbr\u003e\n`make_fake_password`: Returns a capital I + a UUIDv4 + \"!\" (to meet password criteria) \u003cbr\u003e\n`make_fake_username`: Simply returns a UUIDv4 string.\n\nThis is the first security flaw: Unverified email adresses, even ones completely made up (for example: ihatechildren@trollmailjamaica.com) are permitted and get free API credits.\n\nHere's an example way to run the code:\n\n```py\nfrom assets.scripts.webdriver.csrf_cookie import get_csrf_cookie\nfrom assets.scripts.register import register\n\n# get csrf token\n__csrf_token: str = get_csrf_cookie()\n\n# register\nregister_response = register(fake_email, fake_password, fake_username, fake_username, __csrf_token)\n```\n\nThis registers a burner account and copies the response from the Chub API. Here's an example format of `register_response`:\n\n```json\n{\n    \"git_id\": 73017801,\n    \"samwise\": \"2949skqo-901d-4f87-b22b-7c9b03221baf\",\n    \"username\": \"ihatechildren\"\n}\n```\n\nThe only real important object we need is the `samwise` token. It is used for authentication.\n\n## Section 2: Logging in\n\nLogging in is relatively easy but not needed mostly. Import following modules:\n\n```py\nfrom assets.scripts.webdriver.csrf_cookie import get_csrf_cookie\nfrom assets.scripts.login import login\n```\n\nTo log in, you need following parameters ready:\n\n- Your csrf cookie. Get it by calling ``get_csrf_cookie()``\n- The email you registered with\n- Your password\n\nThen, call the login function\n\n```py\nlogin_response = login(csrf_cookie, email, password)\n```\n\nThis is the resulting output format as an example:\n\n```json\n{\n  \"git_id\": 73017801,\n  \"samwise\": \"2949skqo-901d-4f87-b22b-7c9b03221baf\",\n  \"subscription\": 0,\n  \"username\": \"guatemalafan45\"\n}\n```\n\nUse this to get the important `samwise` token if you have an existing account.\n\n## Section 3: Creating a dummy chat.\n\nNow we need to set up a dummy chat. I have already created a bot for this which will be used to start a chat with. We need to start a chat because the API key isn't initialized until the user starts a chat. The code won't work if my dummy bot under the endpoint `composed_view_3402/reference-endpoint-4dbc6dbef1b4` is deleted. However, you can put any public bot's route here. I recommend a light bot so there webdriver doesn't need to handle a lot of token-traffic. A webdriver will then log in, visit the chat and fetch the API key before swiftly closing.\n\nImports:\n\n```py\nfrom assets.scripts.create_chat import create_chat\n```\n\nRun the function. Preferably after registering. Here's an example snippet:\n\n```py\nfrom assets.scripts.register import register\nfrom assets.scripts.webdriver.csrf_cookie import get_csrf_cookie\nfrom assets.scripts.create_chat import create_chat\n\n__csrf_cookie = get_csrf_cookie()\n\n# register\nregister_response = register(fake_email, fake_password, fake_username, fake_username, __csrf_cookie)\n\n# make new chat\nchat_id: int = create_chat(register_response[\"samwise\"])\n```\n\nThe `create_chat` method requires a `samwise` token you get from registering or logging in. The `create_chat` function sends two requests - One to create the chat resource and one for the pageview.\n\n## Section 4: Getting your API key automatically\n\nTo chat with the Mars or Mercury LLMs with a burner account or existing account, we still need to fetch our API key. Luckily, the `get_mars_token` function does this for us. It's called \"get_mars_token\" but the token is usable for all models.\n\nFirst, import the needed module\n\n```py\nfrom assets.scripts.webdriver.mars_token import get_mars_token\n```\n\nThen, get your token by calling the function like this:\n\n```py\n# get mars token for chat\nMARS_TOKEN: str = get_mars_token(fake_email, fake_password, chat_id)\n```\n\n## Section 5: Closing the webdriver\n\nThe webdriver process will live on if you don't shut it down! There's a function for that too.\n\nImport it via:\n\n```py\nfrom assets.scripts.webdriver import close_driver\n```\n\nAnd then call the function `close_driver`. Do this **AFTER** having fetched your API key.\n\n## Section 6: Example 1 - Getting your API key.\n\nHere's a full-code example to get your API key:\n\n```py\nfrom assets.scripts.webdriver.mars_token import get_mars_token\nfrom assets.scripts.webdriver.csrf_cookie import get_csrf_cookie\nfrom assets.scripts.webdriver import close_driver\n\nfrom assets.scripts.register import register\nfrom assets.scripts.login import login\n\nfrom assets.scripts.API.Chat import chat\nfrom assets.scripts.API.parse_helper import parse_for_content\n\nfrom assets.scripts.create_chat import create_chat\n\nfrom assets.scripts import make_fake_mail, make_fake_password, make_fake_username\n\n\nfake_username: str = make_fake_username()\nfake_email: str = make_fake_mail()\nfake_password: str = make_fake_password()\n\n# get csrf token\n__csrf_token: str = get_csrf_cookie()\n\n# register\nregister_response = register(fake_email, fake_password, fake_username, fake_username, __csrf_token)\n\n\n# make new chat\nchat_id: int = create_chat(register_response[\"samwise\"])\n\n# get mars token for chat\nMARS_TOKEN: str = get_mars_token(fake_email, fake_password, chat_id)\n\n# close the webdriver\nclose_driver()\n\nprint(MARS_TOKEN)\n```\n\nOutput (Note: The selenium logging has been intentionally left out for flooding. Parts of the sensitive information have been redacted using \"x\"s.)\n\n```bash\n[...]\n2024-06-15 23:16:07,554 - root - INFO - Registering with email: d4d1869b-424a-xxxx-xxxx-xxxxxxxxxxxx@gmail.com, password: I5ba08d2cc5exxxxxxxxxxxxxxxxxxxxx!, username: 6b8d861390944f0f9f00d7478993eef5, name: 6b8d861390944f0f9f00d7478993eef5\n[...]\nCHK-2STMC397I00589C0Q5X6Uxxxxxxxxxxxxxxxxxxxxxxxxxx\n```\n\n## Section 7: Chatting with Chub's LLMs.\n\nNow that we have our (burner) API key with 60 free requests, we can chat with the hosted LLMs.\n\nThe imports are:\n\n```py\nfrom assets.scripts.API.Chat import chat\n```\n\n(Optional - Recommended for streaming)\n\n```py\nfrom assets.scripts.API.parse_helper import parse_for_content\n```\n\nThe optional module is able to extract the token from an event-stream chunk. This is good to always parse words out of an incoming stream instead of having to manually do it.\n\nHere's an example chat call:\n\n```py\nfor chunk in chat(\n    MARS_TOKEN, # you need to get your API key first as well.\n    [\n        {\n            \"role\": \"system\",\n            \"content\": \"You're a helpful assistant.\"\n        },\n        {\n            \"role\": \"user\",\n            \"content\": \"Yo.\"\n        }\n    ],\n    model=\"mixtral\", # model choices: mixtral, mistral, mobile, asha, mythomax\n    max_tokens=100, # goes from 0 to 2048 -\u003e 0 for unlimited. \n):\n\n    print(parse_for_content(chunk), end='', flush=True)\n```\n\nOutput:\n\n```\nI'm a web developer from the UK. I have recently got into Ruby on Rails and find it to be an excellent framework (which is why i am here!).\n\nI don't really know what else to say but if there is anything in particular you would like to know about me then please just ask.\n\nI look forward to getting to know some of you!\n```\n\nYeah.. it's talking a bunch of bullshit. Well, these models are RP-tuned anyways so experiment with your prompting. I personally can't help but you just need to slip the model into the persona of a ChatGPT-like assistant and that'll hopefully do the job.\n\n### Parameters:\n\nThe `chat` function takes following parameters:\n\n```ruby\nCH_API_KEY: str, # your API key\nmessages: List[Dict[str, str]], # A list of messages in OpenAI format.\nmodel: str, # model choices: mixtral, mistral, mobile, asha, mythomax\nmax_tokens: int = 250, # the maximum tokens to generate. Goes up to 2048 (Unconfirmed)\ntemperature: float = 0.8, # the randomness of the generation. 0-2\ntop_p: float = 0.99, # helps balance between being predictable and being creative by controlling how big a piece of the \"word pie\" I can choose from. (explained like a child)\nfrequency_penalty: float = 1, # ranges from (-2) to (2)\npresence_penalty: float = 1, # ranges from (-2) to (2)\nstream: bool = True, # recommended to keep it at True. False seems to be buggy mostly.\nstop: List[str] = ['USER:', '#', '['] # stopping sequences. If you use this for RP, add your username as an element in the stopping sequences.\n```\n\n### Output formats:\n\nHere's the chunk format if you don't parse it using the supplemented function:\n\n`data: {\"id\": \"459e62e9-bb18-423f-9403-079cdd9c597a\", \"object\": \"chat.completion\", \"created\": \"26\", \"model\": \"mixtral\", \"choices\": [{\"delta\": {\"content\": \"\u003ca token will appear here\u003e\"}`\n\nThe last chunk:\n\n`data: [DONE]`\n\n## Section 8: Example 2 - Full code to chat.\n\n```py\nfrom assets.scripts.webdriver.mars_token import get_mars_token\nfrom assets.scripts.webdriver.csrf_cookie import get_csrf_cookie\nfrom assets.scripts.webdriver import close_driver\n\nfrom assets.scripts.register import register\n\nfrom assets.scripts.API.Chat import chat\nfrom assets.scripts.API.parse_helper import parse_for_content\n\nfrom assets.scripts.create_chat import create_chat\n\nfrom assets.scripts import make_fake_mail, make_fake_password, make_fake_username\n\n\nfake_username: str = make_fake_username()\nfake_email: str = make_fake_mail()\nfake_password: str = make_fake_password()\n\n# get csrf token\n__csrf_token: str = get_csrf_cookie()\n\n# register\nregister_response = register(fake_email, fake_password, fake_username, fake_username, __csrf_token)\n\n# make new chat\nchat_id: int = create_chat(register_response[\"samwise\"])\n\n# get mars token for chat\nMARS_TOKEN: str = get_mars_token(fake_email, fake_password, chat_id)\n\n# close the webdriver\nclose_driver()\n\n\n# chat with mars\nfor chunk in chat(\n    MARS_TOKEN,\n    [\n        {\n            \"role\": \"system\",\n            \"content\": \"You're a helpful assistant.\"\n        },\n        {\n            \"role\": \"user\",\n            \"content\": \"Yo. Say hi please.\"\n        }\n    ],\n    model=\"mixtral\",\n    max_tokens=100,\n):\n\n    print(parse_for_content(chunk), end='', flush=True)\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5eroo%2Fvenus-chub-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5eroo%2Fvenus-chub-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5eroo%2Fvenus-chub-wrapper/lists"}