mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
fix: fixed a bug which prevented some keys from being correctly parsed from the duckyscript parser (fixes #466)
This commit is contained in:
parent
f271f7cd76
commit
56922c9be6
1 changed files with 3 additions and 3 deletions
|
@ -107,7 +107,7 @@ func (p DuckyParser) Parse(kmap KeyMap, path string) (cmds []*Command, err error
|
||||||
}
|
}
|
||||||
|
|
||||||
cmds = make([]*Command, 0)
|
cmds = make([]*Command, 0)
|
||||||
for lineno, line := range source {
|
for _, line := range source {
|
||||||
cmd := &Command{}
|
cmd := &Command{}
|
||||||
if p.lineIs(line, "CTRL", "CONTROL") {
|
if p.lineIs(line, "CTRL", "CONTROL") {
|
||||||
if cmd, err = p.parseModifier(line, kmap, 1); err != nil {
|
if cmd, err = p.parseModifier(line, kmap, 1); err != nil {
|
||||||
|
@ -177,8 +177,8 @@ func (p DuckyParser) Parse(kmap KeyMap, path string) (cmds []*Command, err error
|
||||||
}
|
}
|
||||||
|
|
||||||
continue
|
continue
|
||||||
} else {
|
} else if cmd, err = p.parseLiteral(line, kmap); err != nil {
|
||||||
err = fmt.Errorf("can't parse line %d ('%s') of %s", lineno+1, line, path)
|
err = fmt.Errorf("error parsing '%s': %s", line, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue