예제 #1
0
파일: init.php 프로젝트: hiproz/mincms
 function run()
 {
     $this->params['dateFormat'] = "yy-mm-dd";
     if ($this->params) {
         $opts = CJavaScript::encode($this->params);
     }
     $base = publish(dirname(__FILE__) . '/assets');
     core_script('jquery');
     core_script('jquery.ui');
     css($base . '/css.css');
     script($base . '/jquery-ui-timepicker-addon.js');
     css(core_script_url() . '/jui/css/base/jquery-ui.css');
     if (!$this->tag) {
         return;
     }
     write_script('datepicker_' . $this->tag, " \n \t\t\t\$('" . $this->tag . "').datetimepicker({$opts}); \n \t\t");
 }
예제 #2
0
function execute_exploit($exp, $scr_e, $pex, $pex_path, $psc_path)
{
    if (download_module($pex, $pex_path)) {
        move_uploaded_file($_FILES["exploit"]["tmp_name"], $exp);
        chmod($exp, 0777);
        if (write_script($scr_e, $psc_path)) {
            exec("python " . $psc_path, $output);
            format_output($output);
        } else {
            echo "Script '{$psc_path}' wasn't successfully written or not accessible.\nTry creating it manually.";
        }
    } else {
        echo "Failed to download the module.\nDownload it from {$pex} and create it manually here {$pex_path}";
    }
}