OXIESEC PANEL
- Current Dir:
/
/
snap
/
certbot-dns-digitalocean
/
4356
/
lib
/
python3.12
/
site-packages
/
digitalocean
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/12/2025 06:18:03 PM
rwxr-xr-x
📄
Account.py
904 bytes
06/12/2025 06:17:59 PM
rw-r--r--
📄
Action.py
2.22 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Balance.py
847 bytes
06/12/2025 06:17:59 PM
rw-r--r--
📄
Certificate.py
4.28 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Domain.py
5.22 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Droplet.py
20.65 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Firewall.py
8.26 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
FloatingIP.py
3.02 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Image.py
5.55 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Kernel.py
328 bytes
06/12/2025 06:17:59 PM
rw-r--r--
📄
LoadBalancer.py
15.47 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Manager.py
14.09 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Metadata.py
1.3 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Project.py
4.91 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Record.py
3.92 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Region.py
386 bytes
06/12/2025 06:17:59 PM
rw-r--r--
📄
SSHKey.py
2.55 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Size.py
453 bytes
06/12/2025 06:17:59 PM
rw-r--r--
📄
Snapshot.py
1.17 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Tag.py
5.71 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
VPC.py
3.73 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
Volume.py
6.62 KB
06/12/2025 06:17:59 PM
rw-r--r--
📄
__init__.py
1.1 KB
06/12/2025 06:17:59 PM
rw-r--r--
📁
__pycache__
-
06/12/2025 06:18:03 PM
rwxr-xr-x
📄
baseapi.py
7.94 KB
06/12/2025 06:17:59 PM
rw-r--r--
Editing: Metadata.py
Close
# -*- coding: utf-8 -*- import requests try: from urlparse import urljoin except ImportError: from urllib.parse import urljoin from .baseapi import BaseAPI class Metadata(BaseAPI): """ Metadata API: Provide useful information about the current Droplet. See: https://developers.digitalocean.com/metadata/#introduction """ droplet_id = None end_point = "http://169.254.169.254/metadata/v1" def __init__(self, *args, **kwargs): super(Metadata, self).__init__(*args, **kwargs) self.end_point = "http://169.254.169.254/metadata/v1" def get_data(self, url, headers=dict(), params=dict(), render_json=True): """ Customized version of get_data to directly get the data without using the authentication method. """ url = urljoin(self.end_point, url) response = requests.get(url, headers=headers, params=params, timeout=self.get_timeout()) if render_json: return response.json() return response.content def load(self): metadata = self.get_data("v1.json") for attr in metadata.keys(): setattr(self, attr, metadata[attr]) return self def __str__(self): return "<Metadata: %s>" % (self.droplet_id)