shadow1ng/fscan · error

%s [target_file_not_specified]

Error message

%s [target_file_not_specified]

What it means

Config guard in ldpreload Scan: the persistence target file (config.PersistenceTargetFile) is empty, so the plugin has no .so path to install into /etc/ld.so.preload. The plugin returns a failed Result with the i18n sentinel message rather than a Go error chain; the output buffer also prints persistence_file_required.

Source

Thrown at plugins/local/ldpreload.go:56

	var output strings.Builder

	if runtime.GOOS != "linux" {
		output.WriteString(i18n.GetText("ldpreload_linux_only") + "\n")
		return &plugins.Result{
			Success: false,
			Output:  output.String(),
			Error:   fmt.Errorf("%s", i18n.Tr("unsupported_platform", runtime.GOOS)),
		}
	}

	// 从config获取配置
	targetFile := config.PersistenceTargetFile
	if targetFile == "" {
		output.WriteString(i18n.GetText("persistence_file_required") + "\n")
		return &plugins.Result{
			Success: false,
			Output:  output.String(),
			Error:   fmt.Errorf("%s", i18n.GetText("target_file_not_specified")),
		}
	}

	// 检查目标文件是否存在
	if _, err := os.Stat(targetFile); os.IsNotExist(err) {
		output.WriteString(i18n.Tr("target_file_not_exist", targetFile) + "\n")
		return &plugins.Result{
			Success: false,
			Output:  output.String(),
			Error:   err,
		}
	}

	// 检查文件类型
	if !p.isValidFile(targetFile) {
		output.WriteString(i18n.Tr("ldpreload_so_required", targetFile) + "\n")
		return &plugins.Result{
			Success: false,

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Set the persistence target file config to the .so path
  2. Upload/provide the shared library before running the plugin
  3. Skip the plugin if no payload library is available
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at plugins/local/ldpreload.go:56 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06). Data as JSON: /api/errors/671cf85e97f7fe21. Report an issue: GitHub.