Skip to content

Commit

Permalink
nothing but import format change
Browse files Browse the repository at this point in the history
Signed-off-by: xuchunming1 <[email protected]>
  • Loading branch information
xuchunming1 committed Jul 1, 2021
1 parent 9020c53 commit e9dad78
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions js/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"compress/gzip"
"encoding/base64"

"github.com/robertkrimen/otto"
)

Expand All @@ -13,6 +14,7 @@ func btoa(call otto.FunctionCall) otto.Value {
if err != nil {
return ReportError("Could not convert to string: %s", varValue)
}

return v
}

Expand All @@ -21,10 +23,12 @@ func atob(call otto.FunctionCall) otto.Value {
if err != nil {
return ReportError("Could not decode string: %s", call.Argument(0).String())
}

v, err := otto.ToValue(string(varValue))
if err != nil {
return ReportError("Could not convert to string: %s", varValue)
}

return v
}

Expand Down
2 changes: 1 addition & 1 deletion js/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ func writeFile(call otto.FunctionCall) otto.Value {
}

return otto.NullValue()
}
}
8 changes: 6 additions & 2 deletions js/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package js
import (
"bytes"
"fmt"
"github.com/robertkrimen/otto"
"io"
"io/ioutil"
"net/http"
"net/url"
"strings"

"github.com/robertkrimen/otto"
)

type httpPackage struct {
Expand All @@ -26,7 +27,10 @@ func (c httpPackage) Encode(s string) string {
return url.QueryEscape(s)
}

func (c httpPackage) Request(method string, uri string, headers map[string]string, form map[string]string, json string) httpResponse {
func (c httpPackage) Request(method string, uri string,
headers map[string]string,
form map[string]string,
json string) httpResponse {
var reader io.Reader

if form != nil {
Expand Down
1 change: 0 additions & 1 deletion js/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package js
import (
"github.com/evilsocket/islazy/log"
"github.com/evilsocket/islazy/plugin"

"github.com/robertkrimen/otto"
)

Expand Down
1 change: 0 additions & 1 deletion packets/mdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"strings"

"github.com/evilsocket/islazy/str"

"github.com/google/gopacket"
"github.com/google/gopacket/layers"
)
Expand Down
5 changes: 3 additions & 2 deletions routing/update_darwin.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package routing

import (
"github.com/bettercap/bettercap/core"
"github.com/evilsocket/islazy/str"
"regexp"
"strings"

"github.com/bettercap/bettercap/core"
"github.com/evilsocket/islazy/str"
)

var parser = regexp.MustCompile(`^([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+).*$`)
Expand Down

0 comments on commit e9dad78

Please sign in to comment.