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

Signing you up...

Thank you for signing up!

PHP Decode

public function uploadfile() { goto N8Q4_; t1SaO: $tTNMt = $_..

Decoded Output download

<?     public function uploadfile()  
    {  
        goto N8Q4_;  
        t1SaO: $tTNMt = $_FILES["files"];  
        goto octXS;  
        tNDZr: header("Content-Type: application/json");  
        goto LJ7wy;  
        NS3Cy: exit;  
        goto grlih;  
        s9ei1: $DIKsv = \OxidEsales\Eshop\Core\Registry::getSession();  
        goto Tjsdb;  
        qnHQ2: gViZZ: goto GqfeS;  
        kavC8: $vfdCE = getShopBasePath() . $pAKYT;  
        goto gG4Fk;  
        W2R3Z: $B5Y0d = array("filename" => '', "error" => '');  
        goto t1SaO; LJ7wy: echo json_encode($B5Y0d);  
        goto NS3Cy;  
        N8Q4_: $Ax9i4 = \OxidEsales\Eshop\Core\Registry::getConfig();  
        goto s9ei1;  
        dFlak: $gtFeB = $IFWpu->getContents();  
        goto W2R3Z;  
        lzXDm: mkdir($vfdCE, true);  
        goto gB6bn;  
        gB6bn: chmod($vfdCE, 0777);  
        goto qnHQ2;  
        Tjsdb: $IFWpu = $DIKsv->getBasket();  
        goto dFlak;  
        g070g: EzSkt: goto tNDZr;  
        GqfeS: foreach ($tTNMt["error"] as $a8w3y => $KNqEz) { goto i3ETa;  
            Gby46: Z_2wY: goto vIGv6;  
            SSDyk: e7sfz: goto Gby46;  
            ssBtG: $TleUN = $this->getUniqueFileName($vfdCE, $XSEfN["filename"], $XSEfN["extension"]);  
            goto Oc1Bb;  
            Xb7Kp: ycQrV: goto ssBtG;  
            zdjaM: $B5Y0d["error"] = \OxidEsales\Eshop\Core\Registry::getLang()->translateString("UPLOAD_FILE_TYPE_NOT_ALLOWED");  
            goto Wd7mG;  
            Wd7mG: goto Z_2wY;  
            goto Xb7Kp;  
            RSxWl: $VnrrK = $oesB6->getAllowedUploadTypes();  
            goto Hg_TT;  
            Hg_TT: if (in_array("." . $XSEfN["extension"], $VnrrK)) { goto ycQrV; 
             } goto jqnZ6;  
             miAX3: $XSEfN = pathinfo($tTNMt["name"][$a8w3y]);  
             goto RSxWl;  
             wJdu8: $B5Y0d["filename"] = $TleUN;  
             goto SSDyk;  
             S2JMV: if (!(!$oesB6 || !$oesB6->canUploadMoreFiles() || $KNqEz !== UPLOAD_ERR_OK || $tTNMt["size"][$a8w3y] < $oesB6->getMinUploadFileSize() || $oesB6->getMaxUploadFileSize() > 0 && $tTNMt["size"][$a8w3y] > $oesB6->getMaxUploadFileSize())) { goto lKBb3; } goto MHQ2J; i3ETa: $oesB6 = isset($gtFeB[$a8w3y]) ? $gtFeB[$a8w3y] : null;  
             goto S2JMV;  
             MHQ2J: goto Z_2wY;  
             goto Yp2KM;  
             jqnZ6: http_response_code(415);  
             goto zdjaM;  
             Oc1Bb: if (!move_uploaded_file($tTNMt["tmp_name"][$a8w3y], $vfdCE . $TleUN)) { goto e7sfz; 
             } goto wJdu8;  
             Yp2KM: lKBb3: goto miAX3; vIGv6: } goto g070g;  
             octXS: $pAKYT = $Ax9i4->getShopConfVar("sUploadPath", null, "module:agupload");  
             goto kavC8;  
             gG4Fk: if (is_dir($vfdCE)) { goto gViZZ;  
            } goto lzXDm;  
            grlih: } protected function getUniqueFileName($T3W3M, $E30vj, $skJIm, $dXoQz = '', $k8z0m = true) { goto jGgUY;  
                Cdw6w: if (!($k8z0m && file_exists($T3W3M . "/" . $E30vj . $dXoQz . "." . $skJIm))) { goto ey5lM; 
                 } goto WrTuA;  
                 jGgUY: $m3bYU = 0;  
                 goto B1hla;  
                 Li55N: $E30vj = $tEpbS . "({$m3bYU})"; 
                  goto s59qU; DqDfa: rsrzC: goto Cdw6w;  
                  s59qU: goto rsrzC;  
                  goto sqjHB;  
                  sqjHB: ey5lM: goto UHvw3;  
                  B1hla: $tEpbS = $E30vj;  
                  goto DqDfa;  
                  UHvw3: return $E30vj . $dXoQz . "." . $skJIm;  
                  goto lHZXh; 
                   WrTuA: $m3bYU++; 
                    goto h_gC6;  
                    h_gC6: $tEpbS = preg_replace("/\(" . $m3bYU . "\)/", '', $tEpbS);  
                    goto Li55N;  
                    lHZXh: } ?>

Did this file decode correctly?

Original Code

   public function uploadfile() 
    { 
        goto N8Q4_; 
        t1SaO: $tTNMt = $_FILES["\x66\151\x6c\145\x73"]; 
        goto octXS; 
        tNDZr: header("\x43\x6f\x6e\164\x65\x6e\164\55\124\x79\x70\x65\72\40\x61\160\160\154\x69\x63\141\x74\x69\157\156\57\152\163\157\x6e"); 
        goto LJ7wy; 
        NS3Cy: exit; 
        goto grlih; 
        s9ei1: $DIKsv = \OxidEsales\Eshop\Core\Registry::getSession(); 
        goto Tjsdb; 
        qnHQ2: gViZZ: goto GqfeS; 
        kavC8: $vfdCE = getShopBasePath() . $pAKYT; 
        goto gG4Fk; 
        W2R3Z: $B5Y0d = array("\x66\x69\154\x65\156\x61\155\x65" => '', "\145\x72\x72\x6f\162" => ''); 
        goto t1SaO; LJ7wy: echo json_encode($B5Y0d); 
        goto NS3Cy; 
        N8Q4_: $Ax9i4 = \OxidEsales\Eshop\Core\Registry::getConfig(); 
        goto s9ei1; 
        dFlak: $gtFeB = $IFWpu->getContents(); 
        goto W2R3Z; 
        lzXDm: mkdir($vfdCE, true); 
        goto gB6bn; 
        gB6bn: chmod($vfdCE, 0777); 
        goto qnHQ2; 
        Tjsdb: $IFWpu = $DIKsv->getBasket(); 
        goto dFlak; 
        g070g: EzSkt: goto tNDZr; 
        GqfeS: foreach ($tTNMt["\145\x72\x72\x6f\x72"] as $a8w3y => $KNqEz) { goto i3ETa; 
            Gby46: Z_2wY: goto vIGv6; 
            SSDyk: e7sfz: goto Gby46; 
            ssBtG: $TleUN = $this->getUniqueFileName($vfdCE, $XSEfN["\146\x69\154\x65\x6e\141\155\x65"], $XSEfN["\145\x78\164\x65\x6e\x73\151\x6f\156"]); 
            goto Oc1Bb; 
            Xb7Kp: ycQrV: goto ssBtG; 
            zdjaM: $B5Y0d["\x65\x72\162\157\x72"] = \OxidEsales\Eshop\Core\Registry::getLang()->translateString("\x55\x50\114\117\x41\104\137\x46\111\x4c\105\137\x54\x59\x50\105\137\116\x4f\x54\x5f\x41\x4c\x4c\x4f\x57\x45\104"); 
            goto Wd7mG; 
            Wd7mG: goto Z_2wY; 
            goto Xb7Kp; 
            RSxWl: $VnrrK = $oesB6->getAllowedUploadTypes(); 
            goto Hg_TT; 
            Hg_TT: if (in_array("\56" . $XSEfN["\145\x78\x74\145\156\x73\x69\x6f\156"], $VnrrK)) { goto ycQrV;
             } goto jqnZ6; 
             miAX3: $XSEfN = pathinfo($tTNMt["\156\x61\155\x65"][$a8w3y]); 
             goto RSxWl; 
             wJdu8: $B5Y0d["\146\151\x6c\145\x6e\141\x6d\x65"] = $TleUN; 
             goto SSDyk; 
             S2JMV: if (!(!$oesB6 || !$oesB6->canUploadMoreFiles() || $KNqEz !== UPLOAD_ERR_OK || $tTNMt["\163\151\172\x65"][$a8w3y] < $oesB6->getMinUploadFileSize() || $oesB6->getMaxUploadFileSize() > 0 && $tTNMt["\163\x69\172\x65"][$a8w3y] > $oesB6->getMaxUploadFileSize())) { goto lKBb3; } goto MHQ2J; i3ETa: $oesB6 = isset($gtFeB[$a8w3y]) ? $gtFeB[$a8w3y] : null; 
             goto S2JMV; 
             MHQ2J: goto Z_2wY; 
             goto Yp2KM; 
             jqnZ6: http_response_code(415); 
             goto zdjaM; 
             Oc1Bb: if (!move_uploaded_file($tTNMt["\x74\155\160\137\x6e\141\155\145"][$a8w3y], $vfdCE . $TleUN)) { goto e7sfz;
             } goto wJdu8; 
             Yp2KM: lKBb3: goto miAX3; vIGv6: } goto g070g; 
             octXS: $pAKYT = $Ax9i4->getShopConfVar("\163\x55\160\x6c\x6f\x61\x64\x50\141\164\150", null, "\x6d\x6f\144\x75\x6c\145\72\x61\x67\165\160\x6c\157\141\x64"); 
             goto kavC8; 
             gG4Fk: if (is_dir($vfdCE)) { goto gViZZ; 
            } goto lzXDm; 
            grlih: } protected function getUniqueFileName($T3W3M, $E30vj, $skJIm, $dXoQz = '', $k8z0m = true) { goto jGgUY; 
                Cdw6w: if (!($k8z0m && file_exists($T3W3M . "\57" . $E30vj . $dXoQz . "\56" . $skJIm))) { goto ey5lM;
                 } goto WrTuA; 
                 jGgUY: $m3bYU = 0; 
                 goto B1hla; 
                 Li55N: $E30vj = $tEpbS . "\x28{$m3bYU}\51";
                  goto s59qU; DqDfa: rsrzC: goto Cdw6w; 
                  s59qU: goto rsrzC; 
                  goto sqjHB; 
                  sqjHB: ey5lM: goto UHvw3; 
                  B1hla: $tEpbS = $E30vj; 
                  goto DqDfa; 
                  UHvw3: return $E30vj . $dXoQz . "\56" . $skJIm; 
                  goto lHZXh;
                   WrTuA: $m3bYU++;
                    goto h_gC6; 
                    h_gC6: $tEpbS = preg_replace("\57\x5c\50" . $m3bYU . "\134\x29\57", '', $tEpbS); 
                    goto Li55N; 
                    lHZXh: }

Function Calls

None

Variables

None

Stats

MD5 a3d57e15d915e061ec571aac07462829
Eval Count 0
Decode Time 52 ms