Installation
This guide will walk you through setting up bet365-re-js on your system. The project requires both Python and Node.js environments.Prerequisites
Before you begin, ensure you have the following tools installed:Python Environment Manager
miniforge or miniconda for managing Python environments
Node.js Version Manager
nvm (Node Version Manager) for managing Node.js versions
Using miniforge/miniconda for a fresh Python environment is recommended. This allows you to experiment with dependencies and delete the environment without affecting your system Python installation.
Step 1: Python Environment Setup
Create a New Conda Environment
The project requires Python 3.12. You can create a new conda environment with the provided script:- Creates a new conda environment named
bet365-re-js - Installs Python 3.12
- Activates the environment
- Installs pip dependencies automatically
What's in new-conda-environment.sh?
What's in new-conda-environment.sh?
Install Python Dependencies Manually (Optional)
If you skipped creating a new conda environment or want to use your existing Python environment, install dependencies manually:What's installed?
What's installed?
The script installs dependencies from
mitmproxy/src/python/requirements-test.txt, which includes:Core Dependencies:mitmproxy- For intercepting and modifying HTTP/HTTPS trafficjsbeautifier- For formatting JavaScript outputrjsmin- For minifying JavaScript code
playwright- For browser automation testingpytest- Testing frameworkpytest-playwright- Playwright integration for pytest
Step 2: Node.js Setup
Verify Node.js Installation
Check if Node.js is already installed:Install Node.js with nvm
If Node.js is not installed, use nvm to install the version specified in.nvmrc:
.nvmrc).
At the time of project creation, the latest LTS version was v22.13.0, but the project has been updated to v22.15.0.
Update npm (Optional)
If you’re using an older version of npm, update it to the latest version:Step 3: Install Node.js Dependencies
Install all required npm packages:What packages are installed?
What packages are installed?
Production Dependencies:Development Dependencies:Key packages:
jscodeshift- AST transformation frameworkrecast- JavaScript parser and code generator preserving formattingescodegen- ECMAScript code generatorjest- Testing framework for JavaScript transformations
Step 4: Verify Installation
Verify that everything is set up correctly:Troubleshooting
Python dependencies fail to install
Python dependencies fail to install
Make sure you have pip installed and updated:Then try installing dependencies again:
Node.js version mismatch
Node.js version mismatch
Ensure you’re using the correct Node.js version:If you get an error, install the version first:
mitmproxy not found
mitmproxy not found
Make sure your conda environment is activated:If still not found, reinstall dependencies:
Permission denied on shell scripts
Permission denied on shell scripts
Make the scripts executable:
Next Steps
Once installation is complete, proceed to the Quickstart guide to start intercepting and deobfuscating JavaScript!Quickstart Guide
Learn how to start mitmproxy, configure your browser, and see deobfuscated JavaScript in action
