mirror of
https://github.com/bettercap/bettercap
synced 2025-07-08 05:51:37 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
4206fd6a22
commit
1c3b9fc825
1 changed files with 14 additions and 11 deletions
|
@ -83,6 +83,8 @@ func (s *TcpProxyScript) OnData(from, to net.Addr, data []byte) []byte {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// do we have any return value to override the buffer with?
|
||||||
|
if !ret.IsNull() && !ret.IsUndefined() {
|
||||||
exported, err := ret.Export()
|
exported, err := ret.Export()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error while exporting results: %s", err)
|
log.Error("Error while exporting results: %s", err)
|
||||||
|
@ -97,6 +99,7 @@ func (s *TcpProxyScript) OnData(from, to net.Addr, data []byte) []byte {
|
||||||
|
|
||||||
return array
|
return array
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue