News for hackers. Stuff that matters.
Re:MtGox.com is offline by Sidnicious on Monday February 24, 2014 @10:35PM (#7295267)
They serve some obfuscated JavaScript if you don't have a cookie:

  <html>
  
  <head>
      <title>MtGox.com loading</title>
  </head>
  
  <body>
      <p>Please wait...</p>
      <script>
          function xdec(data) {
              var o = "rnBEt3XYIimD807pKGVwMLgbTFQWflO1CHv4eAR6Uc5odsNa_x9qy2ukJZ-jzPSh=";
              var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
                  ac = 0,
                  dec = "",
                  tmp_arr = [];
              if (!data) {
                  return data
              }
              data += '';
              do {
                  h1 = o.indexOf(data.charAt(i++));
                  h2 = o.indexOf(data.charAt(i++));
                  h3 = o.indexOf(data.charAt(i++));
                  h4 = o.indexOf(data.charAt(i++));
                  bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
                  o1 = bits >> 16 & 0xff;
                  o2 = bits >> 8 & 0xff;
                  o3 = bits & 0xff;
                  if (h3 == 64) {
                      tmp_arr[ac++] = String.fromCharCode(o1)
                  } else if (h4 == 64) {
                      tmp_arr[ac++] = String.fromCharCode(o1, o2)
                  } else {
                      tmp_arr[ac++] = String.fromCharCode(o1, o2, o3)
                  }
              } while (i < data.length);
              dec = tmp_arr.join('');
              return dec
          };
          document.cookie = xdec('0X8_0wFvF4iv0q898gGR8Ee9FRMJT4neFRGe840e8qrPKuxaOXA6Wef').replace(String.fromCharCode(0), '').split('').reverse().join('');
          location.href = '/';
      </script>
  </body>
  
  </html>
Re:MtGox.com is offline by DanBlake on Monday February 24, 2014 @10:42PM (#7295310)
Its from prolexic, their anti-ddos service. Its checking to make sure you are a legit user.
Re:MtGox.com is offline by meowface on Monday February 24, 2014 @10:40PM (#7295296)
That JS sets this cookie:

    GngixolC=03d32ddfd0b8ef290fd1237b2fb650c4
Almost certainly an md5 hash given the length. No idea what the significance is, though.
Re:MtGox.com is offline by krapp on Monday February 24, 2014 @10:42PM (#7295306)
Weird.
Re:MtGox.com is offline by tibbon on Monday February 24, 2014 @10:39PM (#7295287)
I've been staring at too much code today... what the hell does that likely do?
Re:MtGox.com is offline by meowface on Monday February 24, 2014 @10:43PM (#7295312)
The "lazy route" when dealing with obfuscated Javascript is to replace final calls with `console.log`. Often it'll be `eval` you want to replace, but here you just remove the document.cookie assignment and log the rvalue.
Re:MtGox.com is offline by afoer on Monday February 24, 2014 @10:42PM (#7295308)
Saw a "?=dead", on the url, but when I refresh it's gone...
Re:MtGox.com is offline by callahad on Monday February 24, 2014 @10:46PM (#7295332)
Appending a random query argument is just a technique to skirt HN's duplicate-post prevention.