PluginProbe
The WP Remote WordPress Plugin / 5.53
The WP Remote WordPress Plugin v5.53
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
wpremote / callback / wings / security.php

security.php in The WP Remote WordPress Plugin 5.53, at callback/wings/security.php

49 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) exit;
3 if (!class_exists('BVSecurityCallback')) :
4 class BVSecurityCallback extends BVCallbackBase {
5 function getCrontab() {
6 $resp = array();
7
8 if (function_exists('exec')) {
9 $output = array();
10 $retval = -1;
11 $execRes = exec('crontab -l', $output, $retval);
12 if ($execRes !== false && $execRes !== null) {
13 $resp["content"] = implode("\n", $output);
14 $resp["status"] = "success";
15 $resp["code"] = $retval;
16 }
17 }
18 if (empty($resp) && function_exists('popen')) {
19 $handle = popen('crontab -l', 'rb');
20 if ($handle) {
21 $output = '';
22 while (!feof($handle)) {
23 $output .= fread($handle, 8192);
24 }
25 $resp["content"] = $output;
26 $resp["status"] = "success";
27 pclose($handle);
28 } else {
29 $resp["status"] = "failed";
30 }
31 }
32
33 return $resp;
34 }
35
36 public function process($request) {
37 switch ($request->method) {
38 case "gtcrntb":
39 $resp = $this->getCrontab();
40 break;
41 default:
42 $resp = false;
43 }
44
45 return $resp;
46 }
47 }
48 endif;
49