| 1 | package sessionscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/ |
| 2 | |
| 3 | import ( |
| 4 | "encoding/jsonscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/" |
| 5 | "io/ioutilscip-go gomod github.com/golang/go/src go1.16 `io/ioutil`/" |
| 6 | "osscip-go gomod github.com/golang/go/src go1.16 os/" |
| 7 | |
| 8 | "github.com/bettercap/bettercap/jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/" |
| 9 | "github.com/evilsocket/islazy/fsscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/fs`/" |
| 10 | "github.com/evilsocket/islazy/logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/" |
| 11 | "github.com/robertkrimen/ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/" |
| 12 | ) |
| 13 | |
| 14 | // see https://github.com/robertkrimen/otto/issues/213 |
| 15 | var jsRuntimescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/jsRuntime. = ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.Newscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/New().() |
| 16 | |
| 17 | func jsRunFuncscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/jsRunFunc().(call ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.FunctionCallscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#) ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.Valuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value# { |
| 18 | argv := call.ArgumentListscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#ArgumentList. |
| 19 | argc := len(argv) |
| 20 | if argc != 1 { |
| 21 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("run accepts one string argument") |
| 22 | } else if argv[0].IsStringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#IsString().() == false { |
| 23 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("run accepts one string argument") |
| 24 | } |
| 25 | |
| 26 | for _, cmd := range ParseCommandsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/ParseCommands().(argv[0].Stringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#String().()) { |
| 27 | if err := Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..Runscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#Run().(cmd); err != nil { |
| 28 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("error running '%s': %v", cmd, err) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.NullValuescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/NullValue. |
| 33 | } |
| 34 | |
| 35 | func jsOnEventFuncscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/jsOnEventFunc().(call ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.FunctionCallscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#) ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.Valuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value# { |
| 36 | argv := call.ArgumentListscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#ArgumentList. |
| 37 | argc := len(argv) |
| 38 | cb := ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.NullValuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/NullValue().() |
| 39 | filterExpr := "" |
| 40 | |
| 41 | // just one argument, a function to receive all events |
| 42 | if argc == 1 { |
| 43 | if argv[0].IsFunctionscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#IsFunction().() == false { |
| 44 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("the single argument must be a function") |
| 45 | } |
| 46 | cb = argv[0] |
| 47 | } else { |
| 48 | if argc != 2 { |
| 49 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("expected two arguments (event_name, callback), got %d", argc) |
| 50 | } else if argv[0].IsStringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#IsString().() == false { |
| 51 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("first argument must be a string") |
| 52 | } else if argv[1].IsFunctionscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#IsFunction().() == false { |
| 53 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("second argument must be a function") |
| 54 | } |
| 55 | |
| 56 | filterExpr = argv[0].Stringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#String().() |
| 57 | cb = argv[1] |
| 58 | } |
| 59 | |
| 60 | // start a go routine for this event listener |
| 61 | go func(expr string, cb ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.Valuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#) { |
| 62 | listener := Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..Eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#Events..Listenscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Listen().() |
| 63 | defer Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..Eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#Events..Unlistenscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Unlisten().(listener) |
| 64 | |
| 65 | for event := range listener { |
| 66 | if expr == "" || event.Tagscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Tag. == expr { |
| 67 | // some objects don't do well with js, so convert them to a generic map |
| 68 | // before passing them to the callback |
| 69 | var opaque interface{} |
| 70 | if raw, err := jsonscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/.Marshalscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/Marshal().(event); err != nil { |
| 71 | Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..Eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#Events..Logscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Log().(logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.ERRORscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/ERROR., "error serializing event %s: %v", event.Tagscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Tag., err) |
| 72 | } else if err = jsonscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/Unmarshal().(raw, &opaque); err != nil { |
| 73 | Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..Eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#Events..Logscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Log().(logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.ERRORscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/ERROR., "error serializing event %s: %v", event.Tagscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Tag., err) |
| 74 | } |
| 75 | |
| 76 | // lock vm if ready and available |
| 77 | locked := false |
| 78 | if Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..scriptscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#script. != nil { |
| 79 | Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..scriptscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#script..Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 80 | locked = true |
| 81 | } |
| 82 | |
| 83 | if _, err := cb.Callscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#Call().(ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.NullValuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/NullValue().(), opaque); err != nil { |
| 84 | Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..Eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#Events..Logscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Log().(logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.ERRORscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/ERROR., "error dispatching event %s: %v", event.Tagscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Tag., err) |
| 85 | } |
| 86 | |
| 87 | // unlock vm if ready and available |
| 88 | if locked { |
| 89 | Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..scriptscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#script..Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 90 | } |
| 91 | } |
| 92 | } |
| 93 | }(filterExpr, cb) |
| 94 | |
| 95 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.NullValuescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/NullValue. |
| 96 | } |
| 97 | |
| 98 | func jsSaveJSONFuncscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/jsSaveJSONFunc().(call ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.FunctionCallscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#) ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.Valuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value# { |
| 99 | argv := call.ArgumentListscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#ArgumentList. |
| 100 | argc := len(argv) |
| 101 | if argc != 2 { |
| 102 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("saveJSON accepts one object and one string arguments") |
| 103 | } else if argv[0].IsObjectscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#IsObject().() == false { |
| 104 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("saveJSON accepts one object and one string arguments") |
| 105 | } else if argv[1].IsStringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#IsString().() == false { |
| 106 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("saveJSON accepts one object and one string arguments") |
| 107 | } |
| 108 | |
| 109 | obj := argv[0] |
| 110 | if fileName, err := fsscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/fs`/.Expandscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/fs`/Expand().(argv[1].Stringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#String().()); err != nil { |
| 111 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("can't expand '%s': %v", fileName, err) |
| 112 | } else if exp, err := obj.Exportscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#Export().(); err != nil { |
| 113 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("error exporting object: %v", err) |
| 114 | } else if raw, err := jsonscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/.Marshalscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/Marshal().(exp); err != nil { |
| 115 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("error serializing object: %v", err) |
| 116 | } else if err = ioutilscip-go gomod github.com/golang/go/src go1.16 `io/ioutil`/.WriteFilescip-go gomod github.com/golang/go/src go1.16 `io/ioutil`/WriteFile().(fileName, raw, osscip-go gomod github.com/golang/go/src go1.16 os/.ModePermscip-go gomod github.com/golang/go/src go1.16 os/ModePerm.); err != nil { |
| 117 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("error writing to '%s': %v", fileName, err) |
| 118 | } |
| 119 | |
| 120 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.NullValuescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/NullValue. |
| 121 | } |
| 122 | |
| 123 | func jsLoadJSONFuncscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/jsLoadJSONFunc().(call ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.FunctionCallscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#) ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.Valuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value# { |
| 124 | argv := call.ArgumentListscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#ArgumentList. |
| 125 | argc := len(argv) |
| 126 | if argc != 1 { |
| 127 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("loadJSON accepts one string argument") |
| 128 | } else if argv[0].IsStringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#IsString().() == false { |
| 129 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("loadJSON accepts one string argument") |
| 130 | } |
| 131 | |
| 132 | var obj interface{} |
| 133 | |
| 134 | if fileName, err := fsscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/fs`/.Expandscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/fs`/Expand().(argv[0].Stringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#String().()); err != nil { |
| 135 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("can't expand '%s': %v", fileName, err) |
| 136 | } else if rawData, err := ioutilscip-go gomod github.com/golang/go/src go1.16 `io/ioutil`/.ReadFilescip-go gomod github.com/golang/go/src go1.16 `io/ioutil`/ReadFile().(fileName); err != nil { |
| 137 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("can't read '%s': %v", fileName, err) |
| 138 | } else if err = jsonscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/Unmarshal().(rawData, &obj); err != nil { |
| 139 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("can't parse '%s': %v", fileName, err) |
| 140 | } else if v, err := jsRuntimescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/jsRuntime..ToValuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Otto#ToValue().(obj); err != nil { |
| 141 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("could not convert '%s' to javascript object: %s", fileName, err) |
| 142 | } else { |
| 143 | return v |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | func jsFileExistsFuncscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/jsFileExistsFunc().(call ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.FunctionCallscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#) ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.Valuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value# { |
| 148 | argv := call.ArgumentListscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FunctionCall#ArgumentList. |
| 149 | argc := len(argv) |
| 150 | if argc != 1 { |
| 151 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("fileExists accepts one string argument") |
| 152 | } else if argv[0].IsStringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#IsString().() == false { |
| 153 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("fileExists accepts one string argument") |
| 154 | } else if fileName, err := fsscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/fs`/.Expandscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/fs`/Expand().(argv[0].Stringscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/Value#String().()); err != nil { |
| 155 | return jsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/.ReportErrorscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/js`/ReportError().("can't expand '%s': %v", fileName, err) |
| 156 | } else if fsscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/fs`/.Existsscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/fs`/Exists().(fileName) { |
| 157 | return ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.TrueValuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/TrueValue().() |
| 158 | } |
| 159 | |
| 160 | return ottoscip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/.FalseValuescip-go gomod github.com/robertkrimen/otto v0.4.0 `github.com/robertkrimen/otto`/FalseValue().() |
| 161 | } |