MCPcopy Create free account
hub / github.com/Hel10-Web/Databasetools / Help

Function Help

pac/help.go:161–378  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159}
160
161func Help() {
162 flag.Parse()
163 if Redis {
164 err := RedisClient(PWD)
165 if err != nil {
166 if strings.Contains(err.Error(), "context deadline exceeded") {
167 Info("Redis 连接超时")
168 }
169 if strings.Contains(err.Error(), "NOAUTH Authentication required.") {
170 Info("Redis 需要密码认证")
171 }
172 if strings.Contains(err.Error(), "ERR invalid password") {
173 Info("Redis 认证密码错误!")
174 }
175 return
176 }
177 switch {
178 case exec:
179 if Lhost == "" {
180 Info("缺少Lhost参数")
181 }
182 if console {
183 RedisSlave()
184 loopCmd("exec")
185 } else {
186 RedisSlave()
187 RunCmd(CMD)
188 CloseSlave("exec")
189 }
190 case dump_:
191 handle_export()
192 case import_:
193 handle_import()
194 case cli:
195 loopRedis()
196 case shell:
197 echo("getshell", "./shell.txt")
198 case crontab:
199 echo("crontab", "./crontab.txt")
200 case sshkey:
201 echo("ssh", "./ssh.txt")
202 case lua:
203 if console {
204 loopCmd("lua")
205 } else {
206 if CMD == "" {
207 Info("缺少 cmd 参数, 无法执行命令哦")
208 return
209 }
210 RedisLua(CMD)
211 }
212 }
213 } else if MSsql {
214 _, conn, _ := MssqlConnect(Rhost, Rport, Ruser, PWD)
215 MssqlCMD("select @@version;", conn)
216 Success("连接成功!")
217 switch {
218 case cli:

Callers 1

mainFunction · 0.92

Calls 15

RedisClientFunction · 0.85
InfoFunction · 0.85
RedisSlaveFunction · 0.85
loopCmdFunction · 0.85
RunCmdFunction · 0.85
CloseSlaveFunction · 0.85
handle_exportFunction · 0.85
handle_importFunction · 0.85
loopRedisFunction · 0.85
echoFunction · 0.85
RedisLuaFunction · 0.85
MssqlConnectFunction · 0.85

Tested by

no test coverage detected