Translated ['.github/pull_request_template.md', 'src/pentesting-cloud/az

This commit is contained in:
Translator
2024-12-31 19:09:14 +00:00
parent 7770a50092
commit 388bdfdf0a
244 changed files with 7988 additions and 10827 deletions

View File

@@ -4,37 +4,32 @@
## Basic Information
DigitalOcean Functions, also known as "DO Functions," is a serverless computing platform that lets you **run code without having to worry about the underlying infrastructure**. With DO Functions, you can write and deploy your code as "functions" that can be **triggered** via **API**, **HTTP requests** (if enabled) or **cron**. These functions are executed in a fully managed environment, so you **don't need to worry** about scaling, security, or maintenance.
DigitalOcean Functions, जिसे "DO Functions" के नाम से भी जाना जाता है, एक सर्वरलेस कंप्यूटिंग प्लेटफॉर्म है जो आपको **बुनियादी ढांचे की चिंता किए बिना कोड चलाने** की अनुमति देता है। DO Functions के साथ, आप अपने कोड को "फंक्शंस" के रूप में लिख और तैनात कर सकते हैं जिन्हें **API**, **HTTP अनुरोधों** (यदि सक्षम हो) या **क्रॉन** के माध्यम से **प्रेरित** किया जा सकता है। ये फंक्शंस एक पूरी तरह से प्रबंधित वातावरण में निष्पादित होते हैं, इसलिए आपको **स्केलिंग, सुरक्षा, या रखरखाव** की चिंता करने की आवश्यकता नहीं है।
In DO, to create a function first you need to **create a namespace** which will be **grouping functions**.\
Inside the namespace you can then create a function.
DO में, एक फंक्शन बनाने के लिए सबसे पहले आपको **एक नामस्थान बनाना** होगा जो **फंक्शंस को समूहित करेगा**\
नामस्थान के अंदर आप फिर एक फंक्शन बना सकते हैं।
### Triggers
The way **to trigger a function via REST API** (always enabled, it's the method the cli uses) is by triggering a request with an **authentication token** like:
**REST API के माध्यम से एक फंक्शन को प्रेरित करने का तरीका** (हमेशा सक्षम, यह वह विधि है जिसका उपयोग cli करता है) एक **प्रमाणीकरण टोकन** के साथ अनुरोध को प्रेरित करके है जैसे:
```bash
curl -X POST "https://faas-lon1-129376a7.doserverless.co/api/v1/namespaces/fn-c100c012-65bf-4040-1230-2183764b7c23/actions/functionname?blocking=true&result=true" \
-H "Content-Type: application/json" \
-H "Authorization: Basic MGU0NTczZGQtNjNiYS00MjZlLWI2YjctODk0N2MyYTA2NGQ4OkhwVEllQ2t4djNZN2x6YjJiRmFGc1FERXBySVlWa1lEbUxtRE1aRTludXA1UUNlU2VpV0ZGNjNqWnVhYVdrTFg="
-H "Content-Type: application/json" \
-H "Authorization: Basic MGU0NTczZGQtNjNiYS00MjZlLWI2YjctODk0N2MyYTA2NGQ4OkhwVEllQ2t4djNZN2x6YjJiRmFGc1FERXBySVlWa1lEbUxtRE1aRTludXA1UUNlU2VpV0ZGNjNqWnVhYVdrTFg="
```
To see how is the **`doctl`** cli tool getting this token (so you can replicate it), the **following command shows the complete network trace:**
**`doctl`** CLI टूल इस टोकन को कैसे प्राप्त कर रहा है (ताकि आप इसे दोहरा सकें), **निम्नलिखित कमांड पूरा नेटवर्क ट्रेस दिखाता है:**
```bash
doctl serverless connect --trace
```
**When HTTP trigger is enabled**, a web function can be invoked through these **HTTP methods GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS**.
**जब HTTP ट्रिगर सक्षम होता है**, एक वेब फ़ंक्शन को इन **HTTP विधियों GET, POST, PUT, PATCH, DELETE, HEAD और OPTIONS** के माध्यम से बुलाया जा सकता है।
> [!CAUTION]
> In DO functions, **environment variables cannot be encrypted** (at the time of this writing).\
> I couldn't find any way to read them from the CLI but from the console it's straight forward.
> DO फ़ंक्शंस में, **पर्यावरण चर को एन्क्रिप्ट नहीं किया जा सकता** (इस लेखन के समय)।\
> मुझे CLI से उन्हें पढ़ने का कोई तरीका नहीं मिला, लेकिन कंसोल से यह सीधा है।
**Functions URLs** look like this: `https://<random>.doserverless.co/api/v1/web/<namespace-id>/default/<function-name>`
### Enumeration
**फ़ंक्शंस URLs** इस तरह दिखते हैं: `https://<random>.doserverless.co/api/v1/web/<namespace-id>/default/<function-name>`
### गणना
```bash
# Namespace
doctl serverless namespaces list
@@ -53,12 +48,7 @@ doctl serverless activations result <activation-id> # get only the response resu
# I couldn't find any way to get the env variables form the CLI
```
> [!CAUTION]
> There **isn't metadata endpoint** from the Functions sandbox.
> Functions सैंडबॉक्स से **कोई मेटाडेटा एंडपॉइंट नहीं है**।
{{#include ../../../banners/hacktricks-training.md}}