Created
February 28, 2018 11:48
-
-
Save sijad/9c3ea2b5e202afb8077f4642000c2a23 to your computer and use it in GitHub Desktop.
UniversalPOPGadget https://nickbloor.co.uk/2018/02/28/popping-wordpress/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!class_exists("UniversalPOPGadget")) { | |
class UniversalPOPGadget { | |
private function logEvent($event) { | |
file_put_contents('UniversalPOPGadget.txt', $event . "\r\n", FILE_APPEND); | |
} | |
public function __construct() { $this->logEvent('UniversalPOPGadget::__construct()'); } | |
public function __destruct() { $this->logEvent('UniversalPOPGadget::__destruct()'); } | |
public function __call($name, $args) { | |
$this->logEvent('UniversalPOPGadget::__call(' . $name . ', ' . implode(',', $args) . ')'); | |
} | |
public static function __callStatic($name, $args) { | |
$this->logEvent('UniversalPOPGadget::__callStatic(' . $name . ', ' . implode(',', $args) . ')'); | |
} | |
public function __get($name) { $this->logEvent('UniversalPOPGadget::__get(' . $name . ')'); } | |
public function __set($name, $value) { $this->logEvent('UniversalPOPGadget::__set(' . $name . ', ' . $value . ')'); } | |
public function __isset($name) { $this->logEvent('UniversalPOPGadget::__isset(' . $name . ')'); } | |
public function __unset($name) { $this->logEvent('UniversalPOPGadget::__unset(' . $name . ')'); } | |
public function __sleep() { $this->logEvent('UniversalPOPGadget::__sleep()'); return array(); } | |
public function __wakeup() { | |
$this->logEvent('UniversalPOPGadget::__wakeup()'); | |
$this->logEvent(" [!] Defined classes:"); | |
foreach(get_declared_classes() as $c) { | |
$this->logEvent(" [+] " . $c); | |
} | |
} | |
public function __toString() { $this->logEvent('UniversalPOPGadget::__toString()'); } | |
public function __invoke($param) { $this->logEvent('UniversalPOPGadget::__invoke(' . $param . ')'); } | |
public function __set_state($properties) { | |
$this->logEvent('UniversalPOPGadget::__set_state(' . implode(',', $properties) . ')'); | |
} | |
public function __clone() { $this->logEvent('UniversalPOPGadget::__clone()'); } | |
public function __debugInfo() { $this->logEvent('UniversalPOPGadget::__debugInfo()'); } | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment