mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
Fix iw txpower syntax
The syntax used to set the txpower is incorrect and misses the keyword "fixed", this results in wireless adapter drivers that only support iw failing to initialize within bettercap. This bug was introduced in commit bettercap/bettercap@2f3390cf36 which was a fix for issue bettercap/bettercap#657 due to maybe the code not being tested extensively.
This commit is contained in:
parent
8ae28f4b3d
commit
140f33109f
1 changed files with 1 additions and 1 deletions
|
@ -287,7 +287,7 @@ func ActivateInterface(name string) error {
|
|||
func SetInterfaceTxPower(name string, txpower int) error {
|
||||
if core.HasBinary("iw") {
|
||||
Debug("SetInterfaceTxPower(%s, %d) iw based", name, txpower)
|
||||
if _, err := core.Exec("iw", []string{"dev", name, "set", "txpower", fmt.Sprintf("%dmBm",
|
||||
if _, err := core.Exec("iw", []string{"dev", name, "set", "txpower", "fixed", fmt.Sprintf("%dmBm",
|
||||
txpower)}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue