mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 04:52:10 -07:00
fix: single quotes can now be used to clear variables (fixes #450)
This commit is contained in:
parent
6980b864f5
commit
742e7fd8bb
2 changed files with 3 additions and 2 deletions
|
@ -223,7 +223,7 @@ func (s *Session) setHandler(args []string, sess *Session) error {
|
|||
key := args[0]
|
||||
value := args[1]
|
||||
|
||||
if value == "\"\"" {
|
||||
if value == "\"\"" || value == "''" {
|
||||
value = ""
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ func (s *Session) readHandler(args []string, sess *Session) error {
|
|||
|
||||
value, _ := reader.ReadString('\n')
|
||||
value = str.Trim(value)
|
||||
if value == "\"\"" {
|
||||
if value == "\"\"" || value == "''" {
|
||||
value = ""
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ func ParseCommands(line string) []string {
|
|||
finish := false
|
||||
|
||||
line = strings.Replace(line, `""`, `"<empty>"`, -1)
|
||||
line = strings.Replace(line, `''`, `"<empty>"`, -1)
|
||||
for _, c := range line {
|
||||
switch c {
|
||||
case ';':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue