HailBytes/phishing-template-linter
GitHub: HailBytes/phishing-template-linter
这是一个专为GoPhish格式设计的邮件模板检查工具,用于在部署前验证钓鱼模拟的送达性和跟踪完整性。
Stars: 1 | Forks: 0
# @hailbytes/phishing-template-linter

[](https://www.npmjs.com/package/%40hailbytes%2Fphishing-template-linter)
[](https://www.npmjs.com/package/@hailbytes/phishing-template-linter)
[](LICENSE)
[](https://bundlephobia.com/package/@hailbytes/phishing-template-linter)
## 功能介绍
在部署前自动对 GoPhish 格式的电子邮件模板进行 lint 检查。能够捕获邮件送达问题、缺失的跟踪像素、损坏的合并标签以及垃圾邮件触发词——从而确保您的模拟钓鱼邮件能够真正送达收件箱。
## 安装
```
npm install @hailbytes/phishing-template-linter
# 或直接运行
npx @hailbytes/phishing-template-linter ./templates/
```
## 快速开始
### CLI 方式
```
# Lint 目录中的所有模板
npx @hailbytes/phishing-template-linter ./templates/
# Lint 单个模板文件
npx @hailbytes/phishing-template-linter ./templates/it-helpdesk.html
# 输出为 JSON 格式以便 CI 集成
npx @hailbytes/phishing-template-linter ./templates/ --format json
```
### 编程调用
```
import { lint } from '@hailbytes/phishing-template-linter';
const result = lint(templateHtml);
console.log(result.errors); // RuleViolation[] — must-fix issues
console.log(result.warnings); // RuleViolation[] — should-fix issues
console.log(result.suggestions); // RuleViolation[] — nice-to-have improvements
// Exit non-zero in CI if any errors
if (result.errors.length > 0) process.exit(1);
```
## 适用人群
管理 GoPhish 活动模板、并希望在部署前进行自动化质量检查的 MSSP、红队成员和安全意识培训师。
## 另请参见
- [`@hailbytes/asm-scope-parser`](https://github.com/HailBytes/asm-scope-parser) — 攻击面范围解析
- [HailBytes SAT 平台](https://hailbytes.com/sat)
*属于 [HailBytes](https://hailbytes.com) 开源安全工具集的一部分。*
标签:MITM代理, 数据可视化, 暗色界面, 自动化攻击