HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wptoho/wp-content/plugins/defender-security/extra/shared-tasks/environment.js
module.exports = function (grunt) {
	'use strict';

	var has_task = function (task) {
		grunt.verbose.write("Checking " + task + " task existence... ");
		if (grunt.task.exists(task)) {
			grunt.verbose.writeln("OK".green);
			return true;
		}
		grunt.verbose.writeln("MISSING".red);
		return false;
	};

	var get_wdp_id = function () {
		var pkg = grunt.file.readJSON('package.json'),
			wdp_id = (pkg || {}).wdp_id || false
		;
		if (wdp_id) return true;

		var plugin = grunt.file.read(pkg.name + '.php'),
			result = plugin.match(/(\*\s+)?WDP ID:\s*(\d+)/);
		;
		if (result && result[2]) {
			wdp_id = parseInt(result[2], 10);
		}

		return wdp_id;
	}

	var sanity_check = function () {
		grunt.verbose.subhead("Checking WPMU DEV task environment");

		['release'].forEach(function (task) {
			if (has_task(task)) return true;
			var error = "WPMU DEV interface required task [" + task + "] is missing";
			grunt.log.writeln(error.red.bold);
		});
	};

	grunt.registerTask('wpmudev_preflight_check', sanity_check);

	grunt.cli.tasks = grunt.cli.tasks.unshift('wpmudev_preflight_check');

	return {
		has_task: has_task,
		sanity_check: sanity_check,
		get_wdp_id: get_wdp_id
	};

};