mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
new: implemented new (Linux only) packet.proxy module (closes #6).
This commit is contained in:
parent
6b402da8b6
commit
2a68ebb95e
13 changed files with 1263 additions and 4 deletions
47
modules/packet_proxy_unsupported.go
Normal file
47
modules/packet_proxy_unsupported.go
Normal file
|
@ -0,0 +1,47 @@
|
|||
// +build windows darwin
|
||||
|
||||
package modules
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/bettercap/bettercap/session"
|
||||
)
|
||||
|
||||
var (
|
||||
notSupported = errors.New("packet.proxy is not supported on this OS")
|
||||
)
|
||||
|
||||
type PacketProxy struct {
|
||||
session.SessionModule
|
||||
}
|
||||
|
||||
func NewPacketProxy(s *session.Session) *PacketProxy {
|
||||
return &PacketProxy{
|
||||
SessionModule: session.NewSessionModule("packet.proxy", s),
|
||||
}
|
||||
}
|
||||
|
||||
func (pp PacketProxy) Name() string {
|
||||
return "packet.proxy"
|
||||
}
|
||||
|
||||
func (pp PacketProxy) Description() string {
|
||||
return "Not supported on this OS"
|
||||
}
|
||||
|
||||
func (pp PacketProxy) Author() string {
|
||||
return "Simone Margaritelli <evilsocket@protonmail.com>"
|
||||
}
|
||||
|
||||
func (pp *PacketProxy) Configure() (err error) {
|
||||
return notSupported
|
||||
}
|
||||
|
||||
func (pp *PacketProxy) Start() error {
|
||||
return notSupported
|
||||
}
|
||||
|
||||
func (pp *PacketProxy) Stop() error {
|
||||
return notSupported
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue