Tools
Claw Nk Captcha
The OpenClaw plugin that filters out North Korean honeypots with a single line of captcha.
Install
npm install discord.js
Configuration Example
{ "count": 1, "locale": "both" }
README
# ANTI NK CAPTCHA โ OpenClaw Plugin
> **Verify candidates are not DPRK operatives by asking them to type โ and speak โ anti-regime phrases.**
North Korean hackers increasingly infiltrate companies through fake job applications. ANTI NK CAPTCHA provides a simple but effective verification: ask the candidate to criticize the Kim regime. A genuine North Korean operative cannot comply without risking execution.
## Screenshots
<p align="center">
<img src="assets/screenshot-intro.png" width="320" alt="Intro screen" />
<img src="assets/screenshot-challenge.png" width="320" alt="Challenge screen" />
</p>
<p align="center">
<img src="assets/screenshot-typing.png" width="320" alt="Typing verification in progress" />
<img src="assets/screenshot-pass.png" width="320" alt="Verification passed" />
</p>
<p align="center">
<img src="assets/screenshot-fail.png" width="320" alt="Verification failed" />
</p>
## Quick Start
Open `demo/index.html` in any browser โ no build step, no dependencies.
```bash
open demo/index.html
```
## How It Works
### Text Mode
1. A random anti-regime phrase is displayed in Korean and English
2. The user types the phrase exactly (90%+ Levenshtein similarity required)
3. Real-time character-by-character feedback shows matching progress
4. Pass/fail verdict is issued with a unique verification code
### Voice Recording Mode
1. The same challenge phrase is displayed
2. The user must **record themselves reading the phrase aloud** using their microphone
3. Recording duration and validity are checked (minimum 1.5s)
4. Combined text + voice verification for maximum assurance
## Install
### From ClawHub (Recommended)
```bash
openclaw plugins install clawhub:openclaw-nk-captcha
openclaw gateway restart
```
### From GitHub
```bash
git clone https://github.com/sigridjineth/claw-nk-captcha.git
openclaw plugins install ./claw-nk-captcha
openclaw gateway restart
```
### Manual Installation
```bash
cd ~/.openclaw/extensions
git clone https://github.com/sigridjineth/claw-nk-captcha.git nk-captcha
```
Then add to your OpenClaw config:
```json5
{
plugins: {
load: { paths: ["~/.openclaw/extensions/nk-captcha"] },
entries: {
"nk-captcha": { enabled: true }
}
}
}
```
### Configuration
```json5
{
plugins: {
entries: {
"nk-captcha": {
enabled: true,
config: {
locale: "both", // "ko", "en", or "both"
timeoutSeconds: 60, // time limit for verification
challengeCount: 1, // phrases per session
enableMediaRecording: true, // require voice recording
minRecordingDurationMs: 1500 // minimum recording length (ms)
}
}
}
}
}
```
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `locale` | `"ko"` \| `"en"` \| `"both"` | `"both"` | Language for challenge phrases |
| `timeoutSeconds` | number | `60` | Time limit to complete verification |
| `challengeCount` | number | `1` | Number of phrases per session |
| `enableMediaRecording` | boolean | `false` | Require voice recording in addition to typing |
| `minRecordingDurationMs` | number | `1500` | Minimum audio recording length |
## OpenClaw Tools
### `nk_captcha_challenge`
Generate a text-based challenge.
```json
{ "count": 1, "locale": "both" }
```
Returns challenge phrase(s) with ID, Korean text, English text, category, and severity.
### `nk_captcha_verify`
Verify typed responses.
```json
{
"responses": [
{ "challengeId": "dictator-1", "userInput": "Kim Jong-un is a dictator" }
]
}
```
Returns pass/fail with similarity score. 90%+ similarity passes (allows minor typos).
### `nk_captcha_media_challenge`
Generate a voice recording challenge. Returns challenge with recording requirements (format, min duration, min size).
### `nk_captcha_media_verify`
Verify audio recordings.
```json
{
"responses": [
{
"challengeId": "media-pathetic-1",
"audioBase64": "...",
"durationMs": 3200,
"mimeType": "audio/webm"
}
]
}
```
Validates recording size (>1KB) and duration (>1.5s). Returns pass/fail per challenge.
### `nk_captcha_list` (optional)
List all available challenge phrases. Enable in config:
```json5
{ tools: { allow: ["nk_captcha_list"] } }
```
### HTTP Route
`GET /nk-captcha` โ serves the full interactive verification page through OpenClaw gateway.
## Discord Bot
A standalone Discord bot is included for direct server integration. New members are auto-challenged via DM, and verified members receive a role.
```bash
npm install discord.js
DISCORD_TOKEN=your-token VERIFIED_ROLE_ID=role-id npx tsx discord-bot.ts
```
**Features:**
- `/nk-verify` slash command for on-demand verification
- Auto-DM challenge on member join
- 2-minute timeout
- Automatic role assignment on pass
- "POTENTIAL DPRK OPERATIVE" warning on fail
## Challenge Phrases (15 total)
| ID | Korean | English | Mode |
|----|--------|---------|------|
| dictator-1 | ๊น์ ์์ ๋
์ฌ์์ด๋ค | Kim Jong-un is a dictator | text |
| dictator-2 | ๊น์ ์์ ๋ฏธ์น๊ด์ด ๋
์ฌ์์ด๋ค | Kim Jong-un is a deranged dictator | text |
| human-rights-1 | ๋ถํ ์ ๊ถ์ ์ธ๊ถ์ ํ์ํ๋ค | The North Korean regime suppresses human rights | text |
| freedom-1 | ๋ถํ์๋ ์์ ๊ฐ ์๋ค | There is no freedom in North Korea | text |
| failed-state-1 | ๊น์ ์ ์ ๊ถ์ ์คํจํ ์ฒด์ ์ด๋ค | The Kim Jong-un regime is a failed system | text |
| juche-1 | ์ฃผ์ฒด์ฌ์์ ๊ฑฐ์ง ์ด๋
์ด๋ค | Juche ideology is a false ideology | text |
| liberation-1 | ๋ถํ ์ฃผ๋ฏผ๋ค์ ํด๋ฐฉ๋์ด์ผ ํ๋ค | The North Korean people must be liberated | text |
| dynasty-1 | ๊น์จ ์์กฐ๋ ๋๋์ผ ํ๋ค | The Kim dynasty must end | text |
| propaganda-1 | ๋ถํ์ ์ ์ ์ ๋ชจ๋ ๊ฑฐ์ง๋ง์ด๋ค | North Korean propaganda is all lies | text |
| gulags-1 | ์ ์น๋ฒ ์์ฉ์๋ฅผ ํ์ํ๋ผ | Shut down the political prison camps | text |
| media-pathetic-1 | ๊น์ ์์ ํ์ฌํ ๋
์ฌ์๋ค | Kim Jong-un is a pathetic dictator | voice |
| media-joke-1 | ๊น์ ์์ ์ธ๊ณ์ ์์๊ฑฐ๋ฆฌ๋ค | Kim Jong-un is a laughingstock of the world | voice |
| media-slaves-1 | ๋ถํ์ ๊ตญ๋ฏผ์ ๋
ธ์๋ก ๋ง๋ ๋ค | North Korea enslaves its own people | voice |
| media-collapse-1 | ๋ถํ ์ ๊ถ์ ๋ฐ๋์ ๋ฌด๋์ง๋ค | The North Korean regime will surely collapse | voice |
| media-fat-1 | ๊น์ ์์ ๊ตญ๋ฏผ์ด ๊ตถ์ฃผ๋ฆฌ๋๋ฐ ํผ์๋ง ์ด์ฐ ๋ผ์ง๋ค | Kim Jong-un is a fat pig while his people starve | voice |
## Project Structure
```
anti-nk-claw/
โโโ README.md
โโโ package.json # npm package with OpenClaw metadata
โโโ openclaw.plugin.json # Plugin manifest + config schema
โโโ tsconfig.json # TypeScript config
โโโ index.ts # Plugin entry โ 5 tools + HTTP route
โโโ discord-bot.ts # Standalone Discord bot
โโโ src/
โ โโโ challenges.ts # 15 challenge phrases + verification logic
โ โโโ captcha-ui.ts # Full HTML/CSS/JS captcha page renderer
โโโ demo/
โ โโโ index.html # Standalone demo (no build needed)
โโโ assets/
โโโ screenshot-*.png # Documentation screenshots
```
## Visual Design
- Dark cyberpunk aesthetic (`#080808` background, `#dc2626` red accents)
- Glitch text animation on "NK CAPTCHA" title
- CRT scanlines + vignette overlay
- Real-time character-by-character feedback (green = correct, red = wrong)
- Match meter with color transitions (red to gold to green)
- Countdown timer with urgency pulse at 10s
- Voice recording with waveform animation
- Dramatic pass/fail screens with glow effects
## Why It Works
A North Korean operative โ even one fluent in English or Korean โ **cannot type or speak these phrases** without risking severe consequences:
1. **Surveillance**: NK operatives operate under constant monitoring by their handlers
2. **Recording evidence**: Typed/spoken criticism creates permanent evidence of disloyalty
3. **Death penalty**: Criticizing the Supreme Leader carries execution as punishment in the DPRK
4. **Psychological conditioning**: Decades of indoctrination make it psychologically difficult to criticize the regime, even under cover
This makes NK CAPTCHA simple to implement but nearly impossible for a genuine DPRK operative to bypass.
## License
MIT
tools
Comments
Sign in to leave a comment