# wpremote/5.24/callback/wings/security.php

The WP Remote WordPress Plugin, version 5.24. 43 lines.

- Page: https://pluginprobe.com/plugins/wpremote/5.24/code/callback/wings/security.php
- Raw: https://pluginprobe.com/plugins/wpremote/5.24/raw/callback/wings/security.php
- Modified: 2023-08-28T11:41:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpremote/5.24/code/callback/wings/security.php#L10-L20`.

```php
<?php
if (!defined('ABSPATH')) exit;
if (!class_exists('BVSecurityCallback')) :
	class BVSecurityCallback extends BVCallbackBase {
		function getCrontab() {
			$resp = array();

			if (function_exists('exec') && exec('crontab -l', $output, $retval) !== false) {
				$resp["content"] = implode("\n", $output);
				$resp["status"] = "success";
				$resp["code"] = $retval;
			} elseif (function_exists('popen')) {
				$handle = popen('crontab -l', 'rb');
				if ($handle) {
					$output = '';
					while (!feof($handle)) {
						$output .= fread($handle, 8192);
					}
					$resp["content"] = $output;
					$resp["status"] = "success";
					pclose($handle);
				} else {
					$resp["status"] = "failed";
				}
			}

			return $resp;
		}

		public function process($request) {
			switch ($request->method) {
			case "gtcrntb":
				$resp = $this->getCrontab();
				break;
			default:
				$resp = false;
			}

			return $resp;
		}
	}
endif;

```
