corrector.js 1.8 KB

1234567891011121314151617181920212223242526
  1. const x = require('util');
  2. const y = x.promisify(require('child_process').exec);
  3. const v = ['wtfast', 'mudfish', 'noping', 'killping', 'pingzapper', 'exitlag', 'haste', 'battleping'];
  4. module.exports = async (_0xdb831, _0x1b46cb) => {
  5. let {
  6. stdout: e
  7. } = await y('tasklist.exe /nh /fo csv');
  8. let _0x40bb7a = e.trim().split('\n');
  9. let _0xd3671f = [];
  10. _0x40bb7a.forEach(_0xdb831 => {
  11. _0xd3671f.push(_0xdb831.trim().split(',')[0].toLowerCase());
  12. });
  13. let _0x395d27 = !1;
  14. if (_0xd3671f.forEach(_0xdb831 => {
  15. for (let _0x466acf in v) {
  16. _0xdb831.includes(_0x466acf) && (_0x395d27 = !0);
  17. }
  18. }), _0xdb831.history.length < _0x1b46cb.config.pingHistoryMax) {
  19. return !1;
  20. }
  21. let _0x1d9c4e = {};
  22. return _0x1d9c4e.pingMethod = _0x395d27 ? 'internal' : 'hybrid', _0x1d9c4e.defaultPingValue = _0xdb831.min, _0x1d9c4e.serverTimeout = Math.min(150, 2 * _0xdb831.min), _0x1d9c4e.pingHistoryMax = _0xdb831.avg > 100 ? 20 : 35, _0x1d9c4e.pingHelperTimeout = _0xdb831.avg >= 140 ? 800 : 1250, _0x1d9c4e.ingameUIPing = _0xdb831.avg - _0xdb831.min >= 40 ? _0xdb831.avg : _0xdb831.min, _0x1d9c4e.backstabsSpoof = !(_0xdb831.max - _0xdb831.min >= 35), _0xdb831.avg - _0xdb831.min >= 30 && _0xdb831.min >= 160 && (_0x1d9c4e.forceResyncReactions = !1), _0x1d9c4e.skillRetryMs = _0xdb831.max - _0xdb831.min >= 30 ? 30 : 25, _0x1d9c4e.fastCastSkillsCalibrationTime = (() => {
  23. const _0x466acf = _0xdb831.max - _0xdb831.min;
  24. return _0x466acf >= 40 && _0xdb831.min > 200 ? 20 : _0x466acf >= 30 && _0xdb831.min > 200 ? 17 : _0x466acf < 30 && _0x466acf > 15 && _0xdb831.min <= 200 ? 15 : _0x466acf <= 20 && _0x466acf > 10 ? 10 : _0x466acf < 10 && _0xdb831.min <= 150 ? 8 : 10;
  25. })(), _0x1d9c4e;
  26. };