mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
new: implemented can.obd2 builtin parser
This commit is contained in:
parent
cf6fba6151
commit
c3999d6bb5
11 changed files with 520 additions and 52 deletions
|
@ -20,6 +20,7 @@ type CANModule struct {
|
|||
filter string
|
||||
filterExpr *bexpr.Evaluator
|
||||
dbc *DBC
|
||||
obd2 *OBD2
|
||||
conn net.Conn
|
||||
recv *socketcan.Receiver
|
||||
send *socketcan.Transmitter
|
||||
|
@ -30,6 +31,7 @@ func NewCanModule(s *session.Session) *CANModule {
|
|||
SessionModule: session.NewSessionModule("can", s),
|
||||
filter: "",
|
||||
dbc: &DBC{},
|
||||
obd2: &OBD2{},
|
||||
filterExpr: nil,
|
||||
transport: "can",
|
||||
deviceName: "can0",
|
||||
|
@ -61,6 +63,10 @@ func NewCanModule(s *session.Session) *CANModule {
|
|||
"",
|
||||
"Optional boolean expression to select frames to report."))
|
||||
|
||||
mod.AddParam(session.NewBoolParameter("can.parse.obd2",
|
||||
"false",
|
||||
"Enable built in OBD2 PID parsing."))
|
||||
|
||||
mod.AddHandler(session.NewModuleHandler("can.recon on", "",
|
||||
"Start CAN-bus discovery.",
|
||||
func(args []string) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue