|
@@ -7,6 +7,7 @@ LUA中公共的方法需要抽出来,主脚本文件加载LUA公共文件
|
|
|
package spider
|
|
|
|
|
|
import (
|
|
|
+ codegrpc "analysiscode"
|
|
|
"bytes"
|
|
|
"compress/gzip"
|
|
|
"crypto/aes"
|
|
@@ -541,6 +542,14 @@ func (s *Script) LoadScript(downloadnode, script string, isfile ...string) {
|
|
|
S.Push(lua.LString(decimalNum.String()))
|
|
|
return 1
|
|
|
}))
|
|
|
+
|
|
|
+ //获取验证码
|
|
|
+ s.L.SetGlobal("getCodeByPath", s.L.NewFunction(func(S *lua.LState) int {
|
|
|
+ path := S.ToString(-1)
|
|
|
+ code := codegrpc.GetCodeByPath(path)
|
|
|
+ S.Push(lua.LString(code))
|
|
|
+ return 1
|
|
|
+ }))
|
|
|
}
|
|
|
|
|
|
//
|