mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -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)
|
||||
for lineno, line := range source {
|
||||
for _, line := range source {
|
||||
cmd := &Command{}
|
||||
if p.lineIs(line, "CTRL", "CONTROL") {
|
||||
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
|
||||
} else {
|
||||
err = fmt.Errorf("can't parse line %d ('%s') of %s", lineno+1, line, path)
|
||||
} else if cmd, err = p.parseLiteral(line, kmap); err != nil {
|
||||
err = fmt.Errorf("error parsing '%s': %s", line, err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue