返回顶部
m

mitools-desensitize

数据脱敏工具,支持手机号、身份证、银行卡、邮箱、IP地址、中文姓名等多种敏感信息脱敏

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
97
下载量
0
收藏
概述
安装方式
版本历史

mitools-desensitize

# 数据脱敏工具 (mitools-desensitize) 基于正则表达式的数据脱敏工具,支持多种敏感信息类型的自动识别和脱敏处理。 ## 功能特性 - 📱 **手机号脱敏** - 保留前3位和后3位,中间用*号替代 - 🆔 **身份证号脱敏** - 保留前3位和后3位,中间用*号替代 - 💳 **银行卡脱敏** - 保留前2位,其余用*号替代 - 📧 **邮箱脱敏** - 保留前2位,后面用***替代 - 👤 **中文姓名脱敏** - 保留姓氏,后面用**替代 - 🌐 **IP地址脱敏** - 替换为伪IP地址(139.1.2.xxx) - 📁 **路径用户名脱敏** - 替换路径中的用户名为demo01/demo02等 - 🔢 **长串数字脱敏** - 6位以上连续数字替换为等长伪数字 - 📝 **字段名脱敏** - 敏感字段名首字保留,后面用**替代 - 🔄 **通配符规则** - 支持自定义通配符替换规则 - ↩️ **数据还原** - 支持根据映射表还原脱敏数据 ## 使用方法 ### 1. 对文本进行脱敏 ``` 脱敏 <文本内容> ``` 示例: ``` 脱敏 张三的手机号是13812345678,邮箱是zhangsan@example.com ``` ### 2. 对文件进行脱敏 ``` 脱敏文件 <文件路径> ``` 示例: ``` 脱敏文件 ./user_data.log ``` ### 3. 根据映射还原数据 ``` 脱敏还原 <脱敏后文本> <映射JSON> ``` 示例: ``` 脱敏还原 "张**的手机号是138*****678" '{"username": {"张三": "demo01"}}' ``` ### 4. 查看支持的脱敏规则 ``` 脱敏规则列表 ``` ## 支持的脱敏规则 | 规则名称 | 说明 | 示例 | |---------|------|------| | phone | 手机号脱敏 | 13812345678 → 138*****678 | | idcard | 身份证号脱敏 | 110101199001011234 → 110******234 | | bankcard | 银行卡脱敏 | 6222021234567890123 → 62** **** **** **** *** | | email | 邮箱脱敏 | zhangsan@example.com → zh***@***.com | | chinese_name | 中文姓名脱敏 | 张三 → 张** | | ip | IP地址脱敏 | 192.168.1.1 → 139.1.2.100 | | path_user | 路径用户名脱敏 | /home/zhangsan → /home/demo01 | | digit_sequence | 长串数字脱敏 | 1234567890 → 0000000001 | | chinese_field | 字段名脱敏 | 手机号 → 手** | | wildcard | 通配符规则 | dev*23 → dev31 | ## 配置文件 工具会自动生成 `desensitize_config.json` 配置文件,包含: - `levels`: 脱敏级别配置,定义应用哪些规则 - `wildcard_rules`: 通配符替换规则 - `custom_rules`: 自定义正则规则 ## 使用场景 - 日志脱敏 - 清理生产环境日志中的敏感信息 - 数据分享 - 脱敏后分享给第三方 - 测试数据 - 生成脱敏的测试数据集 - 文档处理 - 清理文档中的敏感信息

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 mitools-desensitize-1776109049 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 mitools-desensitize-1776109049 技能

通过命令行安装

skillhub install mitools-desensitize-1776109049

下载 Zip 包

⬇ 下载 mitools-desensitize v1.0.0

文件大小: 8.38 KB | 发布时间: 2026-4-14 13:44

v1.0.0 最新 2026-4-14 13:44
Initial release of mitools-desensitize – a data desensitization tool supporting multiple sensitive information types:

- Supports desensitization of phone numbers, ID cards, bank cards, emails, Chinese names, IP addresses, usernames in paths, long digit sequences, and field names.
- Allows custom wildcard replacement rules and custom regex rules.
- Provides both text and file desensitization commands.
- Supports desensitized data restoration via mapping tables.
- Automatically manages configuration files for rules and levels.
- Suitable for log cleaning, data sharing, test data generation, and document processing.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部