dsh-redteam-model
SeaOf0
基于dsh web实现的多种模式,目的是服务于redteam进行授权的安全研究,覆盖渗透测试、红队评估、代码审计等范围领域,请勿用于非法行为。(允许二开,赋予模块各位自己的业务逻辑,方法论只有自己熟练的才好用,好的方法论=好的生态)
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:borncode-app/dsh-minimax-auth
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
This repository has moved into one monorepo.
The whole MiniMax set — the credit proxy, the daily check-in, the model-list sync, the composer quota chip, the MiniMax Code bridge, and the shared grant reader — now lives in
borncode-app/dsh-minimax-kit, one repository with one Plugins entry.
this repo new home dsh-minimax-authpackages/dsh-minimax-authdsh-minimax-creditpackages/dsh-minimax-creditdsh-minimax-checkinpackages/dsh-minimax-checkindsh-minimax-model-syncpackages/dsh-minimax-model-syncdsh-minimax-bridgepackages/dsh-minimax-bridgedsh-model-quotapackages/dsh-model-quotaThe code and its history are unchanged; only the repository is shared. Install
dsh-minimax-kitinstead of the individual bundles. This repository stays open so the old links keep working.dsh-minimax-auth
The MiniMax Code OAuth grant reader and refresher, shared by
dsh-minimax-credit and
dsh-minimax-checkin.
Not a bundle: it declares no dsh.bundle.patch and inserts no Loader row. It is
a plain library the two plugins import.
Both plugins borrow the same grant MiniMax Code wrote under
~/.minimax/auth/<buildEnv>/<region>/mcode-public/auth.json, and both refresh it
in place. While each carried its own copy, two implementations wrote that one
file: a refresh in one plugin could rotate the refresh token the other was about
to use, and the second refresh then failed with invalid_grant even though the
machine was still signed in.
One implementation, one code path, one place to fix.
| export | what it does |
|---|---|
MinimaxCodeAuth |
reads the grant, refreshes it under MiniMax Code's own auth.lock, exposes token(), peekToken(), status(), paths() |
AuthError |
the default error class, used when a caller passes no ErrorClass |
AUTH_MESSAGES |
the user-facing wording, so both plugins say the same thing |
numberOf, readConfig |
small config helpers both plugins also use |
oauthAccountOrigin |
account.minimax.cn or account.minimax.io for a region |
withAuthLock, writePrivateFile |
the lock and private-write primitives, exported for callers with their own store |
A plugin keeps its own error class and code prefix:
import { MinimaxCodeAuth } from '@local/dsh-minimax-auth'
export class WidgetUnavailableError extends Error { /* … */ }
class WidgetAuth extends MinimaxCodeAuth {
constructor(options) {
super({ ...options, ErrorClass: WidgetUnavailableError, codePrefix: 'MINIMAX_WIDGET_' })
}
}
token({ force: true }) refreshes even when the stored token still looks valid;
that is what a caller does after the API answers 401 for it.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: auth。