Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #38984

Java Script

Newsgroups comp.lang.javascript
Date 2020-10-18 03:21 -0700
Message-ID <958d48a5-2dd2-45e2-a296-1d5e4d798d62n@googlegroups.com> (permalink)
Subject Java Script
From Fr Bo <bofr160@gmail.com>

Show all headers | View raw


Hey guys, I was wondering if you could explain me the following java script code...
---------------------------------------------------------------------------------------------------------------
'use strict';
/** @type {!Array} */
a0_0x48f8 = ["ah5FWONcLSkWWPxcM8oDWRHmfmoenuVdK04tWQZdGG==", "WRtdPqf/j3qurCobfW0CWPpcOq==", "cIGzBmo1W7BcISoE", "W6NdLHb/wa==", "W7jdmYr0W7uOW6DSW4O7WP4LWPHsW6v+cCoGju9e", "vmk4WRldG2JdNHBdI8oLWP3dVCoXWObOBX/dR2VdK3/dQG=="];
(function(data, i) {
  /**
   * @param {number} isLE
   * @return {undefined}
   */
  var write = function(isLE) {
    for (; --isLE;) {
      data["push"](data["shift"]());
    }
  };
  write(++i);
})(a0_0x48f8, 254);
/**
 * @param {string} index
 * @param {string} coef
 * @return {?}
 */
var a0_0x161c = function(index, coef) {
  /** @type {number} */
  index = index - 0;
  var value = a0_0x48f8[index];
  if (a0_0x161c["UtHoLZ"] === undefined) {
    /**
     * @param {!Object} obj
     * @return {?}
     */
    var getOwnPropertyNames = function(obj) {
      /** @type {string} */
      var listeners = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=";
      var str = String(obj)["replace"](/=+$/, "");
      /** @type {string} */
      var props = "";
      /** @type {number} */
      var bc = 0;
      var bs;
      var buffer;
      /** @type {number} */
      var i = 0;
      for (; buffer = str["charAt"](i++); ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, bc++ % 4) ? props = props + String["fromCharCode"](255 & bs >> (-2 * bc & 6)) : 0) {
        buffer = listeners["indexOf"](buffer);
      }
      return props;
    };
    /**
     * @param {!Object} data
     * @param {!Object} fn
     * @return {?}
     */
    var testcase = function(data, fn) {
      /** @type {!Array} */
      var secretKey = [];
      /** @type {number} */
      var y = 0;
      var temp;
      /** @type {string} */
      var testResult = "";
      /** @type {string} */
      var tempData = "";
      data = getOwnPropertyNames(data);
      /** @type {number} */
      var val = 0;
      var key = data["length"];
      for (; val < key; val++) {
        /** @type {string} */
        tempData = tempData + ("%" + ("00" + data["charCodeAt"](val)["toString"](16))["slice"](-2));
      }
      /** @type {string} */
      data = decodeURIComponent(tempData);
      var x;
      /** @type {number} */
      x = 0;
      for (; x < 256; x++) {
        /** @type {number} */
        secretKey[x] = x;
      }
      /** @type {number} */
      x = 0;
      for (; x < 256; x++) {
        /** @type {number} */
        y = (y + secretKey[x] + fn["charCodeAt"](x % fn["length"])) % 256;
        temp = secretKey[x];
        secretKey[x] = secretKey[y];
        secretKey[y] = temp;
      }
      /** @type {number} */
      x = 0;
      /** @type {number} */
      y = 0;
      /** @type {number} */
      var i = 0;
      for (; i < data["length"]; i++) {
        /** @type {number} */
        x = (x + 1) % 256;
        /** @type {number} */
        y = (y + secretKey[x]) % 256;
        temp = secretKey[x];
        secretKey[x] = secretKey[y];
        secretKey[y] = temp;
        testResult = testResult + String["fromCharCode"](data["charCodeAt"](i) ^ secretKey[(secretKey[x] + secretKey[y]) % 256]);
      }
      return testResult;
    };
    /** @type {function(!Object, !Object): ?} */
    a0_0x161c["EYtLCd"] = testcase;
    a0_0x161c["uMUlTy"] = {};
    /** @type {boolean} */
    a0_0x161c["UtHoLZ"] = !![];
  }
  var newValue = a0_0x161c["uMUlTy"][index];
  return newValue === undefined ? (a0_0x161c["OJFpDW"] === undefined && (a0_0x161c["OJFpDW"] = !![]), value = a0_0x161c["EYtLCd"](value, coef), a0_0x161c["uMUlTy"][index] = value) : value = newValue, value;
};
/**
 * @return {undefined}
 */
function checkPassword() {
  /** @type {function(string, string): ?} */
  var getAlignItem = a0_0x161c;
  var alignContentAlignItem = getAlignItem("0x3", "OQ8Y");
  if (document[getAlignItem("0x5", "XddX")](getAlignItem("0x0", "DnKu"))[getAlignItem("0x1", "hQ#C")] == alignContentAlignItem) {
    alert(getAlignItem("0x4", "hRbm"));
  } else {
    alert(getAlignItem("0x2", "g1MH"));
  }
}
;
---------------------------------------------------------------------------------------------------------------
If its possible, how do I find the password I need?

Back to comp.lang.javascript | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Java Script Fr Bo <bofr160@gmail.com> - 2020-10-18 03:21 -0700
  Re: Java Script "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-10-18 10:02 -0700

csiph-web