├── .gitignore ├── README.md ├── api ├── detail.js ├── proxy.js └── users.js ├── assets.json ├── document.css ├── document.js ├── document.less ├── getAllInstance.js ├── index.html ├── md5.min.js ├── package.json ├── ui.less └── vue.2.6.11.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | package-lock.json 3 | Un/* -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CSGO 对局信息速览 2 | 3 | 在玩 CSGO 头号特训模式中、经常会遇到眼熟的外挂用户 4 | 5 | CurseRed 建议做一个 status 用户信息速查工具、方便我们快速确认当局敏感用户,于是就有了这个工具 6 | 7 | ## 地址 8 | [https://lab.magiconch.com/csgo-hacker-log/](https://lab.magiconch.com/csgo-hacker-log/?from=github) 9 | 10 | 11 | ## 使用 12 | 13 | - 游戏中 ~ 调出控制台 14 | - 输入 status 回车 15 | - 复制控制台中输出的内容到输入框 16 | - 即可对当前对局用户信息进行快速确认 17 | 18 | ## 功能 19 | 目前支持展示的信息 20 | - 唯一 ID 21 | - 游戏昵称 22 | - 社区昵称 23 | - 头像 24 | - 资料未公开 25 | - Steam 注册时间 26 | - Steam 等级 27 | - CSGO 游戏时长 28 | - VAC封禁 29 | - 社区封禁 30 | - 交易封禁 31 | - 游戏封禁 32 | - 延迟 33 | - 发包数 34 | 35 | 敏感信息会 标红 提醒 36 | 37 | 游戏中昵称和社区中不一致的情况会在界面上 红名 标出社区昵称,可能是外挂功能一部分 38 | 39 | 表格标题单击可排序 40 | 41 | 点击玩家对应 userId 可复制投票踢指定玩家的控制台命令 42 | 43 | ### 标记 44 | 45 | 标记功能可对当前对局玩家进行快速标记,目前共有三种颜色 红、 黄、 绿 方便用户使用,具体作用可自行分配 46 | 47 | 每次标记会记录操作时间,下回在对局中遇到已标记玩家可以看到最后一次标记时间 48 | 49 | 高级选项中可自行输入名称来 建立 或 加入 标记库,分享标记库名称可以多人公用标记信息 50 | 51 | ### say 52 | 当前对局有标红玩家时,可快速复制 say 命令,在控制台迅速发言 53 | 54 | 竞技、休闲模式可勾选 尝试投票踢出 在发言同时尝试发起投票踢出对应玩家 55 | 56 | ## 辅助 57 | 参考信息不足时可点击用户右侧的链接们、跳转到第三方网站确认更多信息 58 | 59 | csgostats.gg 可查看玩家对局情况 https://csgostats.gg 60 | 61 | SteamAnalyst 可预估玩家饰品价格 https://csgo.steamanalyst.com 62 | 63 | 头号特训模式玩家也可以尝试在 CSGO作弊狗 http://csgozbg.cn 数据库中查询是否有已登记的作弊玩家 64 | 65 | ## 参考 66 | 67 | Steam Web API Documentation https://steamapi.xpaw.me with ♥ by xPaw 68 | 69 | Steam Web API https://developer.valvesoftware.com/wiki/Steam_Web_API 70 | 71 | Ban Checker for Steam https://chrome.google.com/webstore/detail/ban-checker-for-steam/canbadmphamemnmdfngmcabnjmjgaiki 72 | 73 | Steam Inventory Helper https://chrome.google.com/webstore/detail/steam-inventory-helper/cmeakgjggjdlcpncigglobpjbkabhmjl 74 | 75 | 76 | 77 | 78 | ## GitHub 79 | [https://github.com/itorr/CSGO-Status-Search](https://github.com/itorr/CSGO-Status-Search) 80 | 81 | -------------------------------------------------------------------------------- /api/detail.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | const apiKey = '45696DEC3D074506B7203C0CA93E4CB1'; 4 | 5 | 6 | const timeout = 4000; 7 | 8 | const get = async uri =>{ 9 | try{ 10 | const res = await axios.get(uri,{ 11 | timeout, 12 | responseType:'text', 13 | headers:{ 14 | // 'user-agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', 15 | 'referer':uri, 16 | 'Accept-Language': 'zh-CN,zh;q=0.9' 17 | } 18 | }); 19 | let data = res.data; 20 | try{ 21 | data = JSON.parse(data); 22 | }catch(e){ 23 | 24 | } 25 | // if(typeof data === 'object'){ 26 | 27 | // } 28 | return data; 29 | }catch(e){ 30 | console.log(/gete/,e); 31 | return null; 32 | } 33 | } 34 | 35 | 36 | 37 | const id64Regex = /^7656[0-9]{12,14}$/; 38 | 39 | const steamAPIBaseURL = 'https://api.steampowered.com/'; 40 | 41 | 42 | const GetUserRecentlyPlayed = async id64 =>{ 43 | const uri = `${steamAPIBaseURL}IPlayerService/GetRecentlyPlayedGames/v1/?key=${apiKey}&steamid=${id64}`; 44 | try{ 45 | const r = await get(uri); 46 | const games = r.response['games']; 47 | if(!games) return null; 48 | 49 | const Games = {}; 50 | games.forEach(game => { 51 | Games[game.appid] = game; 52 | }); 53 | const game = Games[730]; 54 | return game; 55 | }catch(e){ 56 | console.log(/获取game time出错/,e,id64,uri); 57 | return null; 58 | } 59 | }; 60 | const getUserLevel = async id64 =>{ 61 | const uri = `${steamAPIBaseURL}IPlayerService/GetSteamLevel/v1/?key=${apiKey}&steamid=${id64}`; 62 | try{ 63 | const r = await get(uri); 64 | return r.response['player_level']; 65 | }catch(e){ 66 | console.log(/获取level出错/,e,id64,uri); 67 | return null; 68 | } 69 | }; 70 | 71 | const getUserDetailCallback = async id64 =>{ 72 | const user = {}; 73 | 74 | const game = await GetUserRecentlyPlayed(id64); 75 | if(game){ 76 | user.csgo_playtime_2weeks = game.playtime_2weeks; 77 | user.csgo_playtime_forever = game.playtime_forever; 78 | } 79 | 80 | const level = await getUserLevel(id64); 81 | if(level){ 82 | user.level = level; 83 | } 84 | 85 | return user; 86 | }; 87 | //76561198374544929 88 | export default async function handler(req, res) { 89 | const query = req.query; 90 | 91 | const id64 = query['id64']; 92 | 93 | if(!id64Regex.test(id64)) return res.status(200).json({}); 94 | 95 | const user = await getUserDetailCallback(id64); 96 | res.status(200).json(user); 97 | } -------------------------------------------------------------------------------- /api/proxy.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | export default async function handler(req, res) { 3 | const query = req.query; 4 | const url = query['url']; 5 | 6 | if(!/^https:\/\/steamcdn-a\.akamaihd\.net\//.test(url)) return res.status(404); 7 | 8 | const r = await axios(url,{ 9 | responseType:'arraybuffer', 10 | }); 11 | res.setHeader('content-type','image/jpeg') 12 | res.status(200).send(r.data); 13 | } -------------------------------------------------------------------------------- /api/users.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | const apiKey = '45696DEC3D074506B7203C0CA93E4CB1'; 4 | 5 | 6 | const timeout = 4000; 7 | 8 | const get = async uri =>{ 9 | try{ 10 | const res = await axios.get(uri,{ 11 | timeout, 12 | responseType:'text', 13 | headers:{ 14 | // 'user-agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', 15 | 'referer':uri, 16 | 'Accept-Language': 'zh-CN,zh;q=0.9' 17 | } 18 | }); 19 | let data = res.data; 20 | try{ 21 | data = JSON.parse(data); 22 | }catch(e){ 23 | 24 | } 25 | // if(typeof data === 'object'){ 26 | 27 | // } 28 | return data; 29 | }catch(e){ 30 | console.log(/gete/,e); 31 | return null; 32 | } 33 | } 34 | 35 | const id64Regex = /7656[0-9]{12,14}/g; 36 | 37 | const steamAPIBaseURL = 'https://api.steampowered.com/'; 38 | 39 | 40 | 41 | const getUsersBySteam = async id64s => { 42 | id64s = [...new Set(id64s)]; 43 | const Users = {}; 44 | try{ 45 | const id64sString = id64s.join(','); 46 | const uri = `${steamAPIBaseURL}ISteamUser/GetPlayerSummaries/v2/?key=${apiKey}&steamids=${id64sString}`; 47 | const res = await get(uri); 48 | const summaries = res.response.players; 49 | const bansId64s = []; 50 | let index = summaries.length; 51 | while(index--){ 52 | const summarie = summaries[index]; 53 | 54 | const timecreated = summarie.timecreated || null; 55 | 56 | const id64 = summarie.steamid; 57 | const user = { 58 | id64, 59 | personaname: summarie.personaname, 60 | avatar: summarie.avatarmedium, 61 | timecreated, 62 | }; 63 | Users[id64] = user; 64 | }; 65 | 66 | if(bansId64s.length){ 67 | const uri = `${steamAPIBaseURL}ISteamUser/GetPlayerBans/v1/?key=${apiKey}&steamids=${bansId64s.join(',')}`; 68 | const res = await get(uri); 69 | const playerBans = res.players; 70 | 71 | if(playerBans){ 72 | let index = playerBans.length; 73 | while(index--){ 74 | const bans = playerBans[index]; 75 | const id64 = bans.SteamId; 76 | delete bans.SteamId; 77 | if(!Users[id64]) Users[id64] = {id64}; 78 | for(let key in bans){ 79 | if(!bans[key] || bans[key] === "none"){ 80 | delete bans[key]; 81 | } 82 | } 83 | Users[id64].bans = bans; 84 | }; 85 | } 86 | } 87 | return Object.values(Users); 88 | }catch(e){ 89 | console.log(/e getUsersBySteam/,e); 90 | return []; 91 | } 92 | }; 93 | //76561198374544929 94 | export default async function handler(req, res) { 95 | const query = req.query; 96 | 97 | const id64sQueryString = query['id64s']; 98 | if(!id64sQueryString) return res.status(200).json([]); 99 | 100 | const id64s = id64sQueryString.match(id64Regex); 101 | 102 | const users = await getUsersBySteam(id64s); 103 | 104 | res.status(200).json(users); 105 | } -------------------------------------------------------------------------------- /document.css: -------------------------------------------------------------------------------- 1 | html { 2 | font: 400 14px/1.4 sans-serif; 3 | text-rendering: optimizeLegibility; 4 | -webkit-font-smoothing: antialiased; 5 | -moz-osx-font-smoothing: grayscale; 6 | background: #222; 7 | color: #FFF; 8 | } 9 | body { 10 | margin: 0; 11 | } 12 | button, 13 | input { 14 | font: inherit; 15 | } 16 | a { 17 | color: #3270ff; 18 | text-decoration: none; 19 | } 20 | ::selection { 21 | background: #1e67ff; 22 | color: #FFF; 23 | } 24 | .ui-table-box { 25 | border: 1px solid #666666; 26 | border-collapse: collapse; 27 | background-color: #EEE; 28 | color: #222; 29 | } 30 | .ui-table-box tr:nth-child(odd) td { 31 | background: #F8F8F8; 32 | } 33 | .ui-table-box tr[data-blocked="true"] { 34 | opacity: 0.2; 35 | transition: opacity 0.1s ease; 36 | pointer-events: none; 37 | } 38 | .ui-table-box tr[data-blocked="true"] td { 39 | background: #DDD; 40 | } 41 | .ui-table-box tr[data-haved] td { 42 | background: #e4f4ec; 43 | } 44 | .ui-table-box tr[data-pending] td { 45 | background: #ffd7d7; 46 | } 47 | .ui-table-box th { 48 | border: 1px solid #DDD; 49 | padding: 8px; 50 | background-color: #EEE; 51 | } 52 | .ui-table-box td { 53 | border: 1px solid #DDD; 54 | padding: 8px; 55 | background-color: #fafafa; 56 | line-height: 1.18; 57 | } 58 | .ui-table-box td h5 { 59 | margin: 0; 60 | padding: 4px 0 0; 61 | } 62 | .ui-table-box td small { 63 | opacity: 0.5; 64 | } 65 | .ui-table-box td img { 66 | display: block; 67 | margin: -10px; 68 | } 69 | .ui-table-box td pre { 70 | margin: 0; 71 | } 72 | .app { 73 | width: 960px; 74 | margin: 0 auto; 75 | padding: 0 0 100px; 76 | } 77 | header { 78 | padding: 20px; 79 | line-height: 42px; 80 | overflow: hidden; 81 | } 82 | header h1 { 83 | margin: 0; 84 | font-family: '苹方'; 85 | /* font-weight:1200; */ 86 | /* color:#FFF; */ 87 | text-shadow: 1px 1px 0 #ff658c, -1px -1px 0 #77cdc7; 88 | float: left; 89 | } 90 | header .user-box { 91 | float: right; 92 | line-height: 42px; 93 | position: relative; 94 | padding-left: 50px; 95 | } 96 | header .user-box img { 97 | float: left; 98 | position: absolute; 99 | left: 0; 100 | top: 0; 101 | width: 42px; 102 | height: 42px; 103 | border-radius: 42px; 104 | background: #444; 105 | } 106 | .login-box { 107 | padding: 100px 20px; 108 | } 109 | .login-box a { 110 | display: block; 111 | font-size: 30px; 112 | font-weight: bold; 113 | padding: 20px 0; 114 | width: 340px; 115 | text-align: center; 116 | margin: 0 auto; 117 | background-image: linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB); 118 | border: 2px solid #2e1c99; 119 | text-shadow: 0 2px 3px #5B42F3; 120 | color: #FFF; 121 | border-radius: 10px; 122 | box-shadow: rgba(151, 65, 252, 0.3) 0 15px 40px -5px; 123 | } 124 | h2, 125 | h3, 126 | h4, 127 | h5, 128 | h6 { 129 | margin: 0; 130 | } 131 | h4 { 132 | font-size: 15px; 133 | } 134 | [v-cloak] { 135 | display: none; 136 | } 137 | pre { 138 | font-size: 12px; 139 | background: #222; 140 | color: #FFF; 141 | padding: 6px; 142 | margin: 0; 143 | word-wrap: break-all; 144 | overflow: hidden; 145 | } 146 | textarea { 147 | box-sizing: border-box; 148 | width: 100%; 149 | max-width: 100%; 150 | min-width: 100%; 151 | height: 460px; 152 | margin: 0; 153 | padding: 10px 14px; 154 | border: 0; 155 | background: #EEE; 156 | resize: none; 157 | } 158 | .ui-input { 159 | background: #EEE; 160 | border: 0; 161 | padding: 2px 4px; 162 | } 163 | .ui-input:focus, 164 | textarea:focus { 165 | background: #F8F8F8; 166 | outline: 2px solid #3270ff; 167 | } 168 | .users-box { 169 | width: 100%; 170 | } 171 | .app[data-runing="true"] { 172 | cursor: wait; 173 | } 174 | .app[data-runing="true"] .ctrl-box { 175 | pointer-events: none; 176 | } 177 | hr { 178 | border: 0; 179 | margin: 5px 0; 180 | padding: 0; 181 | border-top: 1px solid #CCC; 182 | } 183 | .tip-box { 184 | border-top: 1px solid #EEE; 185 | /* margin:20px 0; */ 186 | padding: 20px 20px; 187 | } 188 | .tip-box ul { 189 | margin: 4px 0; 190 | padding: 0; 191 | font-size: 12px; 192 | list-style-type: none; 193 | } 194 | .tip-box ul li { 195 | margin: 0.6em 0; 196 | padding: 0; 197 | line-height: 1.4; 198 | } 199 | .tip-box h6 { 200 | font-weight: normal; 201 | } 202 | .tip-box a { 203 | display: block; 204 | font-size: 0.8em; 205 | overflow: hidden; 206 | text-overflow: ellipsis; 207 | white-space: nowrap; 208 | } 209 | @media (max-width: 1200px) { 210 | .output-box { 211 | cursor: pointer; 212 | position: relative; 213 | z-index: 0; 214 | } 215 | .output-box img { 216 | margin: 0 auto; 217 | max-width: 100vw; 218 | } 219 | .source-image { 220 | pointer-events: none; 221 | position: absolute; 222 | } 223 | .output-image { 224 | display: block; 225 | position: relative; 226 | z-index: 1; 227 | } 228 | .output-box:active .source-image { 229 | display: block; 230 | } 231 | .output-box:active.output-image { 232 | opacity: 0; 233 | } 234 | .ctrl-box { 235 | padding: 10px; 236 | } 237 | } 238 | code { 239 | background: rgba(0, 0, 0, 0.1); 240 | display: inline-block; 241 | padding: 0 4px; 242 | margin: 0 2px; 243 | border-radius: 1px; 244 | } 245 | blockquote { 246 | display: inline-block; 247 | background: #EEE; 248 | color: #333; 249 | margin: 0; 250 | padding: 1em; 251 | } 252 | blockquote p { 253 | margin: 0; 254 | } 255 | .post-box { 256 | padding: 20px; 257 | } 258 | .dialog-box { 259 | display: inline-block; 260 | margin: 0; 261 | padding: 12px 14px; 262 | background: #ffe89b; 263 | border: 1px solid #ffd350; 264 | border-radius: 3px; 265 | color: #8b4d00; 266 | } 267 | footer { 268 | padding: 20px 20px 60px; 269 | line-height: 2; 270 | } 271 | footer hr { 272 | display: inline-block; 273 | vertical-align: middle; 274 | border: 0; 275 | height: 1em; 276 | margin: 0 0.2em; 277 | border-right: 1px solid #DDD; 278 | } 279 | tr[data-log="red"] td { 280 | background: rgba(255, 0, 0, 0.5) !important; 281 | } 282 | tr[data-log="green"] td { 283 | background: rgba(0, 255, 0, 0.5) !important; 284 | } 285 | tr[data-log="orange"] td { 286 | background: rgba(255, 255, 0, 0.5) !important; 287 | } 288 | .nowarp { 289 | white-space: nowrap; 290 | } 291 | time { 292 | white-space: nowrap; 293 | } 294 | .users-box tr[data-bot] { 295 | opacity: 0.3; 296 | } 297 | [data-red] { 298 | color: red; 299 | } 300 | [data-value="Unknown"], 301 | [data-value="Private"], 302 | [data-false] { 303 | background: #ffc3c3 !important; 304 | } 305 | .ui-tag { 306 | display: inline-block; 307 | background: rgba(128, 128, 128, 0.2); 308 | color: #666; 309 | line-height: 1。2; 310 | padding: 4px; 311 | border-radius: 2px; 312 | } 313 | .ui-tag.red { 314 | background: red; 315 | color: #FFF; 316 | } 317 | .sort-th { 318 | cursor: pointer; 319 | user-select: none; 320 | } 321 | .sort-th.active { 322 | background: #DDD; 323 | } 324 | .log-buttons-box { 325 | margin: -8px; 326 | overflow: hidden; 327 | background: #FFF; 328 | width: 76px; 329 | height: 62px; 330 | } 331 | .log-buttons-box a { 332 | float: left; 333 | width: 50%; 334 | padding: 8px 0; 335 | line-height: 16px; 336 | text-align: center; 337 | } 338 | .ui-line-button { 339 | background: #FFF; 340 | cursor: pointer; 341 | } 342 | .ui-line-button.red { 343 | background: rgba(255, 0, 0, 0.5); 344 | color: red; 345 | } 346 | .ui-line-button.green { 347 | background: rgba(0, 255, 0, 0.5); 348 | color: green; 349 | } 350 | .ui-line-button.orange { 351 | background: rgba(255, 255, 0, 0.5); 352 | color: orange; 353 | } 354 | .content-box { 355 | margin: 20px 0; 356 | padding: 10px 20px; 357 | background: #333; 358 | line-height: 1.8; 359 | } 360 | .content-box h2 { 361 | padding: 1em 0 0; 362 | } 363 | .content-box h3 { 364 | padding: 1em 0 0; 365 | } 366 | .post-box { 367 | margin: 20px 0; 368 | padding: 20px 20px; 369 | background: #333; 370 | } 371 | .post-box p { 372 | margin: 0.5em 0; 373 | } 374 | label { 375 | cursor: pointer; 376 | user-select: none; 377 | } 378 | .ui-copy { 379 | cursor: pointer; 380 | } 381 | [v-cloak] { 382 | display: none; 383 | } 384 | input[type="checkbox"] { 385 | display: inline-block; 386 | vertical-align: middle; 387 | margin-top: 0.1em; 388 | } 389 | @media (max-height: 800px) { 390 | .app { 391 | font-size: 12px; 392 | } 393 | textarea { 394 | display: none; 395 | } 396 | header { 397 | display: none; 398 | } 399 | h4 { 400 | font-size: 14px; 401 | white-space: nowrap; 402 | overflow: hidden; 403 | text-overflow: ellipsis; 404 | max-width: 240px; 405 | } 406 | .ui-table-box tr th { 407 | padding: 4px 0; 408 | line-height: 12px; 409 | white-space: nowrap; 410 | } 411 | .ui-table-box tr th br { 412 | display: none; 413 | } 414 | .ui-table-box tr th[style="width: 44px;"] { 415 | width: 10px !important; 416 | } 417 | .ui-table-box tr td { 418 | padding: 0 4px; 419 | line-height: 1.1; 420 | } 421 | .ui-table-box tr td img { 422 | width: 40px; 423 | margin: -3px -5px; 424 | } 425 | div[style="margin: -4px 0px;"] br { 426 | display: none; 427 | } 428 | div[style="margin: -4px 0px;"] a[href^="https://csgo.ste"] { 429 | display: none; 430 | } 431 | small { 432 | font-size: 12px; 433 | } 434 | small + small { 435 | display: none !important; 436 | } 437 | .log-buttons-box { 438 | margin: 0 -4px; 439 | height: auto; 440 | } 441 | .log-buttons-box a { 442 | line-height: 17px; 443 | padding: 0; 444 | } 445 | .ui-tag { 446 | padding: 2px 3px; 447 | } 448 | } 449 | -------------------------------------------------------------------------------- /document.js: -------------------------------------------------------------------------------- 1 | // localStorage.clear(); 2 | 3 | const htmlEncode = function(str){ 4 | return src.replace(/&/g,"&").replace(//g,">").replace(/ /g," ").replace(/\'/g,"'").replace(/\"/g,"""); 5 | }; 6 | 7 | 8 | Date.prototype.format=function(format='yyyy-MM-dd'){ 9 | let o = { 10 | "M+" : this.getMonth()+1, //month 11 | "d+" : this.getDate(), //day 12 | "h+" : this.getHours(), //hour 13 | "m+" : this.getMinutes(), //minute 14 | "s+" : this.getSeconds(), //second 15 | "q+" : Math.floor((this.getMonth()+3)/3), //quarter 16 | "S" : this.getMilliseconds() //millisecond 17 | }; 18 | 19 | if(+this === 0){ 20 | return '尚无时间'; 21 | } 22 | 23 | if(/(y+)/.test(format)) 24 | format=format.replace(RegExp.$1,(this.getFullYear()+'').substr(4- RegExp.$1.length)); 25 | 26 | for(let k in o) 27 | if(new RegExp("("+ k +")").test(format)) 28 | format=format.replace(RegExp.$1,RegExp.$1.length===1?o[k]:("00"+ o[k]).substr((""+ o[k]).length)); 29 | 30 | return format; 31 | }; 32 | 33 | 34 | const dateFormat=(unix,format)=>{ 35 | if(String(unix).length===10){ 36 | unix=unix*1000; 37 | } 38 | return new Date(unix).format(format);//toLocaleString(); 39 | }; 40 | 41 | const requestCache = {}; 42 | const request = (method,uri,data,callback,nocache)=>{ 43 | 44 | let body = null; 45 | if(data) body = JSON.stringify(data); 46 | 47 | let key = 'r-'+md5([ 48 | method, 49 | uri, 50 | data 51 | ].join('|')) 52 | 53 | const clearCache = _=>{ 54 | console.log(/强制清除缓存/,uri,key); 55 | localStorage.removeItem(key); 56 | }; 57 | // console.log(/nocache/,nocache); 58 | 59 | if(!nocache){ 60 | let data = localStorage[key]; 61 | if(data){ 62 | try{ 63 | // console.log(/缓存的数据/,data); 64 | data = JSON.parse(data); 65 | return setTimeout(callback.bind(null,data,clearCache)); 66 | }catch(e){ 67 | 68 | } 69 | } 70 | } 71 | 72 | // console.log(/发起请求/,uri); 73 | fetch(uri,{ 74 | method, 75 | mode: 'cors', 76 | credentials: 'include', 77 | body, 78 | headers: { 79 | 'content-type': 'application/json' 80 | } 81 | }).then(res => res.json()).then(data => { 82 | if(!nocache){ 83 | localStorage[key] = JSON.stringify(data); 84 | } 85 | callback(data,clearCache); 86 | }).catch(error => console.error(error)) 87 | }; 88 | 89 | const baseAPI = 'https://lab.magiconch.com/api/'; 90 | const steamBaseAPI = 'api/'; 91 | const requestText = (method,uri,data,callback)=>{ 92 | let body = null; 93 | if(data){ 94 | body = JSON.stringify(data); 95 | } 96 | fetch(uri,{ 97 | method, 98 | mode: 'cors', 99 | body, 100 | credentials: 'include', 101 | }).then(res => res.text()).then(data => callback(data)).catch(error => console.error(error)) 102 | }; 103 | 104 | const deepCopy = o=>JSON.parse(JSON.stringify(o)); 105 | 106 | 107 | const text = localStorage['csgoLastStatusText']||''; 108 | 109 | /* 110 | `Connected to =[A:1:3561541640:19979]:0 111 | hostname: Valve CS:GO Hong Kong Server (srcds2055-hkg1.142.42) 112 | version : 1.38.2.4 secure 113 | os : Linux 114 | type : official dedicated 115 | map : dz_sirocco 116 | players : 17 humans, 0 bots (16/17 max) (not hibernating) 117 | 118 | # userid name uniqueid connected ping loss state rate 119 | # 3 2 "人老又菜又爱玩" STEAM_1:0:448183897 00:20 39 0 active 196608 120 | # 4 3 "十二楼五城" STEAM_1:0:572920645 00:20 83 0 active 196608 121 | # 5 4 "Giang" STEAM_1:0:549226724 00:20 55 0 active 196608 122 | # 6 5 "狙神阿鑫." STEAM_1:0:503590605 00:20 93 66 spawning 196608 123 | # 7 6 "lishuvai酷哦" STEAM_1:1:514931287 00:20 141 73 spawning 196608 124 | # 8 7 "at88" STEAM_1:0:540928738 00:20 101 0 active 786432 125 | # 9 8 "CurseRed" STEAM_1:0:55968383 00:20 74 0 active 786432 126 | # 10 9 "一生一世永爱UMP45" STEAM_1:0:436743442 00:20 63 56 spawning 786432 127 | # 11 10 "Orange" STEAM_1:1:207139600 00:20 104 0 active 196608 128 | # 12 11 "Star Fox" STEAM_1:1:96579395 00:20 77 56 spawning 131072 129 | # 13 12 "xi the pooh" STEAM_1:1:128895246 00:20 88 0 active 786432 130 | # 14 13 "like" STEAM_1:1:631677446 00:20 83 0 active 196608 131 | # 15 14 "DarkwinG" STEAM_1:0:526223612 00:20 124 66 spawning 196608 132 | # 16 15 "Heracles" STEAM_1:1:449076373 00:20 398 86 spawning 196608 133 | # 17 16 "我菜别说我" STEAM_1:1:622464804 00:20 77 56 spawning 196608 134 | # 18 17 "Stranger" STEAM_1:0:171506710 00:17 121 66 spawning 786432 135 | # 19 18 "坠入虚空飞向你" STEAM_1:0:644594952 00:14 237 72 spawning 196608 136 | #end`; 137 | */ 138 | 139 | const logNameRegex = /^\w+$/; 140 | const localStorageLogNameKey = 'csgo-last-log-name'; 141 | const localStorageContentKey = 'csgo-content'; 142 | let logName = localStorage.getItem(localStorageLogNameKey)||'test'; 143 | 144 | const data = { 145 | text, 146 | user:undefined, 147 | authURL:null, 148 | info:null, 149 | runing:false, 150 | h:12, 151 | Logs:{}, 152 | sortKey:null, 153 | sortType:1, 154 | logName, 155 | debug:false, 156 | content:!localStorage.getItem(localStorageContentKey), 157 | callvoteKick:false, 158 | disconnect:false, 159 | tip:'', 160 | }; 161 | 162 | const getLog = ()=>{ 163 | const _Logs = {}; 164 | request('get',`${baseAPI}csgo/user-log/${app.logName}`,null,logs=>{ 165 | if(logs){ 166 | logs.forEach(log=>{ 167 | _Logs[log.id64] = log 168 | // app.$set(app.Logs,log.id64,log) 169 | }) 170 | } 171 | app.Logs = _Logs; 172 | },'nocache') 173 | } 174 | const log = (id64,color)=>{ 175 | request('post',`${baseAPI}csgo/user-log/${app.logName}/${id64}`,{ 176 | color 177 | },log=>{ 178 | // app.$set(Logs,id64,log) 179 | },'nocache'); 180 | 181 | app.$set(app.Logs,id64,{ 182 | color, 183 | unix:Math.floor(new Date()/1000) 184 | }) 185 | } 186 | 187 | const serverInfoKey = [ 188 | 'hostname', 189 | 'version', 190 | 'os', 191 | 'type', 192 | 'map', 193 | 'players' 194 | ]; 195 | 196 | const userInfokey = [ 197 | 'userid', 198 | 'name', 199 | 'uniqueid', 200 | 'connected', 201 | 'ping', 202 | 'loss', 203 | 'state', 204 | 'rate', //带宽 205 | ] 206 | 207 | 208 | const isConnectRegex = /^connected to\s?=\s?(.+?)$/i 209 | const isServerInfoRegex = new RegExp(`^(${serverInfoKey.join('|')})\\s?:\\s?(.+?)$`,'i') 210 | 211 | // STEAM_1:0:587628593 01:41 47 0 212 | const isUserinfoRegex = /^# {0,}(\d+) ?(\d+)? "(.+?)"\s(?:(BOT)|(STEAM_\d:\d:\d+?) ([\d:]+) (\d+) (\d+)) (.+?) (\d+)$/i 213 | // 1 userid 2 id 3 name 4 bot 5 uniqueid 6 connected 7 ping 8 loss 9 state 10 rate 214 | 215 | 216 | 217 | const PatternSteamID32Regex = /^STEAM_([0-9]):([0-9]):([0-9]+)$/ 218 | 219 | const SID64_S = Number(1197960265728); 220 | const SID64_1 = "7656"; 221 | function Sid32toSid64(id32){ 222 | const id32Match = PatternSteamID32Regex.exec(id32) 223 | if(!id32Match) return 224 | 225 | let SID32_1 = Number(id32Match[1]); 226 | let SID32_2 = Number(id32Match[2]); 227 | let SID32_3 = Number(id32Match[3]); 228 | let S3ID_3 = SID32_3 * 2 + SID32_2; 229 | let SID64_2 = S3ID_3 + SID64_S; 230 | return SID64_1 + SID64_2; 231 | }; 232 | 233 | const key = '45696DEC3D074506B7203C0CA93E4CB1'; 234 | const Users = {}; 235 | 236 | 237 | const clear = _=>{ 238 | localStorage.clear() 239 | location.reload() 240 | } 241 | 242 | const SortKeyTypes = { 243 | userId:'number', 244 | id:'number', 245 | level:'number', 246 | ping:'number', 247 | csgo_playtime_2weeks:'number', 248 | timecreated:'number', 249 | name:'string', 250 | logUnix(a,b,type){ 251 | if(!app.Logs[a.id64]) return 1; 252 | if(!app.Logs[b.id64]) return -1; 253 | 254 | const _a = app.Logs[a.id64].unix 255 | const _b = app.Logs[b.id64].unix 256 | return (_a - _b) * type 257 | } 258 | } 259 | const nocache = false; 260 | const app = new Vue({ 261 | el:'.app', 262 | data, 263 | methods:{ 264 | refactor(){ 265 | if(!this.text){ 266 | this.info = null; 267 | return; 268 | } 269 | let lines = this.text.split(/\n/g); 270 | 271 | if(!lines.length){ 272 | this.info = null; 273 | return; 274 | } 275 | 276 | // console.log(lines) 277 | const info = { 278 | users:[] 279 | } 280 | const id64s = [] 281 | 282 | 283 | lines.forEach(line=>{ 284 | line = line.trim() 285 | if(!line) return; 286 | if(line === '#end')return; 287 | 288 | const userMatch = line.match(isUserinfoRegex) 289 | 290 | 291 | if(userMatch){ 292 | const id32 = userMatch[5] 293 | const id64 = Sid32toSid64(id32) 294 | 295 | const user = { 296 | userId:userMatch[1], 297 | id:userMatch[2], 298 | name:userMatch[3], 299 | bot:userMatch[4]?true:undefined, 300 | id32, 301 | id64, 302 | connected:userMatch[6], 303 | ping:userMatch[7], 304 | loss:userMatch[8], 305 | state:userMatch[9], 306 | rate:userMatch[10], 307 | }; 308 | 309 | 310 | info.users.push(user) 311 | 312 | if(id64){ 313 | Users[id64] = user; 314 | id64s.push(id64) 315 | } 316 | return 317 | } 318 | 319 | 320 | const serverMatch = line.match(isServerInfoRegex) 321 | 322 | if(serverMatch){ 323 | info[serverMatch[1]] = serverMatch[2] 324 | return 325 | } 326 | 327 | const connectedMatch = line.match(isConnectRegex) 328 | if(connectedMatch){ 329 | info.ip = connectedMatch[1] 330 | } 331 | }) 332 | 333 | if(id64s.length){ 334 | request('get',`${steamBaseAPI}users?id64s=${id64s.join(',')}`,null,users=>{ 335 | users.forEach(user=>{ 336 | const id64 = user.id64; 337 | if(Users[id64]){ 338 | for(let key in user){ 339 | app.$set(Users[id64],key,user[key]); 340 | } 341 | } 342 | }); 343 | app.info.users.forEach(user=>{ 344 | if(user.timecreated && !user.detail){ 345 | const { id64 } = user; 346 | request('get',`${steamBaseAPI}detail?id64=${id64}`,null,r=>{ 347 | for(k in r){ 348 | const v = r[k] 349 | app.$set(user,k,v); 350 | } 351 | }) 352 | } 353 | }); 354 | }); 355 | } 356 | 357 | this.info = info 358 | }, 359 | sortBy(key){ 360 | if(key !== this.sortKey){ 361 | this.sortType = 1 362 | }else{ 363 | this.sortType = -this.sortType 364 | } 365 | this.sortKey = key 366 | }, 367 | clear, 368 | copy(text){ 369 | let inputEl= document.createElement('input'); 370 | inputEl.value= text; 371 | document.body.appendChild(inputEl); 372 | inputEl.select(); 373 | document.execCommand('Copy'); 374 | inputEl.remove() 375 | }, 376 | onImageLoadError(e){ 377 | const el = e.target; 378 | if(/api/.test(el.src)) return; 379 | 380 | el.src = `${steamBaseAPI}proxy?url=${encodeURIComponent(el.src)}`; 381 | } 382 | }, 383 | watch:{ 384 | text(val){ 385 | clearTimeout(this.T); 386 | this.T = setTimeout(_=>{ 387 | this.sortKey = null; 388 | this.sortType = 1; 389 | localStorage['csgoLastStatusText'] = val; 390 | this.refactor(); 391 | },300); 392 | }, 393 | logName(val){ 394 | if(!val) val = 'test'; 395 | localStorage[localStorageLogNameKey] = val; 396 | getLog() 397 | }, 398 | content(val){ 399 | if(val){ 400 | localStorage.removeItem(localStorageContentKey); 401 | }else{ 402 | localStorage.setItem(localStorageContentKey,1); 403 | } 404 | }, 405 | }, 406 | computed:{ 407 | users(){ 408 | if(!this.info) return []; 409 | if(!this.info.users) return []; 410 | 411 | let key = this.sortKey; 412 | let type = this.sortType; 413 | if(!key) return this.info.users; 414 | 415 | let keyType = SortKeyTypes[key]||String; 416 | 417 | if(keyType instanceof Function){ 418 | return this.info.users.sort((a,b)=>keyType(a,b,type)); 419 | } 420 | 421 | if(keyType === 'number'){ 422 | return this.info.users.sort((a,b)=>{ 423 | let _a = a[key]; 424 | let _b = b[key]; 425 | if(_a === undefined)_a = -1 426 | if(_b === undefined)_b = -1 427 | return (_a - _b) * type; 428 | }); 429 | } 430 | 431 | return this.info.users.sort((a,b)=>{ 432 | const aString = String(a[key]); 433 | const bString = String(b[key]); 434 | return aString.localeCompare(bString) * type; 435 | }) 436 | }, 437 | hackers(){ 438 | return this.users.filter(user=>this.Logs[user.id64] && this.Logs[user.id64].color==='red') 439 | } 440 | } 441 | }) 442 | function padLeft(p,n=2) { 443 | return new Array(n - (p + '').length + 1).join('0') + p; 444 | } 445 | setInterval(_=>{ 446 | app.tip = [ 447 | _=>['Blacksite', 'Vineyard', 'Sirroco','Ember'][Math.floor(_)], 448 | _=>{ 449 | const s = Math.floor((1-_%1)*180); 450 | return padLeft(Math.floor(s/60)) +':' + padLeft(s % 60) 451 | } 452 | ].map(i=>i(Date.now() / (1e3*3*60) % 4)).join(' - '); 453 | },1000) 454 | 455 | // request('get',`${baseAPI}steam/info`,null,(r,clearCache)=>{ 456 | // app.user = r.user || null; 457 | // app.authURL = r.authURL; 458 | // // console.log(/123/,r,clearCache); 459 | // if(r.user){ 460 | // app.refactor(); 461 | // getLog(); 462 | // }else{ 463 | // clearCache(); 464 | // } 465 | // },nocache); 466 | 467 | app.refactor(); 468 | getLog(); 469 | 470 | 471 | window.addEventListener('paste',e=>{ 472 | const item = e.clipboardData.items[0]; 473 | if(!item) return; 474 | item.getAsString(text=>{ 475 | app.text = text 476 | }) 477 | }) 478 | 479 | window._hmt = []; 480 | window.dataLayer = [ 481 | ['js', new Date()], 482 | ['config', 'G-13BQC1VDD8'] 483 | ]; 484 | window.gtag = function(){dataLayer.push(arguments)}; 485 | 486 | const headEl = document.querySelector('head'); 487 | const loadScript = (src,cb=_=>{},el) =>{ 488 | el = document.createElement('script'); 489 | el.src = src; 490 | el.onload=cb; 491 | headEl.appendChild(el); 492 | }; 493 | 494 | setTimeout(_=>{ 495 | loadScript('//hm.baidu.com/hm.js?f4e477c61adf5c145ce938a05611d5f0'); 496 | loadScript('//www.googletagmanager.com/gtag/js?id=G-13BQC1VDD8'); 497 | },400); -------------------------------------------------------------------------------- /document.less: -------------------------------------------------------------------------------- 1 | html{ 2 | font:400 14px/1.4 sans-serif; 3 | text-rendering:optimizeLegibility; 4 | -webkit-font-smoothing:antialiased; 5 | -moz-osx-font-smoothing:grayscale; 6 | background:#222; 7 | color:#FFF; 8 | } 9 | body{ 10 | margin:0; 11 | } 12 | button,input{ 13 | font:inherit; 14 | } 15 | a{ 16 | color:#3270ff; 17 | text-decoration: none; 18 | } 19 | ::selection{ 20 | background: #1e67ff; 21 | color: #FFF; 22 | } 23 | 24 | 25 | @import url(ui.less); 26 | 27 | .app{ 28 | width:960px; 29 | margin:0 auto; 30 | padding:0 0 100px; 31 | } 32 | header{ 33 | padding:20px; 34 | line-height:42px; 35 | overflow: hidden; 36 | h1{ 37 | margin:0; 38 | font-family:'苹方'; 39 | /* font-weight:1200; */ 40 | /* color:#FFF; */ 41 | text-shadow: 1px 1px 0 #ff658c, -1px -1px 0 #77cdc7; 42 | float: left; 43 | } 44 | .user-box{ 45 | float: right; 46 | line-height:42px; 47 | position: relative; 48 | padding-left:50px; 49 | img{ 50 | float: left; 51 | position: absolute; 52 | left:0; 53 | top:0; 54 | width: 42px; 55 | height: 42px; 56 | border-radius:42px; 57 | background:#444; 58 | } 59 | } 60 | } 61 | 62 | 63 | 64 | 65 | .login-box{ 66 | padding:100px 20px; 67 | a{ 68 | display: block; 69 | font-size:30px; 70 | font-weight: bold;; 71 | padding:20px 0; 72 | width: 340px; 73 | text-align: center; 74 | margin:0 auto; 75 | 76 | background-image: linear-gradient(144deg,#AF40FF, #5B42F3 50%,#00DDEB); 77 | border:2px solid #2e1c99; 78 | text-shadow:0 2px 3px #5B42F3; 79 | color:#FFF; 80 | border-radius:10px; 81 | 82 | box-shadow: rgba(151,65,252,30%) 0 15px 40px -5px; 83 | } 84 | } 85 | 86 | 87 | h2, 88 | h3,h4,h5,h6{ 89 | margin:0; 90 | } 91 | 92 | h4{ 93 | font-size:15px; 94 | } 95 | [v-cloak]{ 96 | display: none; 97 | } 98 | 99 | 100 | 101 | 102 | pre{ 103 | font-size:12px; 104 | background:#222; 105 | color:#FFF; 106 | padding:6px; 107 | margin:0; 108 | 109 | word-wrap: break-all; 110 | overflow: hidden; 111 | } 112 | 113 | 114 | textarea{ 115 | box-sizing: border-box; 116 | width: 100%; 117 | max-width: 100%; 118 | min-width: 100%; 119 | height: 460px; 120 | margin:0; 121 | padding:10px 14px; 122 | border:0; 123 | background:#EEE; 124 | resize:none; 125 | // transition: background .3s ease; 126 | } 127 | .ui-input{ 128 | background:#EEE; 129 | border:0; 130 | padding:2px 4px; 131 | } 132 | .ui-input:focus, 133 | textarea:focus{ 134 | background:#F8F8F8; 135 | outline:2px solid #3270ff; 136 | } 137 | .users-box{ 138 | width:100%; 139 | } 140 | 141 | 142 | .app[data-runing="true"]{ 143 | cursor: wait; 144 | } 145 | .app[data-runing="true"] .ctrl-box{ 146 | pointer-events: none; 147 | } 148 | 149 | hr{ 150 | border:0; 151 | margin:5px 0; 152 | padding:0; 153 | border-top:1px solid #CCC; 154 | } 155 | 156 | .tip-box{ 157 | border-top:1px solid #EEE; 158 | /* margin:20px 0; */ 159 | padding:20px 20px; 160 | } 161 | .tip-box ul{ 162 | margin:4px 0; 163 | padding:0; 164 | font-size:12px; 165 | list-style-type: none; 166 | } 167 | .tip-box ul li{ 168 | margin:.6em 0; 169 | padding:0; 170 | line-height:1.4; 171 | } 172 | .tip-box h6{ 173 | font-weight:normal; 174 | } 175 | .tip-box a{ 176 | display: block; 177 | font-size:.8em; 178 | overflow: hidden; 179 | text-overflow:ellipsis; 180 | white-space: nowrap; 181 | } 182 | 183 | 184 | 185 | @media(max-width:1200px){ 186 | .output-box{ 187 | cursor: pointer; 188 | position: relative; 189 | z-index:0; 190 | } 191 | .output-box img{ 192 | margin:0 auto; 193 | max-width:100vw; 194 | } 195 | .source-image{ 196 | pointer-events: none; 197 | position: absolute; 198 | } 199 | .output-image{ 200 | display: block; 201 | position: relative; 202 | z-index:1; 203 | } 204 | .output-box:active{ 205 | 206 | } 207 | .output-box:active .source-image{ 208 | display: block; 209 | } 210 | .output-box:active.output-image{ 211 | opacity: 0; 212 | } 213 | .ctrl-box{ 214 | padding:10px; 215 | } 216 | } 217 | 218 | code{ 219 | background:rgba(0,0,0,.1); 220 | display: inline-block; 221 | padding:0 4px; 222 | margin:0 2px; 223 | border-radius:1px; 224 | } 225 | 226 | blockquote{ 227 | display: inline-block; 228 | background:#EEE; 229 | color:#333; 230 | margin:0; 231 | padding:1em; 232 | } 233 | blockquote p{ 234 | margin:0; 235 | } 236 | 237 | .post-box{ 238 | padding:20px; 239 | } 240 | 241 | .dialog-box{ 242 | display: inline-block; 243 | margin:0; 244 | padding:12px 14px; 245 | background:#ffe89b; 246 | border:1px solid #ffd350; 247 | border-radius:3px; 248 | color:#8b4d00; 249 | } 250 | 251 | footer{ 252 | padding:20px 20px 60px; 253 | line-height: 2; 254 | } 255 | footer hr{ 256 | display: inline-block; 257 | vertical-align: middle; 258 | border:0; 259 | height:1em; 260 | margin:0 .2em; 261 | border-right:1px solid #DDD; 262 | } 263 | 264 | @color-red:rgba(255,0,0,.5); 265 | @color-green:rgba(0,255,0,.5); 266 | @color-orange:rgba(255,255,0,.5); 267 | 268 | tr[data-log="red"]{ 269 | td{ 270 | background:@color-red !important; 271 | } 272 | } 273 | tr[data-log="green"]{ 274 | td{ 275 | background:@color-green !important; 276 | } 277 | } 278 | tr[data-log="orange"]{ 279 | td{ 280 | background:@color-orange !important; 281 | } 282 | } 283 | 284 | .nowarp{ 285 | white-space: nowrap; 286 | } 287 | 288 | time{ 289 | white-space: nowrap; 290 | } 291 | 292 | 293 | .users-box{ 294 | tr[data-bot]{ 295 | // color:#666; 296 | opacity: .3; 297 | } 298 | } 299 | 300 | [data-red]{ 301 | color:red; 302 | } 303 | 304 | [data-value="Unknown"], 305 | [data-value="Private"], 306 | [data-false] 307 | { 308 | background:#ffc3c3 !important; 309 | } 310 | 311 | 312 | .ui-tag{ 313 | display: inline-block; 314 | background:rgba(128,128,128,.2); 315 | color:#666; 316 | line-height: 1。2; 317 | padding:4px; 318 | border-radius:2px; 319 | &.red{ 320 | background:red; 321 | color:#FFF; 322 | } 323 | } 324 | 325 | 326 | .sort-th{ 327 | cursor: pointer; 328 | user-select: none; 329 | &.active{ 330 | background:#DDD; 331 | } 332 | } 333 | 334 | 335 | .log-buttons-box{ 336 | margin:-8px; 337 | overflow:hidden; 338 | background:#FFF; 339 | width:76px; 340 | height:62px; 341 | a{ 342 | float: left; 343 | width: 50%; 344 | padding:8px 0; 345 | line-height: 16px; 346 | text-align: center; 347 | } 348 | } 349 | 350 | 351 | .ui-line-button{ 352 | background: #FFF; 353 | cursor: pointer; 354 | &.red{ 355 | background:@color-red; 356 | color:red; 357 | } 358 | &.green{ 359 | background:@color-green; 360 | color:green; 361 | } 362 | &.orange{ 363 | background:@color-orange; 364 | color:orange; 365 | } 366 | 367 | } 368 | 369 | .content-box{ 370 | margin:20px 0; 371 | padding:10px 20px; 372 | background: #333; 373 | line-height: 1.8; 374 | h2{ 375 | padding:1em 0 0; 376 | } 377 | h3{ 378 | padding:1em 0 0; 379 | } 380 | } 381 | .post-box{ 382 | margin:20px 0; 383 | padding:20px 20px; 384 | background: #333; 385 | 386 | p{ 387 | margin:.5em 0; 388 | } 389 | } 390 | 391 | label{ 392 | cursor: pointer; 393 | user-select: none; 394 | } 395 | .ui-copy{ 396 | cursor: pointer; 397 | } 398 | [v-cloak]{ 399 | display: none; 400 | } 401 | input[type="checkbox"]{ 402 | display: inline-block; 403 | vertical-align: middle; 404 | margin-top:.1em; 405 | } 406 | 407 | 408 | 409 | 410 | @media (max-height:800px){ 411 | .app{ 412 | // margin:0; 413 | // width:auto; 414 | font-size:12px; 415 | } 416 | textarea{ 417 | display: none; 418 | } 419 | header{ 420 | display: none; 421 | } 422 | h4{ 423 | font-size: 14px; 424 | white-space: nowrap; 425 | overflow: hidden; 426 | text-overflow:ellipsis; 427 | max-width:240px; 428 | } 429 | .ui-table-box{ 430 | tr{ 431 | th{ 432 | padding:4px 0; 433 | line-height: 12px; 434 | white-space: nowrap; 435 | br{ 436 | display: none; 437 | } 438 | } 439 | th[style="width: 44px;"]{ 440 | width:10px !important; 441 | } 442 | td{ 443 | padding:0 4px; 444 | line-height: 1.1; 445 | img{ 446 | width: 40px; 447 | margin:-3px -5px; 448 | } 449 | } 450 | } 451 | } 452 | div[style="margin: -4px 0px;"]{ 453 | br{ 454 | display: none; 455 | } 456 | a[href^="https://csgo.ste"]{ 457 | display: none; 458 | } 459 | } 460 | small{ 461 | font-size:12px; 462 | } 463 | small+small{ 464 | display: none !important; 465 | } 466 | .log-buttons-box{ 467 | margin:0 -4px; 468 | height:auto; 469 | a{ 470 | line-height: 17px; 471 | padding:0; 472 | } 473 | } 474 | .ui-tag{padding:2px 3px; 475 | } 476 | } -------------------------------------------------------------------------------- /getAllInstance.js: -------------------------------------------------------------------------------- 1 | // import qs from 'querystringify'; 2 | import fetch from 'node-fetch'; 3 | import { SocksProxyAgent } from 'socks-proxy-agent'; 4 | import fs, { copyFile } from 'fs'; 5 | 6 | 7 | const agent = new SocksProxyAgent({ 8 | hostname: '0.0.0.0', 9 | port: 1086 10 | }); 11 | 12 | 13 | let ms = 10000; 14 | const qs = { 15 | stringify(o){ 16 | const r = []; 17 | for(let key in o) r.push(`${encodeURIComponent(key)}=${encodeURIComponent(o[key])}`) 18 | 19 | return r.join('&') 20 | } 21 | } 22 | 23 | let total = 200; 24 | let start = 0; 25 | let assets = []; 26 | 27 | start = 6200; 28 | 29 | let defaultQuerys = { 30 | query:'', 31 | search_descriptions:0, 32 | sort_column:'name', 33 | sort_dir:'asc', 34 | appid:'730', 35 | norender:1, 36 | count:100, 37 | } 38 | 39 | 40 | const one = async _=>{ 41 | console.log(/进度/,start,total) 42 | 43 | let querys = qs.stringify({ 44 | ...defaultQuerys, 45 | start, 46 | }) 47 | 48 | const uri = `https://steamcommunity.com/market/search/render/?${querys}` 49 | console.log(uri) 50 | 51 | try{ 52 | const response = await fetch(uri, { 53 | // agent, 54 | headers:{ 55 | 'Accept-Language': 'zh-CN,zh;q=0.9', 56 | 'Content-Type': 'application/json', 57 | } 58 | }) 59 | const r = await response.json(); 60 | if(!r.success) return console.log(/出错了/,r); 61 | console.log(r.success,r.results.length) 62 | 63 | const length = r.results.length; 64 | r.results.map(asset =>{ 65 | const _asset = { 66 | hash_name: asset.hash_name, 67 | name: asset.name, 68 | name_color: asset.asset_description.name_color, 69 | name_color: asset.asset_description.background_color, 70 | icon_url: asset.asset_description.icon_url, 71 | type: asset.asset_description.type, 72 | classid: asset.asset_description.classid, 73 | instanceid: asset.asset_description.instanceid, 74 | 75 | sale_price_text: asset.sale_price_text, 76 | sell_price: asset.sell_price, 77 | sell_price_text: asset.sell_price_text, 78 | } 79 | 80 | assets.push(_asset) 81 | return _asset 82 | }) 83 | 84 | total = r.total_count 85 | 86 | // fs.writeFileSync('assets.json',JSON.stringify(assets,0,2),'utf-8'); 87 | 88 | if(start+length < total){ 89 | start += length 90 | setTimeout(await one,ms) 91 | }else{ 92 | console.log(/完成/) 93 | } 94 | 95 | }catch(e){ 96 | console.log(/出错了/,e); 97 | } 98 | 99 | } 100 | 101 | await one() 102 | 103 | // copy(JSON.stringify(assets,0,2)) 104 | 105 | //一会要把取来的数据补充上来 -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
28 | 29 | 30 | say 31 | "{{hackers.map(hacker=>`${hacker.name} ( ${hacker.id32} )`).join(', ').replace(/["']/g,'')}} is Noob Hacker, fucking Reported" 32 | ;callvote kick {{hacker.userId}} 33 | ;disconnect 您已被 VAC 封禁 w(゚Д゚)w 34 | 35 |
36 |37 | 38 | 39 | say 40 | "{{hackers.map(hacker=>`${hacker.name} ( ${hacker.id32} )`).join('、').replace(/["']/g,'')}} 是个臭作弊狗,麻烦大家举报一下" 41 | ;callvote kick {{hacker.userId}} 42 | ;disconnect 您已被 VAC 封禁 w(゚Д゚)w 43 | 44 |
45 |u | 51 |id | 54 |延迟 | 57 |
60 | name
61 | 62 | id32 / id64 63 | |
64 |
65 |
66 |
67 |
68 | 69 | | 72 | 注册时间 73 | | 74 |77 | 等级 78 | | 79 |总时 | 82 | 83 | 84 |封禁 | 85 | 86 | 87 |标记时间 | 90 |标记 | 91 |92 | |
---|---|---|---|---|---|---|---|---|---|---|---|
{{user.userId}} | 98 |{{user.id}} | 99 |100 | {{user.ping}} 101 | {{user.loss}} 102 | | 103 |
104 | 105 | {{user.personaname || user.name}} 106 | {{user.name}} 110 |111 | {{user.id32}} 112 | {{user.id64}} 113 | BOT 114 | |
115 |
116 |
117 |
118 |
119 |
122 |
123 |
124 |
125 |
126 | 127 | 128 | {{Math.floor((new Date()/1000 - user.timecreated)/3600/24/356)}}年 129 | 130 | 131 | 132 | 资料未公开 133 | 134 | |
135 |
136 | 137 | 140 | Lv{{user.level}} 141 | 142 | 144 | Lv{{user.level}} 145 | 146 | | 147 | 148 | 149 |
150 |
151 | {{Math.floor(user.csgo_playtime_2weeks/60)}}h
152 | 153 | {{Math.floor(user.csgo_playtime_forever/60)}}h 154 | 155 | |
156 |
157 | 158 | 159 | 社区封禁 160 | VAC封禁 161 | 162 | 游戏封禁 163 | {{user.bans.NumberOfGameBans}} 164 | 165 | 166 | VAC封禁 167 | {{user.bans.NumberOfVACBans}} 168 | 169 | 交易封禁{{user.bans.EconomyBan}} 170 | 171 | | 172 | 173 |
174 |
175 |
176 | 177 | 178 | 179 | |
180 |
181 | 182 | | 189 | 188 |190 | 199 | | 200 |
独立的记录库名称,可以自己起名新建共享给其他人
213 | [a-Z0-9_] 英文数字下划线 214 |
232 | 在玩 CSGO 头号特训模式中、经常会遇到眼熟的外挂用户
233 | CurseRed 建议做一个 status
用户信息速查工具、方便我们快速确认当局敏感用户,于是就有了这个工具
234 |
237 | 游戏中 ~
调出控制台
238 | 输入 status
回车
239 | 复制控制台中输出的内容到输入框
240 | 即可对当前对局用户信息进行快速确认
241 |
目前支持
244 | 唯一 ID、游戏昵称、社区昵称、头像、
245 | 资料未公开、Steam 注册时间、Steam 等级、CSGO 游戏时长、
246 | VAC封禁、社区封禁、交易封禁、游戏封禁、
247 | 延迟、发包数
等等信息的展示
敏感信息会 标红 提醒
249 |游戏中昵称和社区中不一致的情况会在界面上 红名 标出社区昵称,可能是外挂功能一部分
250 |表格标题单击可排序
251 |点击玩家对应 userId
可复制投票踢指定玩家的控制台命令
255 | 标记功能可对当前对局玩家进行快速标记,目前共有三种颜色 256 | 红、 257 | 黄、 258 | 绿 259 | 方便用户使用,具体作用可自行分配 260 |
261 |每次标记会记录操作时间,下回在对局中遇到已标记玩家可以看到最后一次标记时间
262 |高级选项中可自行输入名称来 建立 或 加入 标记库,分享标记库名称可以多人公用标记信息
263 | 264 |当前对局有标红玩家时,可快速复制 say
命令,在控制台迅速发言
267 | 竞技、休闲模式可勾选 在发言同时尝试发起投票踢出对应玩家 271 |
272 | 278 | 279 |参考信息不足时可点击用户右侧的链接们、跳转到第三方网站确认更多信息
281 |282 | csgostats.gg 可查看玩家对局情况 283 | https://csgostats.gg 284 |
285 |286 | SteamAnalyst 可预估玩家饰品价格 287 | https://csgo.steamanalyst.com 288 |
289 |头号特训模式玩家也可以尝试在 CSGO作弊狗 http://csgozbg.cn 数据库中查询是否有已登记的作弊玩家
290 | 291 | 292 |294 | https://github.com/itorr/CSGO-Status-Search 295 |
296 | 297 |299 | Steam Web API Documentation 300 | https://steamapi.xpaw.me with ♥ by xPaw
301 |302 | Steam Web API 303 | https://developer.valvesoftware.com/wiki/Steam_Web_API 304 |
305 |306 | Ban Checker for Steam 307 | https://chrome.google.com/webstore/detail/ban-checker-for-steam/canbadmphamemnmdfngmcabnjmjgaiki 308 |
309 |310 | Steam Inventory Helper 311 | https://chrome.google.com/webstore/detail/steam-inventory-helper/cmeakgjggjdlcpncigglobpjbkabhmjl 312 |
313 |315 | {{tip}} 316 |
317 |