Exploit databaseDownload repository ZIP
GH-8c7f0e4b0e998904a1d6f7dcd99e3e7d
d-xuan/cve-2024-52510
Sources for CVE-2024-52510
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files11
d-xuan/cve-2024-52510Revision 6c0d89756ae0
- ↑..Parent directory
- AvailabilityZone.php
- Fault.php
- Flavor.php
- Host.php
- Hypervisor.php
- HypervisorStatistic.php
- Image.php
- Keypair.php
- Limit.php
- QuotaSet.php
- Server.php
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
3rdparty/php-opencloud/openstack/src/Compute/v2/Models/Keypair.php
PHP · 2,209 bytes<?php
declare(strict_types=1);
namespace OpenStack\Compute\v2\Models;
use OpenStack\Common\Resource\Alias;
use OpenStack\Common\Resource\Creatable;
use OpenStack\Common\Resource\Deletable;
use OpenStack\Common\Resource\Listable;
use OpenStack\Common\Resource\OperatorResource;
use OpenStack\Common\Resource\Retrievable;
use OpenStack\Common\Transport\Utils;
/**
* Represents a Compute v2 Keypair.
*
* @property \OpenStack\Compute\v2\Api $api
*/
class Keypair extends OperatorResource implements Listable, Retrievable, Deletable, Creatable
{
/** @var string */
public $fingerprint;
/** @var string */
public $name;
/** @var string */
public $publicKey;
/** @var string */
public $privateKey;
/** @var bool */
public $deleted;
/** @var string */
public $userId;
/** @var string */
public $type;
/**
* @var string
*
* @deprecated Left for backward compatibility only. It is not retrieved from the API.
*/
public $id;
/** @var \DateTimeImmutable */
public $createdAt;
protected $aliases = [
'public_key' => 'publicKey',
'private_key' => 'privateKey',
'user_id' => 'userId',
'type' => 'type',
];
protected $resourceKey = 'keypair';
protected $resourcesKey = 'keypairs';
protected function getAliases(): array
{
return parent::getAliases() + [
'created_at' => new Alias('createdAt', \DateTimeImmutable::class),
];
}
public function retrieve()
{
$response = $this->execute($this->api->getKeypair(), $this->getAttrs(['name', 'userId']));
$this->populateFromResponse($response);
}
public function create(array $userOptions): Creatable
{
$response = $this->execute($this->api->postKeypair(), $userOptions);
return $this->populateFromResponse($response);
}
public function populateFromArray(array $array): self
{
return parent::populateFromArray(Utils::flattenJson($array, $this->resourceKey));
}
public function delete()
{
$this->execute($this->api->deleteKeypair(), ['name' => (string) $this->name]);
}
}