{"record":{"id":"9d601ec16dcfc7cc","repo":"bettercap/bettercap","slug":"s-is-not-supported-by-this-module","errorCode":null,"errorMessage":"%s is not supported by this module","messagePattern":"(.+?) is not supported by this module","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/mac_changer/mac_changer.go","lineNumber":98,"sourceCode":"\n\treturn nil\n}\n\nfunc (mod *MacChanger) setMac(mac net.HardwareAddr) error {\n\tcore.Exec(\"ifconfig\", []string{mod.iface, \"down\"})\n\tdefer func() {\n\t\tcore.Exec(\"ifconfig\", []string{mod.iface, \"up\"})\n\t}()\n\n\tvar args []string\n\n\tos := runtime.GOOS\n\tif strings.Contains(os, \"bsd\") || os == \"darwin\" {\n\t\targs = []string{mod.iface, \"ether\", mac.String()}\n\t} else if os == \"linux\" || os == \"android\" {\n\t\targs = []string{mod.iface, \"hw\", \"ether\", mac.String()}\n\t} else {\n\t\treturn fmt.Errorf(\"%s is not supported by this module\", os)\n\t}\n\n\tout, err := core.Exec(\"ifconfig\", args)\n\tif err == nil {\n\t\tmod.Session.Interface.HW = mac\n\t} else {\n\t\tmod.Warning(\"%v: %s\", err, out)\n\t}\n\n\treturn err\n}\n\nfunc (mod *MacChanger) Start() error {\n\tif mod.Running() {\n\t\treturn session.ErrAlreadyStarted(mod.Name())\n\t} else if err := mod.Configure(); err != nil {\n\t\treturn err\n\t} else if err := mod.setMac(mod.fakeMac); err != nil {","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/bettercap/bettercap/blob/8eca2820f3c41d2004434ed5a291d87462caeeb7/modules/mac_changer/mac_changer.go#L80-L116","documentation":"Raised in MacChanger.setMac when runtime.GOOS matches none of the supported platforms (BSD/darwin use 'ether', linux/android use 'hw ether'). The module shells out to ifconfig with OS-specific arguments, and the current operating system has no known ifconfig MAC-setting syntax, so it aborts before running anything.","triggerScenarios":"Thrown at modules/mac_changer/mac_changer.go:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the mac_changer module on Linux, BSD, or macOS","Change the MAC address manually with the platform's own tooling"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8eca2820f3c41d2004434ed5a291d87462caeeb7","analyzedAt":"2026-09-02T12:49:00.712Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}