cmd

package
v0.0.0-...-48a9fa9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const BC = "http://127.0.0.1:8081"
View Source
const CapDelay = 5 * time.Second
View Source
const CapDwell = 3 * time.Second
View Source
const CapRefresh = 10 * time.Second
View Source
const Con = "PiFi"
View Source
const NM = "nmcli"

NM NetworkManager Command Line Interface

Variables

View Source
var Hotspot string
View Source
var HotspotBSSID string
View Source
var HotspotPortal string
View Source
var IsBettercapPaused bool
View Source
var IsBettercapRunning bool
View Source
var MonitorChannel int
View Source
var MonitorChannelHop bool
View Source
var MonitorWardrive bool

Functions

func DisableBettercapMonitor

func DisableBettercapMonitor(ctx context.Context) error

func DisableClient

func DisableClient(ctx context.Context) error

func DisableDNSPortal

func DisableDNSPortal() error

func DisableHotspot

func DisableHotspot(ctx context.Context) error

func GetBettercapAP

func GetBettercapAP(ctx context.Context, bssid string) (gjson.Result, error)

func GetBettercapAPs

func GetBettercapAPs(ctx context.Context) ([]gjson.Result, error)

func GetInterfaceBSSID

func GetInterfaceBSSID(ctx context.Context, iface string) (string, error)

func InitBettercap

func InitBettercap()

func InitGPS

func InitGPS()

func InitHotspot

func InitHotspot(ctx context.Context, iface string, item map[string]interface{}) (map[string]interface{}, map[string]interface{}, error)

func SetBettercap

func SetBettercap(ctx context.Context, cmd string, bypass bool) error

func SetBettercapMonitor

func SetBettercapMonitor(ctx context.Context, iface, channel string) error

func SetClient

func SetClient(ctx context.Context, iface, ssid, password string) error

func SetDNSPortal

func SetDNSPortal() error

func SetHotspot

func SetHotspot(ctx context.Context, iface, ssid, channel, password string, portal bool) error

func SetInterfaceMode

func SetInterfaceMode(ctx context.Context, iface string, mode string) error

func SetMonitor

func SetMonitor(ctx context.Context, iface string, region string, wardrive, channelHop bool, channel int) error

func SetRegion

func SetRegion(ctx context.Context, region string) error

Types

type Connection

type Connection struct {
	Name      string
	UUID      string
	Type      string
	Interface string
}

func GetConnectionList

func GetConnectionList(ctx context.Context) ([]Connection, error)

type GPSData

type GPSData struct {
	Lat float64 `json:"lat"`
	Lon float64 `json:"lon"`
	Alt float64 `json:"alt"`
	Acc float64 `json:"acc"`
	Spd float64 `json:"spd"`

	Mode int64 `json:"mode"`
	Time int64 `json:"time"`
}
var GPS GPSData

type Interface

type Interface struct {
	Name        string
	Type        string
	State       string
	Description string
}

func GetInterfaceList

func GetInterfaceList(ctx context.Context) ([]Interface, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL