
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
github.com/joffref/wifi-cli
WIFI CLI is a command line interface to select WIFI networks. There's two main features:
go get github.com/Joffref/wifi-cli
Note: You need to have
go
installed on your machine. See golang.org for more information.You also need to have
git
installed on your machine. See git-scm.com for more information.
git clone https://github.com/Joffref/wifi-cli
cd wifi-cli
make build
Usage:
wifi-cli ap [flags]
Flags:
-a, --AccessPointNumberWeight int AccessPointNumberWeight (default 1)
-r, --CoverageWeight int CoverageWeight (default 1)
-s, --SignalStrengthWeight int SignalStrengthWeight (default 1)
-h, --help help for ap
-i, --interface string wifi interface (default "wlan0")
Usage:
wifi-cli terminal [flags]
Flags:
-h, --help help for terminal
-i, --interface string wifi interface (default "wlan0")
As a library, you can use the ap
and terminal
packages to get the best wifi channel or the best wifi network.
Plus, we define an interface SelectionMiddleware
to define your own selection algorithm or use the included one (coverage
, empty
, number
, signal
).
package ap
//...
// SelectionMiddleware is a middleware that selects the best channel given a criteria.
type SelectionMiddleware interface {
// Select ranks the channels based on the criteria.
Select(ScoredChannels map[int]int, UsedChannels map[int]*Channel) (map[int]int, error)
// Criteria returns the criteria of the middleware.
Criteria() string
// Name returns the name of the criteria.
Name() string
// SetWeight sets the weight of the criteria.
// The weight is an int between 0 and 100.
SetWeight(int)
}
Then you can use the ap
package to get the best channel.
package main
import (
"log"
"github.com/Joffref/wifi-cli/ap"
)
func main() {
chain := ap.SelectionChain{
&ap.UnoccupiedChannel{
Weight: ap.Infinite,
},
&ap.AccessPointNumber{
Weight: 1,
},
&ap.Signal{
Weight: 20,
},
&ap.Coverage{
Weight: 100,
},
}
chanel, err := BestChanel(ifname, chain)
if err != nil {
log.Errorf("Error while finding best channel: %v", err)
}
log.Infof("Best channel is %v", chanel)
}
func BestChanel(ifname string, chain ap.SelectionChain) (int, error) {
return ap.FindBestChannel(ifname, chain)
}
terminal
mode to select the best wifi network.coverage
criteria to select the best channel.signal
criteria to select the best channel.number
criteria to select the best channel.empty
criteria to select the best channel.weight
to each criteria.SelectionChain
to select the best channel.SelectionMiddleware
to define your own selection algorithm.--json
flag to output the result in json format.--csv
flag to output the result in csv format.--yaml
flag to output the result in yaml format.This project is licensed under the MIT License - see the LICENSE file for details
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.