{"record":{"id":"013c47e36becaf76","repo":"shadow1ng/fscan","slug":"local-pe-not-specified-013c47","errorCode":null,"errorMessage":"local_pe_not_specified","messagePattern":"local_pe_not_specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/local/winifeo.go","lineNumber":29,"sourceCode":"\t\"strings\"\n\n\t\"github.com/shadow1ng/fscan/common\"\n\t\"github.com/shadow1ng/fscan/common/i18n\"\n\t\"github.com/shadow1ng/fscan/plugins\"\n)\n\ntype WinIFEOPlugin struct {\n\tplugins.BasePlugin\n}\n\nfunc NewWinIFEOPlugin() *WinIFEOPlugin {\n\treturn &WinIFEOPlugin{BasePlugin: plugins.NewBasePlugin(\"winifeo\")}\n}\n\nfunc (p *WinIFEOPlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *plugins.Result {\n\tpePath := session.Config.WinPEFile\n\tif pePath == \"\" {\n\t\treturn &plugins.Result{Success: false, Error: fmt.Errorf(\"%s\", i18n.GetText(\"local_pe_not_specified\"))}\n\t}\n\tif _, err := os.Stat(pePath); err != nil {\n\t\treturn &plugins.Result{Success: false, Error: fmt.Errorf(\"%s\", i18n.Tr(\"local_pe_not_found\", pePath))}\n\t}\n\n\tabsPath, _ := filepath.Abs(pePath)\n\n\t// 劫持目标：不常用但系统存在的程序\n\ttargets := []struct {\n\t\texe  string\n\t\tdesc string\n\t}{\n\t\t{\"sethc.exe\", i18n.GetText(\"winifeo_sticky_keys\")},\n\t\t{\"utilman.exe\", i18n.GetText(\"winifeo_accessibility\")},\n\t\t{\"narrator.exe\", i18n.GetText(\"winifeo_narrator\")},\n\t}\n\n\tvar output strings.Builder","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/local/winifeo.go#L11-L47","documentation":"WinIFEOPlugin.Scan (Image File Execution Options hijacking plugin) requires a local PE file path from session.Config.WinPEFile, since the IFEO Debugger key must point at an executable. When the config field is empty, Scan returns a failed Result with the localized \"local_pe_not_specified\" message before touching the registry. It is pure input validation.","triggerScenarios":"Scan is invoked while session.Config.WinPEFile == \"\" — the winifeo plugin was enabled without supplying the local PE path in the scan config.","commonSituations":"Missing --winpe-file style CLI flag when enabling winifeo, wrong config section/profile so the key isn't loaded, or the key renamed across versions so an old config value is dropped silently.","solutions":["Provide the local PE path via the config option that sets session.Config.WinPEFile before enabling winifeo.","Double-check the config file section the plugin reads and that the key is spelled per current docs.","If calling Scan programmatically, assign an absolute PE path to session.Config.WinPEFile first."],"exampleFix":"// before\n// session.Config.WinPEFile not set -> local_pe_not_specified\n// after\nsession.Config.WinPEFile = \"C:\\\\tools\\\\payload.exe\"  // then run with plugin winifeo","handlingStrategy":"validation","validationCode":"// Reject empty PE path before calling the winifeo plugin\nif session.Config.WinPEFile == \"\" {\n    return errors.New(\"winifeo requires session.Config.WinPEFile to be set\")\n}","typeGuard":null,"tryCatchPattern":"result := plugin.Scan(ctx, host, session)\nif result != nil && !result.Success && result.Error.Error() == i18n.GetText(\"local_pe_not_specified\") {\n    // guide the user to set the PE path option\n}","preventionTips":["Pair every IFEO-plugin enablement with an explicit PE path value.","Add a config sanity check (required fields per enabled plugin) at startup.","Keep a sample config with WinPEFile filled in as a template."],"tags":["configuration","windows","ifeo","registry","missing-argument"],"backgroundTag":"missing-required-config-field","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"}