Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ blank_issues_enabled: false

contact_links:
- name: 📖 使用文档 / README
url: https://github.com/shadow1ng/fscan/blob/main/README.md
url: https://scanner/blob/main/README.md
about: 提交 Issue 前请先查阅文档,确认不是用法问题
- name: 💬 讨论区 / Discussions
url: https://github.com/shadow1ng/fscan/discussions
url: https://scanner/discussions
about: 使用疑问、经验分享、一般性讨论请使用 Discussions
2 changes: 1 addition & 1 deletion .github/actions/build-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
go-version:
description: 'Go 版本'
required: false
default: '1.20'
default: '1.25.12'
retention-days:
description: '产物保留天数'
required: false
Expand Down
128 changes: 8 additions & 120 deletions .github/conf/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2

project_name: "fscan"
project_name: "scanner"

before:
hooks:
Expand All @@ -9,8 +9,8 @@ before:

builds:
# 标准版 - 全部插件(全架构)
- id: fscan
binary: fscan
- id: scanner
binary: scanner
main: .
env:
- CGO_ENABLED=0
Expand Down Expand Up @@ -58,127 +58,17 @@ builds:
- goos: solaris
goarch: mipsle
flags: [-trimpath]
ldflags: -s -w -X github.com/shadow1ng/fscan/common.version={{ .Version }} -X github.com/shadow1ng/fscan/common.commit={{ .ShortCommit }} -X github.com/shadow1ng/fscan/common.date={{ .Date }}
ldflags: -s -w -X scanner/common.version={{ .Version }} -X scanner/common.commit={{ .ShortCommit }} -X scanner/common.date={{ .Date }}
mod_timestamp: "{{ .CommitTimestamp }}"

# 无本地插件版 - 排除本地模块(全架构)
- id: fscan-nolocal
binary: fscan
main: .
env:
- CGO_ENABLED=0
goos: [windows, linux, darwin, freebsd, solaris]
goarch: [amd64, arm64, "386", arm, mips, mips64, mipsle]
goarm: ["5", "6", "7"]
gomips: [softfloat]
ignore:
- goos: darwin
goarch: "386"
- goos: darwin
goarch: arm
- goos: darwin
goarch: mips
- goos: darwin
goarch: mips64
- goos: darwin
goarch: mipsle
- goos: windows
goarch: arm64
- goos: windows
goarch: arm
- goos: windows
goarch: mips
- goos: windows
goarch: mips64
- goos: windows
goarch: mipsle
- goos: freebsd
goarch: mips
- goos: freebsd
goarch: mips64
- goos: freebsd
goarch: mipsle
- goos: solaris
goarch: "386"
- goos: solaris
goarch: arm
- goos: solaris
goarch: arm64
- goos: solaris
goarch: mips
- goos: solaris
goarch: mips64
- goos: solaris
goarch: mipsle
flags: [-trimpath]
tags: [no_local]
ldflags: -s -w -X github.com/shadow1ng/fscan/common.version={{ .Version }} -X github.com/shadow1ng/fscan/common.commit={{ .ShortCommit }} -X github.com/shadow1ng/fscan/common.date={{ .Date }}
mod_timestamp: "{{ .CommitTimestamp }}"

# WebUI版 - 主流平台即可
- id: fscan-web
binary: fscan
main: .
env:
- CGO_ENABLED=0
goos: [windows, linux, darwin]
goarch: [amd64, arm64, "386"]
goarm: ["7"]
ignore:
- goos: darwin
goarch: "386"
- goos: windows
goarch: arm64
flags: [-trimpath]
tags: [web]
ldflags: -s -w -X github.com/shadow1ng/fscan/common.version={{ .Version }} -X github.com/shadow1ng/fscan/common.commit={{ .ShortCommit }} -X github.com/shadow1ng/fscan/common.date={{ .Date }}
mod_timestamp: "{{ .CommitTimestamp }}"

upx:
- ids: [fscan, fscan-nolocal, fscan-web]
enabled: true
goos: [windows, linux]
goarch: [amd64, "386", arm64]
compress: "6"
brute: false
lzma: false

archives:
# 标准版归档
- id: fscan
ids: [fscan]
formats: [binary]
allow_different_binary_count: true
name_template: >-
fscan_{{ .Version }}_
{{- if eq .Os "darwin" }}mac
{{- else }}{{ .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x64
{{- else if eq .Arch "386" }}x32
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}

# 无本地插件版归档
- id: fscan-nolocal
ids: [fscan-nolocal]
formats: [binary]
allow_different_binary_count: true
name_template: >-
fscan-nolocal_{{ .Version }}_
{{- if eq .Os "darwin" }}mac
{{- else }}{{ .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x64
{{- else if eq .Arch "386" }}x32
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}

# WebUI版归档
- id: fscan-web
ids: [fscan-web]
- id: scanner
ids: [scanner]
formats: [binary]
allow_different_binary_count: true
name_template: >-
fscan-web_{{ .Version }}_
scanner_{{ .Version }}_
{{- if eq .Os "darwin" }}mac
{{- else }}{{ .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x64
Expand Down Expand Up @@ -223,9 +113,7 @@ release:

| 版本 | 说明 |
|------|------|
| **fscan** | 标准版,包含全部插件(推荐) |
| **fscan-nolocal** | 精简版,不含本地模块(体积更小) |
| **fscan-web** | WebUI版,带Web管理界面(主流平台) |
| **scanner** | 标准扫描版 |

### 平台支持

Expand Down
12 changes: 6 additions & 6 deletions .github/release-notes/v2.2.0-rc.1.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# fscan v2.2.0-rc.1

> ⚠️ **这是预发布版本 (Release Candidate)**,可能存在未发现的问题。
> 如果你在使用中遇到任何异常,请积极通过 [Issue](https://github.com/shadow1ng/fscan/issues/new/choose) 反馈,帮助我们尽快稳定正式版。
> 生产环境建议继续使用 [v2.1.3](https://github.com/shadow1ng/fscan/releases/tag/v2.1.3)。
> 如果你在使用中遇到任何异常,请积极通过 [Issue](https://scanner/issues/new/choose) 反馈,帮助我们尽快稳定正式版。
> 生产环境建议继续使用 [v2.1.3](https://scanner/releases/tag/v2.1.3)。

---

Expand Down Expand Up @@ -111,7 +111,7 @@

## 反馈与贡献

- 🐛 发现 Bug → [提交 Bug 报告](https://github.com/shadow1ng/fscan/issues/new?template=bug_report.yml)
- 🎯 结果不准 → [提交误报/漏报](https://github.com/shadow1ng/fscan/issues/new?template=false_positive.yml)
- ✨ 功能建议 → [提交功能请求](https://github.com/shadow1ng/fscan/issues/new?template=feature_request.yml)
- 💬 使用疑问 → [Discussions](https://github.com/shadow1ng/fscan/discussions)
- 🐛 发现 Bug → [提交 Bug 报告](https://scanner/issues/new?template=bug_report.yml)
- 🎯 结果不准 → [提交误报/漏报](https://scanner/issues/new?template=false_positive.yml)
- ✨ 功能建议 → [提交功能请求](https://scanner/issues/new?template=feature_request.yml)
- 💬 使用疑问 → [Discussions](https://scanner/discussions)
14 changes: 6 additions & 8 deletions .github/release-notes/v2.2.0-rc.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# fscan v2.2.0-rc

> ⚠️ **这是预发布版本 (Release Candidate)**,可能存在未发现的问题。
> 如果你在使用中遇到任何异常,请积极通过 [Issue](https://github.com/shadow1ng/fscan/issues/new/choose) 反馈,帮助我们尽快稳定正式版。
> 生产环境建议继续使用 [v2.1.3](https://github.com/shadow1ng/fscan/releases/tag/v2.1.3)。
> 如果你在使用中遇到任何异常,请积极通过 [Issue](https://scanner/issues/new/choose) 反馈,帮助我们尽快稳定正式版。
> 生产环境建议继续使用 [v2.1.3](https://scanner/releases/tag/v2.1.3)。

---

Expand Down Expand Up @@ -71,7 +71,6 @@
| SDK 并发限速共享 | `CanSendPacket()` 全局限速器在多 Scanner 实例间共享(按进程限速,非按实例) |
| CEL 回连验证走全局 | DNSLog 反连检测的 HTTP 请求计数走全局 state(影响可忽略) |
| 本地插件仅限授权场景 | 持久化/minidump/shell 类插件仅用于授权渗透测试 |
| WebUI 为实验性功能 | `fscan-web` 版本的 Web 界面尚未完善 |
| `common` 包未完全拆分 | 内部架构的 common 包职责仍较重,后续版本持续优化 |

---
Expand All @@ -80,10 +79,10 @@

这是一个 RC 版本,我们非常需要你的反馈:

- 🐛 发现 Bug → [提交 Bug 报告](https://github.com/shadow1ng/fscan/issues/new?template=bug_report.yml)
- 🎯 结果不准 → [提交误报/漏报](https://github.com/shadow1ng/fscan/issues/new?template=false_positive.yml)
- ✨ 功能建议 → [提交功能请求](https://github.com/shadow1ng/fscan/issues/new?template=feature_request.yml)
- 💬 使用疑问 → [Discussions](https://github.com/shadow1ng/fscan/discussions)
- 🐛 发现 Bug → [提交 Bug 报告](https://scanner/issues/new?template=bug_report.yml)
- 🎯 结果不准 → [提交误报/漏报](https://scanner/issues/new?template=false_positive.yml)
- ✨ 功能建议 → [提交功能请求](https://scanner/issues/new?template=feature_request.yml)
- 💬 使用疑问 → [Discussions](https://scanner/discussions)

---

Expand All @@ -93,7 +92,6 @@
|------|------|
| **fscan** | 标准版,包含全部插件(推荐) |
| **fscan-nolocal** | 精简版,不含本地后渗透模块(体积更小) |
| **fscan-web** | WebUI版,带 Web 管理界面(主流平台) |

## 平台支持

Expand Down
2 changes: 1 addition & 1 deletion .github/release-notes/v2.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ v2.2.0 是 v2.2 系列首个正式版,基于 v2.1.3 之后的 RC 测试和 Iss

完整变更记录见:

https://github.com/shadow1ng/fscan/compare/v2.1.3...v2.2.0
https://scanner/compare/v2.1.3...v2.2.0
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
uses: ./.github/actions/build-release
with:
mode: ${{ inputs.snapshot && 'snapshot' || 'release' }}
go-version: '1.25'
go-version: '1.25.12'
retention-days: '90'
release-args: ${{ inputs.draft && '--draft' || '' }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: 设置 Go 环境
uses: actions/setup-go@v5
with:
go-version: '1.25'
go-version: '1.25.12'
cache: true

- name: 运行 golangci-lint
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: 设置 Go 环境
uses: actions/setup-go@v5
with:
go-version: '1.25'
go-version: '1.25.12'
cache: true

- name: 下载依赖
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
- name: 设置 Go 环境
uses: actions/setup-go@v5
with:
go-version: '1.25'
go-version: '1.25.12'
cache: true

- name: 构建验证
Expand Down
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,14 @@ test_output.txt
# Build artifacts / 构建产物
build/
bin/
/dist/
*.exe
*.dll
*.so
*.dylib
/fscan_cli
/fscan_web
/embed-agent

# Web UI build / Web前端构建
web-ui/node_modules/
web-ui/dist/
!web/dist/

# Go specific / Go 相关
vendor/
*.test
Expand All @@ -79,6 +74,7 @@ go.work.sum

# Performance profiling / 性能分析
profiles/
tools/perftest/results/

# Local development tools / 本地开发工具
.air.toml
Expand Down
32 changes: 6 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# fscan Makefile
# Scanner Makefile
# 提供统一的构建、测试、检查命令

.PHONY: help test test-cover build build-web build-ui build-debug build-race lint lint-fix clean ci deps install-tools stress-test
.PHONY: help test test-cover build build-debug build-race lint lint-fix clean ci deps install-tools stress-test

# 默认目标
.DEFAULT_GOAL := help

# 项目配置
BINARY_NAME := fscan
BINARY_NAME := scanner
GO := go
GOLANGCI_LINT := golangci-lint

Expand All @@ -19,7 +19,7 @@ NC := \033[0m # No Color

## help: 显示帮助信息
help:
@echo "$(BLUE)fscan 构建工具$(NC)"
@echo "$(BLUE)Scanner 构建工具$(NC)"
@echo ""
@echo "$(GREEN)可用命令:$(NC)"
@grep -E '^## ' $(MAKEFILE_LIST) | sed 's/^## / /'
Expand Down Expand Up @@ -53,32 +53,12 @@ test-cover:
$(GO) tool cover -html=coverage.out -o coverage.html
@echo "$(GREEN)✓ 覆盖率报告生成完成$(NC)"

## build: 构建生产版本(无 pprof,优化体积
## build: 构建生产版本(不含利用组件
build:
@echo "$(BLUE)构建生产版本(无 pprof)...$(NC)"
@echo "$(BLUE)构建生产版本(默认扫描版,不含利用组件)...$(NC)"
$(GO) build -ldflags="-s -w" -trimpath -o $(BINARY_NAME) .
@echo "$(GREEN)✓ 构建完成: $(BINARY_NAME)$(NC)"

## build-web: 构建带Web UI的版本(需要先构建前端)
build-web: build-ui
@echo "$(BLUE)构建Web版本...$(NC)"
$(GO) build -tags web -ldflags="-s -w" -trimpath -o $(BINARY_NAME)-web .
@echo "$(GREEN)✓ 构建完成: $(BINARY_NAME)-web$(NC)"
@echo "$(BLUE)提示: 运行 ./$(BINARY_NAME)-web 启动Web界面(默认端口 10240)$(NC)"

## build-ui: 构建前端(需要Node.js和npm)
build-ui:
@echo "$(BLUE)构建前端...$(NC)"
@if [ ! -d "web-ui" ]; then \
echo "$(RED)错误: web-ui 目录不存在$(NC)"; \
echo "请先创建前端项目"; \
exit 1; \
fi
@cd web-ui && npm install && npm run build
@rm -rf web/dist
@cp -r web-ui/dist web/dist
@echo "$(GREEN)✓ 前端构建完成$(NC)"

## build-debug: 构建调试版本(带 pprof)
build-debug:
@echo "$(BLUE)构建调试版本(带 pprof)...$(NC)"
Expand Down
Loading