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
|
@ -55,8 +55,7 @@ func (mod *CANModule) startDumpReader() error {
|
|||
|
||||
scanner := bufio.NewScanner(file)
|
||||
for scanner.Scan() {
|
||||
line := str.Trim(scanner.Text())
|
||||
if line != "" {
|
||||
if line := str.Trim(scanner.Text()); line != "" {
|
||||
if m := dumpLineParser.FindStringSubmatch(line); len(m) != 4 {
|
||||
mod.Warning("unexpected line: '%s' -> %d matches", line, len(m))
|
||||
} else if timeval, err := parseTimeval(m[1]); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue