https://github.com/six-two/mkdocs-variable-randomizer-plugin
Randomize specific variable names in code snippets each time you load the page
https://github.com/six-two/mkdocs-variable-randomizer-plugin
Last synced: 4 months ago
JSON representation
Randomize specific variable names in code snippets each time you load the page
- Host: GitHub
- URL: https://github.com/six-two/mkdocs-variable-randomizer-plugin
- Owner: six-two
- License: mit
- Created: 2025-04-02T17:08:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-02T19:01:29.000Z (about 1 year ago)
- Last Synced: 2025-10-26T18:49:59.647Z (7 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MkDocs Variable Randomizer Plugin
Basically the idea is to use random variable names in code snippets.
This can for example be used to make code snippets that are [harder to fingerprint](https://github.com/t3l3machus/PowerShell-Obfuscation-Bible?tab=readme-ov-file#rename-objects), thus useful for offensive code like AMSI bypasses.
## Installation
```bash
pip install mkdocs_variable_randomizer_plugin
```
## Usage
Add the plogin to your `mkdocs.yml`:
```yaml
plugins:
- search
- variable_randomizer
```
Prefix all variables that you want to have random names with `rand_`.
So for example if your code says:
```powershell
$message = "abc"
Write-Host $message
```
Change it to:
```powershell
$rand_message = "abc"
Write-Host $rand_message
```
Now when you build the page with `mkdocs serve` and visit the website, the listing should have random variable names like this:
```powershell
$UEtWeCI = "abc"
Write-Host $UEtWeCI
```
The variable names will change every time you reload the web page in your browser.