{"record":{"id":"671cf85e97f7fe21","repo":"shadow1ng/fscan","slug":"s-target-file-not-specified","errorCode":null,"errorMessage":"%s [target_file_not_specified]","messagePattern":"(.+?) \\[target_file_not_specified\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/local/ldpreload.go","lineNumber":56,"sourceCode":"\tvar output strings.Builder\n\n\tif runtime.GOOS != \"linux\" {\n\t\toutput.WriteString(i18n.GetText(\"ldpreload_linux_only\") + \"\\n\")\n\t\treturn &plugins.Result{\n\t\t\tSuccess: false,\n\t\t\tOutput:  output.String(),\n\t\t\tError:   fmt.Errorf(\"%s\", i18n.Tr(\"unsupported_platform\", runtime.GOOS)),\n\t\t}\n\t}\n\n\t// 从config获取配置\n\ttargetFile := config.PersistenceTargetFile\n\tif targetFile == \"\" {\n\t\toutput.WriteString(i18n.GetText(\"persistence_file_required\") + \"\\n\")\n\t\treturn &plugins.Result{\n\t\t\tSuccess: false,\n\t\t\tOutput:  output.String(),\n\t\t\tError:   fmt.Errorf(\"%s\", i18n.GetText(\"target_file_not_specified\")),\n\t\t}\n\t}\n\n\t// 检查目标文件是否存在\n\tif _, err := os.Stat(targetFile); os.IsNotExist(err) {\n\t\toutput.WriteString(i18n.Tr(\"target_file_not_exist\", targetFile) + \"\\n\")\n\t\treturn &plugins.Result{\n\t\t\tSuccess: false,\n\t\t\tOutput:  output.String(),\n\t\t\tError:   err,\n\t\t}\n\t}\n\n\t// 检查文件类型\n\tif !p.isValidFile(targetFile) {\n\t\toutput.WriteString(i18n.Tr(\"ldpreload_so_required\", targetFile) + \"\\n\")\n\t\treturn &plugins.Result{\n\t\t\tSuccess: false,","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/local/ldpreload.go#L38-L74","documentation":"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.","triggerScenarios":"Thrown at plugins/local/ldpreload.go:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the persistence target file config to the .so path","Upload/provide the shared library before running the plugin","Skip the plugin if no payload library is available"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}