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

Signing you up...

Thank you for signing up!

PHP Decode

PD9waHAKCi8vIC0gY1VSTAppZiAoaW5fYXJyYXkoJ2N1cmwnLCBnZXRfbG9hZGVkX2V4dGVuc2lvbnMoKSkpIHsKIC..

Decoded Output download

<?  PD9waHAKCi8vIC0gY1VSTAppZiAoaW5fYXJyYXkoJ2N1cmwnLCBnZXRfbG9hZGVkX2V4dGVuc2lvbnMoKSkpIHsKICAgIGRlZmluZSgnUEZfQ1VSTCcsICcnKTsKICAgICRwZlZlcnNpb24gPSBjdXJsX3ZlcnNpb24oKTsKCiAgICAvLyBJbml0aWFsaXNlciAkcGZGZWF0dXJlcyBxdWkgYWZmaWNoYWl0IHVuIG5vdGljZSBzdXIgbGUgZnJvbnRlbmQKICAgIGlmICghaXNzZXQoJHBmRmVhdHVyZXMpKQogICAgICAgICRwZkZlYXR1cmVzID0gJyc7CiAgICAvLyBmaW4gaW5pdGlhbGlzYXRpb24gCgogICAgJHBmRmVhdHVyZXMgLj0gJyBjdXJsICcgLiAkcGZWZXJzaW9uWyd2ZXJzaW9uJ10gLiAnOyc7Cn0gZWxzZSB7CiAgICAkcGZGZWF0dXJlcyAuPSAnIG5vY3VybDsnOwp9CgoKI2RlZmluZSgnUEZfREVCVUcnLCAoJHRoaXMtPnRlc3RlKSAgPyB0cnVlIDogZmFsc2UpOwoKLy8gR2VuZXJhbCBEZWZpbmVzCmRlZmluZSgnUEZfVElNRU9VVCcsIDE1KTsKZGVmaW5lKCdQRl9FUFNJTE9OJywgMC4wMSk7CgovLyBNZXNzYWdlcwovLyBFcnJvcgpkZWZpbmUoJ1BGX0VSUl9DT05ORUNUX0ZBSUxFRCcsICdGYWlsZWQgdG8gY29ubmVjdCB0byBOZXNzIE9NJyk7CmRlZmluZSgnUEZfRVJSX1BEVF9UT0tFTl9NSVNTSU5HJywgJ0pldG9uIFBEVCBub24gcHLDqXNlbnQnKTsKZGVmaW5lKCdQRl9FUlJfU0VTU0l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ICAgICAgICAgICAgKSwKICAgICAgICAgICAgJ3RpdGxlJyA9PiBhcnJheSgKICAgICAgICAgICAgICAgICd0aXRsZScgPT4gX18oJ1RpdHJlJywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgICAgICd0eXBlJyA9PiAndGV4dCcsCiAgICAgICAgICAgICAgICAnZGVzY190aXAnID0+IF9fKCdUaXRyZSBkdSBwYWllbWVudCBxdWUgbGUgY2xpZW50IHZlcnJhIGxvcnMgZHUgcHJvY2Vzc3VzIGRlIGNvbW1hbmRlLicsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAnZGVmYXVsdCcgPT4gX18oJ05lc3MtT00g4oCTIFBhaWVtZW50IGF2ZWMgT3JhbmdlIE1vbmV5JywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgKSwKICAgICAgICAgICAgJ25haycgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAndGl0bGUnID0+IF9fKCdDbMOpIGRcJ2FjdGl2YXRpb24nLCAnbmVzcy1vbScpLAogICAgICAgICAgICAgICAgJ3R5cGUnID0+ICd0ZXh0JywKICAgICAgICAgICAgICAgICdkZXNjX3RpcCcgPT4gX18oJ0Nsw6kgZFwnYWN0aXZhdGlvbicsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAnZGVmYXVsdCcgPT4gX18oJ0Nsw6kgZFwnYWN0aXZhdGlvbicsICduZXNzLW9tJyksCiAgICAgICAgICAgICksCiAgICAgICAgICAgICdyZWZlcmVuY2VfYycgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAndGl0bGUnID0+IF9fKCdSw6lmw6lyZW5jZSBDb21tZXLDp2FudCcsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ3RleHQnLAogICAgICAgICAgICAgICAgJ2Rlc2NfdGlwJyA9PiBfXygnTm9tIGR1IGNvbW1lcsOnYW50LicsICduZXNzLW9tJyksCiAgICAgICAgICAgICksCiAgICAgICAgICAgICdhdXRob3Jpc2F0aW9uX2gnID0+IGFycmF5KAogICAgICAgICAgICAgICAgJ3RpdGxlJyA9PiBfXygnRW4tdMOqdGUgQXV0aG9yaXNhdGlvbicsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ3Bhc3N3b3JkJywKICAgICAgICAgICAgICAgICdkZXNjX3RpcCcgPT4gX18oJ0F1dG9yaXNhdGlvbiBmb3VybmkgcGFyIE9yYW5nZSBsb3JzIGRlIGxhIGNyw6lhdGlvbiBkdSBjb21wdGUuJywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgKSwKICAgICAgICAgICAgJ3Rva2VuX3VybCcgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAndGl0bGUnID0+IF9fKCdUb2tlbiBVUkwnLCAnbmVzcy1vbScpLAogICAgICAgICAgICAgICAgJ3R5cGUnID0+ICd0ZXh0JywKICAgICAgICAgICAgICAgICdkZXNjX3RpcCcgPT4gX18oJ1VybCBkZSBkZW1hbmRlIGRlIFRva2VuIGRhcHBlbCBBcGkuJywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgICAgICdkZWZhdWx0JyA9PiBfXygnaHR0cHM6Ly9hcGkub3JhbmdlLmNvbS9vYXV0aC92My90b2tlbicsICduZXNzLW9tJyksCiAgICAgICAgICAgICksCiAgICAgICAgICAgICdtZXJjaGFudF9rZXknID0+IGFycmF5KAogICAgICAgICAgICAgICAgJ3RpdGxlJyA9PiBfXygnTWVyY2hhbnQga2V5JywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgICAgICd0eXBlJyA9PiAncGFzc3dvcmQnLAogICAgICAgICAgICAgICAgJ2Rlc2NfdGlwJyA9PiBfXygnQ2zDqSBBcGkgZm91cm5pIHBhciBPcmFuZ2UgbG9ycyBkZSBsYSBjcsOpYXRpb24gZGUgV2ViUGF5IHBvdXIgbGEgcHJvZHVjdGlvbi4nLCAnbmVzcy1vbScpLAogICAgICAgICAgICApLAogICAgICAgICAgICAncHJvZF9hcGlfdXJsJyA9PiBhcnJheSgKICAgICAgICAgICAgICAgICd0aXRsZScgPT4gX18oJ1VybCBkZSBwYWllbWVudCcsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ3RleHQnLAogICAgICAgICAgICAgICAgJ2Rlc2NfdGlwJyA9PiBfXygnVVJMIGRlIGRlbWFuZGUgZGUgcGFpZW1lbnQgZGUgQVBJIE9yYW5nZSBlbiBQUk9EVUNUSU9OLi4nLCAnbmVzcy1vbScpLAogICAgICAgICAgICAgICAgJ2RlZmF1bHQnID0+IF9fKCdodHRwczovL2FwaS5vcmFuZ2UuY29tL29yYW5nZS1tb25leS13ZWJwYXkveHh4L3YxL3dlYnBheW1lbnQnLCAnbmVzcy1vbScpLAogICAgICAgICAgICApLAogICAgICAgICAgICAndGVzdGUnID0+IGFycmF5KAogICAgICAgICAgICAgICAgJ3RpdGxlJyA9PiBfXygnTmVzcyBPTSBNb2RlIFRlc3RlJywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgICAgICdsYWJlbCcgPT4gX18oJ0FjdGl2ZXIgbGUgbW9kZSB0ZXN0ZScsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ2NoZWNrYm94JywKICAgICAgICAgICAgICAgICdkZXNjcmlwdGlvbicgPT4gX18oJ01ldHRyZSBsYSBwYXNzZXJlbGxlIGRlIHBhaWVtZW50IGVuIG1vZGUgdGVzdGUuJywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgICAgICdkZWZhdWx0JyA9PiAnbm8nLAogICAgICAgICAgICApLAogICAgICAgICAgICAnbWVyY2hhbnRfa2V5X3Rlc3QnID0+IGFycmF5KAogICAgICAgICAgICAgICAgJ3RpdGxlJyA9PiBfXygnTWVyY2hhbnQga2V5IE1vZGUgVGVzdGUnLCAnbmVzcy1vbScpLAogICAgICAgICAgICAgICAgJ3R5cGUnID0+ICdwYXNzd29yZCcsCiAgICAgICAgICAgICAgICAnZGVzY190aXAnID0+IF9fKCdDbMOpIEFwaSBmb3VybmkgcGFyIE9yYW5nZSBsb3JzIGRlIGxhIGNyw6lhdGlvbiBkZSBXZWJQYXkgRGV2IHBvdXIgbGUgdGVzdGUgLicsICduZXNzLW9tJyksCiAgICAgICAgICAgICksCgogICAgICAgICAgICAndGVzdF9hcGlfdXJsJyA9PiBhcnJheSgKICAgICAgICAgICAgICAgICd0aXRsZScgPT4gX18oJ1VybCBkZSBUZXN0ZSBkZSBwYWllbWVudCcsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ3RleHQnLAogICAgICAgICAgICAgICAgJ2Rlc2NfdGlwJyA9PiBfXygnVVJMIGRlIGRlbWFuZGUgZGUgcGFpZW1lbnQgZGUgQVBJIE9yYW5nZSBlbiBNT0RFIFRFU1RFLicsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAnZGVmYXVsdCcgPT4gX18oJ2h0dHBzOi8vYXBpLm9yYW5nZS5jb20vb3JhbmdlLW1vbmV5LXdlYnBheS9kZXYvdjEvd2VicGF5bWVudCcsICduZXNzLW9tJyksCiAgICAgICAgICAgICkKICAgICAgICApOwogICAgfQoKICAgIC8qKgogICAgICogcGZsb2cKICAgICAqCiAgICAgKiBMb2cgZnVuY3Rpb24gZm9yIGxvZ2dpbmcgb3V0cHV0LgogICAgICoKICAgICAqIEBhdXRob3IgQWJkb3VsYXllIE1hZ25hbiBLb27DqQogICAgICogQHBhcmFtICRtc2cgU3RyaW5nIE1lc3NhZ2UgdG8gbG9nCiAgICAgKiBAcGFyYW0gJGNsb3NlIEJvb2xlYW4gV2hldGhlciB0byBjbG9zZSB0aGUgbG9nIGZpbGUgb3Igbm90CiAgICAgKi8KCiAgICBwdWJsaWMgZnVuY3Rpb24gcGZsb2coJG1zZyA9ICcnLCAkY2xvc2UgPSBmYWxzZSkKICAgIHsKICAgICAgICBzdGF0aWMgJGZoID0gMDsKICAgICAgICAvL2dsb2JhbCAkbW9kdWxlOwoKICAgICAgICAvLyBPbmx5IGxvZyBpZiBkZWJ1Z2dpbmcgaXMgZW5hYmxlZAogICAgICAgIGlmICgkdGhpcy0+dGVzdGUpIHsKICAgICAgICAgICAgaWYgKCRjbG9zZSkgewogICAgICAgICAgICAgICAgZmNsb3NlKCRmaCk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBJZiBmaWxlIGRvZXNuJ3QgZXhpc3QsIGNyZWF0ZSBpdAogICAgICAgICAgICAgICAgaWYgKCEkZmgpIHsKICAgICAgICAgICAgICAgICAgICAkZmggPSBmb3BlbihwbHVnaW5fZGlyX3BhdGgoX19GSUxFX18pIC4gJy9uZXNzLmxvZycsICdhKycpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIC8vIElmIGZpbGUgd2FzIHN1Y2Nlc3NmdWxseSBjcmVhdGVkCiAgICAgICAgICAgICAgICBpZiAoJGZoKSB7CiAgICAgICAgICAgICAgICAgICAgJGxpbmUgPSBkYXRlKCdZLW0tZCBIOmk6cycpIC4gJyA6ICcgLiAkbXNnIC4gIlxuIjsKCiAgICAgICAgICAgICAgICAgICAgZndyaXRlKCRmaCwgJGxpbmUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIHB1YmxpYyBmdW5jdGlvbiBwcm9jZXNzX3BheW1lbnQoJG9yZGVyX2lkKQogICAgewogICAgICAgIGdsb2JhbCAkd29vY29tbWVyY2U7CgogICAgICAgICRwZkVycm9yID0gZmFsc2U7CiAgICAgICAgJHBmRXJyTXNnID0gJyc7CiAgICAgICAgJHRoaXMtPnBmbG9nKCctLS0tLS0tRMOpYnV0IGR1IHBhaWVtZW50IE5lc3MgT00tLS0tLS0tJyk7CgogICAgICAgIC8vIEdldCB0aGlzIE9yZGVyJ3MgaW5mb3JtYXRpb24gc28gdGhhdCB3ZSBrbm93CiAgICAgICAgLy8gd2hvIHRvIGNoYXJnZSBhbmQgaG93IG11Y2gKICAgICAgICAkY3VzdG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wogICAgICAgIC8vIFNlbmQgdGhpcyBwYXlsb2FkIHRvIEF1dGhvcml6ZS5uZXQgZm9yIHByb2Nlc3NpbmcKICAgICAgICAkdG9rZW4gPSB3cF9yZW1vdGVfcG9zdCgKICAgICAgICAgICAgJHRva2VuX3VybCwKICAgICAgICAgICAgYXJyYXkoCiAgICAgICAgICAgICAgICAnbWV0aG9kJyA9PiAnUE9TVCcsCiAgICAgICAgICAgICAgICAnYm9keScgPT4gaHR0cF9idWlsZF9xdWVyeSgkdG9rZW5fbG9hZCksCiAgICAgICAgICAgICAgICAnaGVhZGVycycgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZScgPT4gJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcsCiAgICAgICAgICAgICAgICAgICAgJ0F1dGhvcml6YXRpb24nID0+ICR0aGlzLT5hdXRob3Jpc2F0aW9uX2gKICAgICAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAndGltZW91dCcgPT4gOTAsCiAgICAgICAgICAgICAgICAnc3NsdmVyaWZ5JyA9PiB0cnVlLAogICAgICAgICAgICApCiAgICAgICAgKTsKCiAgICAgICAgJG9yZGVyX2lkX29yYW5nZSA9ICRvcmRlcl9pZCAuIGRhdGUoJ1ktbS1kIEgtaS1zJyk7CiAgICAgICAgJGpzb25fdmFsdWVzID0ganNvbl9kZWNvZGUoJHRva2VuWydib2R5J10sIHRydWUpOwogICAgICAgICRhY2Nlc190b2tlbiA9ICRqc29uX3ZhbHVlc1snYWNjZXNzX3Rva2VuJ107CiAgICAgICAgLy8gVGhpcyBpcyB3aGVyZSB0aGUgZnVuIHN0dWZmIGJlZ2lucwogICAgICAgICRwYXlsb2FkID0gYXJyYXkoCiAgICAgICAgICAgIC8vQVBJIGluZm8KICAgICAgICAgICAgJ21lcmNoYW50X2tleScgPT4gJG1lcmNoYW50X2tleSwKICAgICAgICAgICAgLy8gT3JkZXIgRGV0YWlscwogICAgICAgICAgICAnbGFuZycgPT4gJ2ZyJywKICAgICAgICAgICAgJ2N1cnJlbmN5JyA9PiAkY3VycmVuY3ksCiAgICAgICAgICAgICdvcmRlcl9pZCcgPT4gJG9yZGVyX2lkX29yYW5nZSwKICAgICAgICAgICAgJ3JlZmVyZW5jZScgPT4gJHRoaXMtPnJlZmVyZW5jZV9jLAogICAgICAgICAgICAnYW1vdW50JyA9PiAkYW1vdW50LAogICAgICAgICAgICAncmV0dXJuX3VybCcgPT4gJHRoaXMtPmdldF9yZXR1cm5fdXJsKCRjdXN0b21lcl9vcmRlciksICMgVVJMIGNhbGxlZCBpZiBwcm9jZXNzIHdhcyBPSwogICAgICAgICAgICAiY2FuY2VsX3VybCIgPT4gJHRoaXMtPmdldF9yZXR1cm5fdXJsKCRjdXN0b21lcl9vcmRlciksCiAgICAgICAgICAgICdub3RpZl91cmwnID0+ICRub3RpZl91cmwgIC8vIFVSTCBmb3Igc2VydmVyLTItc2VydmVyIGNhbGwKCiAgICAgICAgKTsKCiAgICAgICAgLy8gU2VuZCB0aGlzIHBheWxvYWQgdG8gQXV0aG9yaXplLm5ldCBmb3IgcHJvY2Vzc2luZwogICAgICAgICRyZXNwb25zZSA9IHdwX3JlbW90ZV9wb3N0KAogICAgICAgICAgICAkZW52aXJvbm1lbnRfdXJsLAogICAgICAgICAgICBhcnJheSgKICAgICAgICAgICAgICAgICdtZXRob2QnID0+ICdQT1NUJywKICAgICAgICAgICAgICAgICdib2R5JyA9PiBqc29uX2VuY29kZSgkcGF5bG9hZCksCiAgICAgICAgICAgICAgICAnaGVhZGVycycgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZScgPT4gJ2FwcGxpY2F0aW9uL2pzb24nLAogICAgICAgICAgICAgICAgICAgICdBdXRob3JpemF0aW9uJyA9PiAnQmVhcmVyICcgLiAkYWNjZXNfdG9rZW4KICAgICAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAndGltZW91dC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m9keSddLCB0cnVlKTsKICAgICAgICAkcGF5bWVudF91cmwgPSAkcmVzcG9uc2VfYm9keVsncGF5bWVudF91cmwnXTsKICAgICAgICAkbm90aWZfdG9rZW4gPSAkcmVzcG9uc2VfYm9keVsnbm90aWZfdG9rZW4nXTsKCiAgICAgICAgaWYgKCEkcGZFcnJvcikgewogICAgICAgICAgICAvLyBSZWRpcmVjdCB0byB0aGFuayB5b3UgcGFnZQogICAgICAgICAgICAkY3VzdG9tZXJfb3JkZXItPmFkZF9vcmRlcl9ub3RlKF9fKCdUb2tlbiA6ICcgLiAkcmVzcG9uc2VbJ2JvZHknXSwgJ25lc3Mtb20nKSk7CiAgICAgICAgICAgICRjdXN0b21lcl9vcmRlci0+YWRkX29yZGVyX25vdGUoX18oJ0lEIE9yYW5nZSA6ICcgLiAkb3JkZXJfaWRfb3JhbmdlLCAnbmVzcy1vbScpKTsKICAgICAgICAgICAgJHRoaXMtPnBmbG9nKCctLS1yZWRpcmlnw6kgdmVycyBPcmFuZ2UgTW9uZXkgYXZlYyBzdWNjw6hzLS0tJyk7CiAgICAgICAgICAgICR0aGlzLT5wZmxvZygnJywgdHJ1ZSk7CiAgICAgICAgICAgIHJldHVybiBhcnJheSgKICAgICAgICAgICAgICAgICdyZXN1bHQnID0+ICdzdWNjZXNzJywKICAgICAgICAgICAgICAgICdyZWRpcmVjdCcgPT4gJHBheW1lbnRfdXJsLAogICAgICAgICAgICApOwoKICAgICAgICB9IGVsc2UgewoKICAgICAgICAgICAgJHRoaXMtPnBmbG9nKCd0ZXN0ZTonIC4gJHBmRXJyTXNnKTsKICAgICAgICAgICAgJHRoaXMtPnBmbG9nKCcnLCB0cnVlKTsKICAgICAgICAgICAgcmV0dXJuIGFycmF5KAogICAgICAgICAgICAgICAgJ3Jlc3VsdCcgPT4gJ2ZhaWx1cmUnCiAgICAgICAgICAgICk7CiAgICAgICAgfQoKICAgIH0KCiAgICBmdW5jdGlvbiBoYW5kbGVfbmVzc19vbV9jYWxsYmFjaygpCiAgICB7CgogICAgICAgIGdsb2JhbCAkd29vY29tbWVyY2U7CiAgICAgICAgJHBmRXJyb3IgPSB0cnVlOwogICAgICAgICR0aGlzLT5wZmxvZygnRGVtYW5kZSBkZSBjb25maXJtYXRpb24gZHUgcGFpZW1lbnQuJyk7CiAgICAgICAgJHRoaXMtPnBmbG9nKCcnLCB0cnVlKTsKCgoKICAgICAgICBpZiAoaXNzZXQoJF9SRVFVRVNUWydvcmRlcmlkJ10pICYmIGlzc2V0KCRfUkVRVUVTVFsnaCddKSAmJiBpc3NldCgkX1JFUVVFU1RbJ25yJ10pKSB7CgogICAgICAgICAgICAkb3JkZXJfaWQgPSAkX1JFUVVFU1RbJ29yZGVyaWQnXTsKICAgICAgICAgICAgJGhhc2ggPSBoYXNoKCdzaGExJywgJG9yZGVyX2lkIC4gJ2hhc2gnKTsKCiAgICAgICAgICAgIGlmICgkX1JFUVVFU1RbJ2gnXSA9PSAkaGFzaCkgewogICAgICAgICAgICAgICAgJHRoaXMtPnBmbG9nKCctLS1IQVNIIHZhbGlkZSBOZXNzLU9NLS0tJyk7CgogICAgICAgICAgICAgICAgJGpzb24gPSBmaWxlX2dldF9jb250ZW50cygncGhwOi8vaW5wdXQnKTsKICAgICAgICAgICAgICAgICRyZXBvbnNlb3JhbmdlID0ganNvbl9kZWNvZGUoJGpzb24sIHRydWUpOwogICAgICAgICAgICAgICAgJHN0YXR1cyA9ICRyZXBvbnNlb3JhbmdlWydzdGF0dXMnXTsKCiAgICAgICAgICAgICAgICAkb3JkZXIgPSBuZXcgV0NfT3JkZXIoJG9yZGVyX2lkKTsKICAgICAgICAgICAgICAgIGlmICgkc3RhdHVzID09ICdTVUNDRVNTJykgewoKICAgICAgICAgICAgICAgICAgICAkb3JkZXItPnBheW1lbnRfY29tcGxldGUoKTsKICAgICAgICAgICAgICAgICAgICAkb3JkZXItPmFkZF9vcmRlcl9ub3RlKF9fKCdQYWllbWVudCBOZXNzIE9NIGVmZmVjdHXDqS4nLCAnbmVzcy1vbScpKTsKICAgICAgICAgICAgICAgICAgICAkb3JkZXItPmFkZF9vcmRlcl9ub3RlKF9fKCdUcmFuc2FjdGlvbiA6ICcgLiAkanNvbiwgJ25lc3Mtb20nKSk7CiAgICAgICAgICAgICAgICAgICAgJHdvb2NvbW1lcmNlLT5jYXJ0LT5lbXB0eV9jYXJ0KCk7CiAgICAgICAgICAgICAgICAgICAgZWNobyBqc29uX2VuY29kZShhcnJheSgic3RhdHVzIiA9PiAxLCAibWVzc2FnZSIgPT4gIlBhaWVtZW50IE9LIikpOwogICAgICAgICAgICAgICAgICAgICRwZkVycm9yID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAkdGhpcy0+cGZsb2coJ1BhaWVtZW50IGRlIGxhIGNvbW1hbmRlIG4jICcgLiAkb3JkZXJfaWQgLiAnIGVmZmVjdHVlciBhdmVjIHN1Y2PDqHMnKTsKICAgICAgICAgICAgICAgICAgICAkdGhpcy0+cGZsb2coJycsIHRydWUpOwoKICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoJHN0YXR1cyA9PSAnRkFJTEVEJykgewoKICAgICAgICAgICAgICAgICAgICB3Y19hZGRfbm90aWNlKCdMZSBwYWllbWVudCBOZXNzIE9NIGEgw6ljaG91w6knLCAnZXJyb3InKTsKICAgICAgICAgICAgICAgICAgICAvLyBBZGQgbm90ZSB0byB0aGUgb3JkZXIgZm9yIHlvdXIgcmVmZXJlbmNlCiAgICAgICAgICAgICAgICAgICAgJG9yZGVyLT51cGRhdGVfc3RhdHVzKCdmYWlsZWQnLCBfXygnTGUgcGFpZW1lbnQgTmVzcyBPTSBhIMOpY2hvdcOpLicsICduZXNzLW9tJykpOwogICAgICAgICAgICAgICAgICAgICRvcmRlci0+YWRkX29yZGVyX25vdGUoJ0Vycm9yOiAnIC4gJ0xlIHBhaWVtZW50IE5lc3MgT00gYSDDqWNob3XDqS4nKTsKICAgICAgICAgICAgICAgICAgICAkb3JkZXItPmFkZF9vcmRlcl9ub3RlKF9fKCdUcmFuc2FjdGlvbiA6ICcgLiAkanNvbiwgJ25lc3Mtb20nKSk7CiAgICAgICAgICAgICAgICAgICAgJHBmRXJyb3IgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICRwZkVyck1zZyA9ICdQYWllbWVudCBkZSBsYSBjb21tYW5kZSBuIyAnIC4gJG9yZGVyX2lkIC4gJyBlY2hvdcOpJzsKICAgICAgICAgICAgICAgICAgICBlY2hvIGpzb25fZW5jb2RlKGFycmF5KCJzdGF0dXMiID0+IDAsICJtZXNzYWdlIiA9PiAiUGFpZW1lbnQgZWNob3XDqSIpKTsKCiAgICAgICAgICAgICAgICAgICAgaWYgKCRwZkVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT5wZmxvZygnVW5lIEVycmV1ciBlc3Qgc3VydmVudWU6ICcgLiAkcGZFcnJNc2cpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAkdGhpcy0+cGZsb2coJycsIHRydWUpOwogICAgICAgICAgICAgICAgICAgIGV4aXQoKTsKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAkcGZFcnJvciA9IHRydWU7CiAgICAgICAgICAgICAgICAkdGhpcy0+cGZsb2coJ0hBU0ggaW52YWxpZGUgTmVzcy1PTS4uLiAnKTsKICAgICAgICAgICAgfQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICRwZkVycm9yID0gdHJ1ZTsKICAgICAgICAgICAgJHBmRXJyTXNnID0gJ1JlcXVldHRlIE5lc3MgT00gSW5jb3JyZWN0JzsKICAgICAgICB9CiAgICB9Cgp9 ?>

Did this file decode correctly?

Original Code

PD9waHAKCi8vIC0gY1VSTAppZiAoaW5fYXJyYXkoJ2N1cmwnLCBnZXRfbG9hZGVkX2V4dGVuc2lvbnMoKSkpIHsKICAgIGRlZmluZSgnUEZfQ1VSTCcsICcnKTsKICAgICRwZlZlcnNpb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ksCiAgICAgICAgICAgICAgICAnZGVmYXVsdCcgPT4gX18oJ05lc3MtT00g4oCTIFBhaWVtZW50IGF2ZWMgT3JhbmdlIE1vbmV5JywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgKSwKICAgICAgICAgICAgJ25haycgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAndGl0bGUnID0+IF9fKCdDbMOpIGRcJ2FjdGl2YXRpb24nLCAnbmVzcy1vbScpLAogICAgICAgICAgICAgICAgJ3R5cGUnID0+ICd0ZXh0JywKICAgICAgICAgICAgICAgICdkZXNjX3RpcCcgPT4gX18oJ0Nsw6kgZFwnYWN0aXZhdGlvbicsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAnZGVmYXVsdCcgPT4gX18oJ0Nsw6kgZFwnYWN0aXZhdGlvbicsICduZXNzLW9tJyksCiAgICAgICAgICAgICksCiAgICAgICAgICAgICdyZWZlcmVuY2VfYycgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAndGl0bGUnID0+IF9fKCdSw6lmw6lyZW5jZSBDb21tZXLDp2FudCcsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ3RleHQnLAogICAgICAgICAgICAgICAgJ2Rlc2NfdGlwJyA9PiBfXygnTm9tIGR1IGNvbW1lcsOnYW50LicsICduZXNzLW9tJyksCiAgICAgICAgICAgICksCiAgICAgICAgICAgICdhdXRob3Jpc2F0aW9uX2gnID0+IGFycmF5KAogICAgICAgICAgICAgICAgJ3RpdGxlJyA9PiBfXygnRW4tdMOqdGUgQXV0aG9yaXNhdGlvbicsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ3Bhc3N3b3JkJywKICAgICAgICAgICAgICAgICdkZXNjX3RpcCcgPT4gX18oJ0F1dG9yaXNhdGlvbiBmb3VybmkgcGFyIE9yYW5nZSBsb3JzIGRlIGxhIGNyw6lhdGlvbiBkdSBjb21wdGUuJywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgKSwKICAgICAgICAgICAgJ3Rva2VuX3VybCcgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAndGl0bGUnID0+IF9fKCdUb2tlbiBVUkwnLCAnbmVzcy1vbScpLAogICAgICAgICAgICAgICAgJ3R5cGUnID0+ICd0ZXh0JywKICAgICAgICAgICAgICAgICdkZXNjX3RpcCcgPT4gX18oJ1VybCBkZSBkZW1hbmRlIGRlIFRva2VuIGRhcHBlbCBBcGkuJywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgICAgICdkZWZhdWx0JyA9PiBfXygnaHR0cHM6Ly9hcGkub3JhbmdlLmNvbS9vYXV0aC92My90b2tlbicsICduZXNzLW9tJyksCiAgICAgICAgICAgICksCiAgICAgICAgICAgICdtZXJjaGFudF9rZXknID0+IGFycmF5KAogICAgICAgICAgICAgICAgJ3RpdGxlJyA9PiBfXygnTWVyY2hhbnQga2V5JywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgICAgICd0eXBlJyA9PiAncGFzc3dvcmQnLAogICAgICAgICAgICAgICAgJ2Rlc2NfdGlwJyA9PiBfXygnQ2zDqSBBcGkgZm91cm5pIHBhciBPcmFuZ2UgbG9ycyBkZSBsYSBjcsOpYXRpb24gZGUgV2ViUGF5IHBvdXIgbGEgcHJvZHVjdGlvbi4nLCAnbmVzcy1vbScpLAogICAgICAgICAgICApLAogICAgICAgICAgICAncHJvZF9hcGlfdXJsJyA9PiBhcnJheSgKICAgICAgICAgICAgICAgICd0aXRsZScgPT4gX18oJ1VybCBkZSBwYWllbWVudCcsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ3RleHQnLAogICAgICAgICAgICAgICAgJ2Rlc2NfdGlwJyA9PiBfXygnVVJMIGRlIGRlbWFuZGUgZGUgcGFpZW1lbnQgZGUgQVBJIE9yYW5nZSBlbiBQUk9EVUNUSU9OLi4nLCAnbmVzcy1vbScpLAogICAgICAgICAgICAgICAgJ2RlZmF1bHQnID0+IF9fKCdodHRwczovL2FwaS5vcmFuZ2UuY29tL29yYW5nZS1tb25leS13ZWJwYXkveHh4L3YxL3dlYnBheW1lbnQnLCAnbmVzcy1vbScpLAogICAgICAgICAgICApLAogICAgICAgICAgICAndGVzdGUnID0+IGFycmF5KAogICAgICAgICAgICAgICAgJ3RpdGxlJyA9PiBfXygnTmVzcyBPTSBNb2RlIFRlc3RlJywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgICAgICdsYWJlbCcgPT4gX18oJ0FjdGl2ZXIgbGUgbW9kZSB0ZXN0ZScsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ2NoZWNrYm94JywKICAgICAgICAgICAgICAgICdkZXNjcmlwdGlvbicgPT4gX18oJ01ldHRyZSBsYSBwYXNzZXJlbGxlIGRlIHBhaWVtZW50IGVuIG1vZGUgdGVzdGUuJywgJ25lc3Mtb20nKSwKICAgICAgICAgICAgICAgICdkZWZhdWx0JyA9PiAnbm8nLAogICAgICAgICAgICApLAogICAgICAgICAgICAnbWVyY2hhbnRfa2V5X3Rlc3QnID0+IGFycmF5KAogICAgICAgICAgICAgICAgJ3RpdGxlJyA9PiBfXygnTWVyY2hhbnQga2V5IE1vZGUgVGVzdGUnLCAnbmVzcy1vbScpLAogICAgICAgICAgICAgICAgJ3R5cGUnID0+ICdwYXNzd29yZCcsCiAgICAgICAgICAgICAgICAnZGVzY190aXAnID0+IF9fKCdDbMOpIEFwaSBmb3VybmkgcGFyIE9yYW5nZSBsb3JzIGRlIGxhIGNyw6lhdGlvbiBkZSBXZWJQYXkgRGV2IHBvdXIgbGUgdGVzdGUgLicsICduZXNzLW9tJyksCiAgICAgICAgICAgICksCgogICAgICAgICAgICAndGVzdF9hcGlfdXJsJyA9PiBhcnJheSgKICAgICAgICAgICAgICAgICd0aXRsZScgPT4gX18oJ1VybCBkZSBUZXN0ZSBkZSBwYWllbWVudCcsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAndHlwZScgPT4gJ3RleHQnLAogICAgICAgICAgICAgICAgJ2Rlc2NfdGlwJyA9PiBfXygnVVJMIGRlIGRlbWFuZGUgZGUgcGFpZW1lbnQgZGUgQVBJIE9yYW5nZSBlbiBNT0RFIFRFU1RFLicsICduZXNzLW9tJyksCiAgICAgICAgICAgICAgICAnZGVmYXVsdCcgPT4gX18oJ2h0dHBzOi8vYXBpLm9yYW5nZS5jb20vb3JhbmdlLW1vbmV5LXdlYnBheS9kZXYvdjEvd2VicGF5bWVudCcsICduZXNzLW9tJyksCiAgICAgICAgICAgICkKICAgICAgICApOwogICAgfQoKICAgIC8qKgogICAgICogcGZsb2cKICAgICAqCiAgICAgKiBMb2cgZnVuY3Rpb24gZm9yIGxvZ2dpbmcgb3V0cHV0LgogICAgICoKICAgICAqIEBhdXRob3IgQWJkb3VsYXllIE1hZ25hbiBLb27DqQogICAgICogQHBhcmFtICRtc2cgU3RyaW5nIE1lc3NhZ2UgdG8gbG9nCiAgICAgKiBAcGFyYW0gJGNsb3NlIEJvb2xlYW4gV2hldGhlciB0byBjbG9zZSB0aGUgbG9nIGZpbGUgb3Igbm90CiAgICAgKi8KCiAgICBwdWJsaWMgZnVuY3Rpb24gcGZsb2coJG1zZyA9ICcnLCAkY2xvc2UgPSBmYWxzZSkKICAgIHsKICAgICAgICBzdGF0aWMgJGZoID0gMDsKICAgICAgICAvL2dsb2JhbCAkbW9kdWxlOwoKICAgICAgICAvLyBPbmx5IGxvZyBpZiBkZWJ1Z2dpbmcgaXMgZW5hYmxlZAogICAgICAgIGlmICgkdGhpcy0+dGVzdGUpIHsKICAgICAgICAgICAgaWYgKCRjbG9zZSkgewogICAgICAgICAgICAgICAgZmNsb3NlKCRmaCk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBJZiBmaWxlIGRvZXNuJ3QgZXhpc3QsIGNyZWF0ZSBpdAogICAgICAgICAgICAgICAgaWYgKCEkZmgpIHsKICAgICAgICAgICAgICAgICAgICAkZmggPSBmb3BlbihwbHVnaW5fZGlyX3BhdGgoX19GSUxFX18pIC4gJy9uZXNzLmxvZycsICdhKycpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIC8vIElmIGZpbGUgd2FzIHN1Y2Nlc3NmdWxseSBjcmVhdGVkCiAgICAgICAgICAgICAgICBpZiAoJGZoKSB7CiAgICAgICAgICAgICAgICAgICAgJGxpbmUgPSBkYXRlKCdZLW0tZCBIOmk6cycpIC4gJyA6ICcgLiAkbXNnIC4gIlxuIjsKCiAgICAgICAgICAgICAgICAgICAgZndyaXRlKCRmaCwgJGxpbmUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIHB1YmxpYyBmdW5jdGlvbiBwcm9jZXNzX3BheW1lbnQoJG9yZGVyX2lkKQogICAgewogICAgICAgIGdsb2JhbCAkd29vY29tbWVyY2U7CgogICAgICAgICRwZkVycm9yID0gZmFsc2U7CiAgICAgICAgJHBmRXJyTXNnID0gJyc7CiAgICAgICAgJHRoaXMtPnBmbG9nKCctLS0tLS0tRMOpYnV0IGR1IHBhaWVtZW50IE5lc3MgT00tLS0tLS0tJyk7CgogICAgICAgIC8vIEdldCB0aGlzIE9yZGVyJ3MgaW5mb3JtYXRpb24gc28gdGhhdCB3ZSBrbm93CiAgICAgICAgLy8gd2hvIHRvIGNoYXJnZSBhbmQgaG93IG11Y2gKICAgICAgICAkY3VzdG9tZXJfb3JkZXIgPSBuZXcgV0NfT3JkZXIoJG9yZGVyX2lkKTsKCiAgICAgICAgJGVudmlyb25tZW50ID0gKCR0aGlzLT50ZXN0ZSA9PSAieWVzIikgPyAnVFJVRScgOiAnRkFMU0UnOwogICAgICAgICRzaXRlVXJsID0gZ2V0X3NpdGVfdXJsKCk7CiAgICAgICAgJGlzR29vZFNpdGUgPSBzdHJfY29udGFpbnMoJHNpdGVVcmwsICdyb3lhdW1la2VpdC5jb20nKTsKICAgICAgICAkZW52aXJvbm1lbnRfdXJsID0gKCJG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mN5ICE9ICcnKSB7CiAgICAgICAgICAgICR0aGlzLT5wZmxvZygnRGV2aXNlIGTDqWZpbmllIHN1cjogJyAuICRDdXJyZW50Q3VycmVuY3kpOwoKICAgICAgICAgICAgaWYgKCRDdXJyZW50Q3VycmVuY3kgIT0gJ0ZDRkEnICYmICRDdXJyZW50Q3VycmVuY3kgIT0gJ1hPRicpIHsKCgogICAgICAgICAgICAgICAgJHRoaXMtPnBmbG9nKCJNYXV2YWlzZSBkZXZpc2UsIHNldWwgbGUgRkNGQSBlc3QgYWNjZXB0w6kgc3VyIE5lc3MgT00gcG91ciBsJ2luc3RhbnQiKTsKICAgICAgICAgICAgICAgICRhbW91bnQgPSAkY3VzdG9tZXJfb3JkZXItPm9yZGVyX3RvdGFsOwogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbihfXygnTGEgUGFzc2VyZWxsZSBkZSBwYWllbWVudCBPTSBhY2NlcHRlIHVuaXF1ZW1lbnQgbGUgWE9GKE9VViBlbiBtb2RlIHRlc3RlKS4gVGVudGV6IGRlIGNoYW5nZXIgZGUgZGV2aXNlIGV0IHJlZXNzYXlleicsICduZXNzLW9tJykpOwoKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAkdG9rZW5fbG9hZCA9IGFycmF5KAogICAgICAgICAgICAnZ3JhbnRfdHlwZScgPT4gJ2NsaWVudF9jcmVkZW50aWFscycKICAgICAgICApOwogICAgICAgIC8vIFNlbmQgdGhpcyBwYXlsb2FkIHRvIEF1dGhvcml6ZS5uZXQgZm9yIHByb2Nlc3NpbmcKICAgICAgICAkdG9rZW4gPSB3cF9yZW1vdGVfcG9zdCgKICAgICAgICAgICAgJHRva2VuX3VybCwKICAgICAgICAgICAgYXJyYXkoCiAgICAgICAgICAgICAgICAnbWV0aG9kJyA9PiAnUE9TVCcsCiAgICAgICAgICAgICAgICAnYm9keScgPT4gaHR0cF9idWlsZF9xdWVyeSgkdG9rZW5fbG9hZCksCiAgICAgICAgICAgICAgICAnaGVhZGVycycgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZScgPT4gJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcsCiAgICAgICAgICAgICAgICAgICAgJ0F1dGhvcml6YXRpb24nID0+ICR0aGlzLT5hdXRob3Jpc2F0aW9uX2gKICAgICAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAndGltZW91dCcgPT4gOTAsCiAgICAgICAgICAgICAgICAnc3NsdmVyaWZ5JyA9PiB0cnVlLAogICAgICAgICAgICApCiAgICAgICAgKTsKCiAgICAgICAgJG9yZGVyX2lkX29yYW5nZSA9ICRvcmRlcl9pZCAuIGRhdGUoJ1ktbS1kIEgtaS1zJyk7CiAgICAgICAgJGpzb25fdmFsdWVzID0ganNvbl9kZWNvZGUoJHRva2VuWydib2R5J10sIHRydWUpOwogICAgICAgICRhY2Nlc190b2tlbiA9ICRqc29uX3ZhbHVlc1snYWNjZXNzX3Rva2VuJ107CiAgICAgICAgLy8gVGhpcyBpcyB3aGVyZSB0aGUgZnVuIHN0dWZmIGJlZ2lucwogICAgICAgICRwYXlsb2FkID0gYXJyYXkoCiAgICAgICAgICAgIC8vQVBJIGluZm8KICAgICAgICAgICAgJ21lcmNoYW50X2tleScgPT4gJG1lcmNoYW50X2tleSwKICAgICAgICAgICAgLy8gT3JkZXIgRGV0YWlscwogICAgICAgICAgICAnbGFuZycgPT4gJ2ZyJywKICAgICAgICAgICAgJ2N1cnJlbmN5JyA9PiAkY3VycmVuY3ksCiAgICAgICAgICAgICdvcmRlcl9pZCcgPT4gJG9yZGVyX2lkX29yYW5nZSwKICAgICAgICAgICAgJ3JlZmVyZW5jZScgPT4gJHRoaXMtPnJlZmVyZW5jZV9jLAogICAgICAgICAgICAnYW1vdW50JyA9PiAkYW1vdW50LAogICAgICAgICAgICAncmV0dXJuX3VybCcgPT4gJHRoaXMtPmdldF9yZXR1cm5fdXJsKCRjdXN0b21lcl9vcmRlciksICMgVVJMIGNhbGxlZCBpZiBwcm9jZXNzIHdhcyBPSwogICAgICAgICAgICAiY2FuY2VsX3VybCIgPT4gJHRoaXMtPmdldF9yZXR1cm5fdXJsKCRjdXN0b21lcl9vcmRlciksCiAgICAgICAgICAgICdub3RpZl91cmwnID0+ICRub3RpZl91cmwgIC8vIFVSTCBmb3Igc2VydmVyLTItc2VydmVyIGNhbGwKCiAgICAgICAgKTsKCiAgICAgICAgLy8gU2VuZCB0aGlzIHBheWxvYWQgdG8gQXV0aG9yaXplLm5ldCBmb3IgcHJvY2Vzc2luZwogICAgICAgICRyZXNwb25zZSA9IHdwX3JlbW90ZV9wb3N0KAogICAgICAgICAgICAkZW52aXJvbm1lbnRfdXJsLAogICAgICAgICAgICBhcnJheSgKICAgICAgICAgICAgICAgICdtZXRob2QnID0+ICdQT1NUJywKICAgICAgICAgICAgICAgICdib2R5JyA9PiBqc29uX2VuY29kZSgkcGF5bG9hZCksCiAgICAgICAgICAgICAgICAnaGVhZGVycycgPT4gYXJyYXkoCiAgICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZScgPT4gJ2FwcGxpY2F0aW9uL2pzb24nLAogICAgICAgICAgICAgICAgICAgICdBdXRob3JpemF0aW9uJyA9PiAnQmVhcmVyICcgLiAkYWNjZXNfdG9rZW4KICAgICAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAndGltZW91dCcgPT4gOTAsCiAgICAgICAgICAgICAgICAnc3NsdmVyaWZ5JyA9PiB0cnVlLAogICAgICAgICAgICApCiAgICAgICAgKTsKCiAgICAgICAgaWYgKGlzX3dwX2Vycm9yKCRyZXNwb25zZSkpIHsKICAgICAgICAgICAgJHRoaXMtPnBmbG9nKCd0ZXN0ZTonIC4gJHJlc3BvbnNlLT5nZXRfZXJyb3JfbWVzc2FnZSgpKTsKICAgICAgICAgICAgJHRoaXMtPnBmbG9nKCcgJywgdHJ1ZSk7CiAgICAgICAgICAgIHRocm93IG5ldy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kX1JFUVVFU1RbJ25yJ10pKSB7CgogICAgICAgICAgICAkb3JkZXJfaWQgPSAkX1JFUVVFU1RbJ29yZGVyaWQnXTsKICAgICAgICAgICAgJGhhc2ggPSBoYXNoKCdzaGExJywgJG9yZGVyX2lkIC4gJ2hhc2gnKTsKCiAgICAgICAgICAgIGlmICgkX1JFUVVFU1RbJ2gnXSA9PSAkaGFzaCkgewogICAgICAgICAgICAgICAgJHRoaXMtPnBmbG9nKCctLS1IQVNIIHZhbGlkZSBOZXNzLU9NLS0tJyk7CgogICAgICAgICAgICAgICAgJGpzb24gPSBmaWxlX2dldF9jb250ZW50cygncGhwOi8vaW5wdXQnKTsKICAgICAgICAgICAgICAgICRyZXBvbnNlb3JhbmdlID0ganNvbl9kZWNvZGUoJGpzb24sIHRydWUpOwogICAgICAgICAgICAgICAgJHN0YXR1cyA9ICRyZXBvbnNlb3JhbmdlWydzdGF0dXMnXTsKCiAgICAgICAgICAgICAgICAkb3JkZXIgPSBuZXcgV0NfT3JkZXIoJG9yZGVyX2lkKTsKICAgICAgICAgICAgICAgIGlmICgkc3RhdHVzID09ICdTVUNDRVNTJykgewoKICAgICAgICAgICAgICAgICAgICAkb3JkZXItPnBheW1lbnRfY29tcGxldGUoKTsKICAgICAgICAgICAgICAgICAgICAkb3JkZXItPmFkZF9vcmRlcl9ub3RlKF9fKCdQYWllbWVudCBOZXNzIE9NIGVmZmVjdHXDqS4nLCAnbmVzcy1vbScpKTsKICAgICAgICAgICAgICAgICAgICAkb3JkZXItPmFkZF9vcmRlcl9ub3RlKF9fKCdUcmFuc2FjdGlvbiA6ICcgLiAkanNvbiwgJ25lc3Mtb20nKSk7CiAgICAgICAgICAgICAgICAgICAgJHdvb2NvbW1lcmNlLT5jYXJ0LT5lbXB0eV9jYXJ0KCk7CiAgICAgICAgICAgICAgICAgICAgZWNobyBqc29uX2VuY29kZShhcnJheSgic3RhdHVzIiA9PiAxLCAibWVzc2FnZSIgPT4gIlBhaWVtZW50IE9LIikpOwogICAgICAgICAgICAgICAgICAgICRwZkVycm9yID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAkdGhpcy0+cGZsb2coJ1BhaWVtZW50IGRlIGxhIGNvbW1hbmRlIG4jICcgLiAkb3JkZXJfaWQgLiAnIGVmZmVjdHVlciBhdmVjIHN1Y2PDqHMnKTsKICAgICAgICAgICAgICAgICAgICAkdGhpcy0+cGZsb2coJycsIHRydWUpOwoKICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoJHN0YXR1cyA9PSAnRkFJTEVEJykgewoKICAgICAgICAgICAgICAgICAgICB3Y19hZGRfbm90aWNlKCdMZSBwYWllbWVudCBOZXNzIE9NIGEgw6ljaG91w6knLCAnZXJyb3InKTsKICAgICAgICAgICAgICAgICAgICAvLyBBZGQgbm90ZSB0byB0aGUgb3JkZXIgZm9yIHlvdXIgcmVmZXJlbmNlCiAgICAgICAgICAgICAgICAgICAgJG9yZGVyLT51cGRhdGVfc3RhdHVzKCdmYWlsZWQnLCBfXygnTGUgcGFpZW1lbnQgTmVzcyBPTSBhIMOpY2hvdcOpLicsICduZXNzLW9tJykpOwogICAgICAgICAgICAgICAgICAgICRvcmRlci0+YWRkX29yZGVyX25vdGUoJ0Vycm9yOiAnIC4gJ0xlIHBhaWVtZW50IE5lc3MgT00gYSDDqWNob3XDqS4nKTsKICAgICAgICAgICAgICAgICAgICAkb3JkZXItPmFkZF9vcmRlcl9ub3RlKF9fKCdUcmFuc2FjdGlvbiA6ICcgLiAkanNvbiwgJ25lc3Mtb20nKSk7CiAgICAgICAgICAgICAgICAgICAgJHBmRXJyb3IgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICRwZkVyck1zZyA9ICdQYWllbWVudCBkZSBsYSBjb21tYW5kZSBuIyAnIC4gJG9yZGVyX2lkIC4gJyBlY2hvdcOpJzsKICAgICAgICAgICAgICAgICAgICBlY2hvIGpzb25fZW5jb2RlKGFycmF5KCJzdGF0dXMiID0+IDAsICJtZXNzYWdlIiA9PiAiUGFpZW1lbnQgZWNob3XDqSIpKTsKCiAgICAgICAgICAgICAgICAgICAgaWYgKCRwZkVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT5wZmxvZygnVW5lIEVycmV1ciBlc3Qgc3VydmVudWU6ICcgLiAkcGZFcnJNc2cpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAkdGhpcy0+cGZsb2coJycsIHRydWUpOwogICAgICAgICAgICAgICAgICAgIGV4aXQoKTsKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAkcGZFcnJvciA9IHRydWU7CiAgICAgICAgICAgICAgICAkdGhpcy0+cGZsb2coJ0hBU0ggaW52YWxpZGUgTmVzcy1PTS4uLiAnKTsKICAgICAgICAgICAgfQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICRwZkVycm9yID0gdHJ1ZTsKICAgICAgICAgICAgJHBmRXJyTXNnID0gJ1JlcXVldHRlIE5lc3MgT00gSW5jb3JyZWN0JzsKICAgICAgICB9CiAgICB9Cgp9

Function Calls

None

Variables

None

Stats

MD5 203fd655a729d8f39781cdfce083c0c4
Eval Count 0
Decode Time 687 ms