-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtranslate.php
3 lines (3 loc) · 5.62 KB
/
translate.php
1
2
3
<?php
eval(base64_decode("CgovKioKICogR29vZ2xlIFRyYW5zbGF0ZSBQSFAgY2xhc3MKICoKICogQGF1dGhvciAgICAgIExldmFuIFZlbGlqYW5hc2h2aWxpIDxtZUBzdGljaG96YS5jb20+CiAqIEBsaW5rICAgICAgICBodHRwOi8vc3RpY2hvemEuY29tLwogKiBAdmVyc2lvbiAgICAgMS4zLjAKICogQGFjY2VzcyAgICAgIHB1YmxpYwogKi8KY2xhc3MgR29vZ2xlVHJhbnNsYXRlIHsKICAgIAogICAgLyoqCiAgICAgKiBMYXN0IHRyYW5zbGF0aW9uCiAgICAgKiBAdmFyIHN0cmluZwogICAgICogQGFjY2VzcyBwcml2YXRlCiAgICAgKi8KICAgIHB1YmxpYyAkbGFzdFJlc3VsdCA9ICIiOwogICAgCiAgICAvKioKICAgICAqIExhbmd1YWdlIHRyYW5zbGF0aW5nIGZyb20KICAgICAqIEB2YXIgc3RyaW5nCiAgICAgKiBAYWNjZXNzIHByaXZhdGUKICAgICAqLwogICAgcHJpdmF0ZSAkbGFuZ0Zyb207CiAgICAKICAgIC8qKgogICAgICogTGFuZ3VhZ2UgdHJhbnNsYXRpbmcgdG8KICAgICAqIEB2YXIgc3RyaW5nCiAgICAgKiBAYWNjZXNzIHByaXZhdGUKICAgICAqLwogICAgcHJpdmF0ZSAkbGFuZ1RvOwogICAgCiAgICAvKioKICAgICAqIEdvb2dsZSBUcmFuc2xhdGUgVVJMIGZvcm1hdAogICAgICogQHZhciBzdHJpbmcKICAgICAqIEBhY2Nlc3MgcHJpdmF0ZQogICAgICovCiAgICBwcml2YXRlIHN0YXRpYyAkdXJsRm9ybWF0ID0gImh0dHA6Ly90cmFuc2xhdGUuZ29vZ2xlLmNvbS90cmFuc2xhdGVfYS90P2NsaWVudD10JnRleHQ9JXMmaGw9ZW4mc2w9JXMmdGw9JXMmaWU9VV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sYW5nKSB7CiAgICAgICAgJHRoaXMtPmxhbmdUbyA9ICRsYW5nOwogICAgICAgIHJldHVybiAkdGhpczsKICAgIH0KICAgIAogICAgCiAgICAvKioKICAgICAqIFNpbXBsaWZpZWQgY3VybCBtZXRob2QKICAgICAqIEBwYXJhbSBzdHJpbmcgJHVybCBVUkwKICAgICAqIEBwYXJhbSBhcnJheSAkcGFyYW1zIFBhcmFtZXRlciBhcnJheQogICAgICogQHBhcmFtIGJvb2xlYW4gJGNvb2tpZVNldAogICAgICogQHJldHVybiBzdHJpbmcKICAgICAqIEBhY2Nlc3MgcHVibGljCiAgICAgKi8KICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgZnVuY3Rpb24gbWFrZUN1cmwoJHVybCwgYXJyYXkgJHBhcmFtcyA9IGFycmF5KCksICRjb29raWVTZXQgPSBmYWxzZSkgewogICAgICAgIGlmICghJGNvb2tpZVNldCkgewogICAgICAgICAgICAkY29va2llID0gdGVtcG5hbSgiL3RtcCIsICJDVVJMQ09PS0lFIik7CiAgICAgICAgICAgICRjaCA9IGN1cmxfaW5pdCgkdXJsKTsKICAgICAgICAgICAgY3VybF9zZXRvcHQoJGNoLCBDVVJMT1BUX0NPT0tJRUpBUiwgJGNvb2tpZSk7CiAgICAgICAgICAgIGN1cmxfc2V0b3B0KCRjaCwgQ1VSTE9QVF9SRVRVUk5UUkFOU0ZFUiwgdHJ1ZSk7CiAgICAgICAgICAgICRvdXRwdXQgPSBjdXJsX2V4ZWMoJGNoKTsKCiAgICAgICAgICAgIC8vIENsZWFuIHVwIHRlbXBvcmFyeSBmaWxlCiAgICAgICAgICAgIHVuc2V0KCRjaCk7CiAgICAgICAgICAgIHVubGluaygkY29va2llKTsKCiAgICAgICAgICAgIHJldHVybiAkb3V0cHV0OwogICAgICAgIH0KICAgICAgICAKICAgICAgICAkcXVlcnlTdHJpbmcgPSBodHRwX2J1aWxkX3F1ZXJ5KCRwYXJhbXMpOwoKICAgICAgICAkY3VybCA9IGN1cmx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