MCPcopy Create free account
hub / github.com/Semporia/Scripts / queryshell

Function queryshell

jd_cfd_loop.js:161–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159
160// 捡贝壳
161async function queryshell() {
162 return new Promise(async (resolve) => {
163 $.get(taskUrl(`story/queryshell`), async (err, resp, data) => {
164 try {
165 if (err) {
166 console.log(`${JSON.stringify(err)}`)
167 console.log(`${$.name} queryshell API请求失败,请检查网路重试`)
168 } else {
169 data = JSON.parse(data);
170 for (let key of Object.keys(data.Data.NormShell)) {
171 let vo = data.Data.NormShell[key]
172 for (let j = 0; j < vo.dwNum; j++) {
173 await $.wait(1500)
174 await pickshell(`dwType=${vo.dwType}`)
175 }
176 }
177 console.log('')
178 }
179 } catch (e) {
180 $.logErr(e, resp);
181 } finally {
182 resolve();
183 }
184 })
185 })
186}
187async function pickshell(body) {
188 return new Promise(async (resolve) => {
189 $.get(taskUrl(`story/pickshell`, body), async (err, resp, data) => {

Callers 1

cfdFunction · 0.85

Calls 6

pickshellFunction · 0.85
taskUrlFunction · 0.70
getMethod · 0.45
logMethod · 0.45
waitMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected