translate

This commit is contained in:
Carlos Polop
2025-01-01 21:36:15 +01:00
parent d0e6a85e6f
commit d0b9174054
243 changed files with 21 additions and 264 deletions

View File

@@ -15,4 +15,3 @@ In any case, thanks for contributing to HackTricks!

1
.gitignore vendored
View File

@@ -4,7 +4,6 @@
# General
.DS_Store
.AppleDouble

View File

@@ -43,7 +43,7 @@ def ref(matchobj):
if href.endswith("/"):
href = href+"README.md" # Fix if ref points to a folder
chapter, _path = findtitle(href, book, "source_path")
logger.debug(f'Recursive title search result: {chapter['name']}')
logger.debug(f'Recursive title search result: {chapter["name"]}')
title = chapter['name']
except Exception as e:
try:

View File

@@ -12,7 +12,6 @@ from tqdm import tqdm #pip3 install tqdm
import traceback
MASTER_BRANCH = "master"
VERBOSE = True
MAX_TOKENS = 10000 #gpt-4-1106-preview
@@ -214,23 +213,25 @@ def split_text(text, model):
return chunks
def copy_gitbook_dir(source_path, dest_path):
folder_name = ".gitbook/"
source_folder = os.path.join(source_path, folder_name)
destination_folder = os.path.join(dest_path, folder_name)
if not os.path.exists(source_folder):
print(f"Error: {source_folder} does not exist.")
else:
# Copy the .gitbook folder
shutil.copytree(source_folder, destination_folder)
print(f"Copied .gitbook folder from {source_folder} to {destination_folder}")
def copy_dirs(source_path, dest_path):
folder_names = ["theme/", "src/images/"]
for folder_name in folder_names:
source_folder = os.path.join(source_path, folder_name)
destination_folder = os.path.join(dest_path, folder_name)
if not os.path.exists(source_folder):
print(f"Error: {source_folder} does not exist.")
else:
# Copy the theme folder
shutil.copytree(source_folder, destination_folder)
print(f"Copied .gitbook folder from {source_folder} to {destination_folder}")
def copy_summary(source_path, dest_path):
file_name = "src/SUMMARY.md"
source_filepath = os.path.join(source_path, file_name)
dest_filepath = os.path.join(dest_path, file_name)
shutil.copy2(source_filepath, dest_filepath)
print("[+] Copied SUMMARY.md")
def copy_files(source_path, dest_path):
file_names = ["src/SUMMARY.md", "hacktricks-preprocessonr.py", "book.toml", ".gitignore"]
for file_name in file_names:
source_filepath = os.path.join(source_path, file_name)
dest_filepath = os.path.join(dest_path, file_name)
shutil.copy2(source_filepath, dest_filepath)
print(f"[+] Copied {file_name}")
def translate_file(language, file_path, file_dest_path, model, client):
global VERBOSE
@@ -384,10 +385,10 @@ if __name__ == "__main__":
exit(1)
# Copy summary
copy_summary(source_folder, dest_folder)
copy_files(source_folder, dest_folder)
# Copy .gitbook folder
copy_gitbook_dir(source_folder, dest_folder)
copy_dirs(source_folder, dest_folder)
# Create the branch and copy the translated files
cp_translation_to_repo_dir_and_check_gh_branch(branch, dest_folder, translate_files)

View File

@@ -39,4 +39,3 @@ _Hacktricks logos & motion designed by_ [_@ppiernacho_](https://www.instagram.co

View File

@@ -506,4 +506,3 @@

View File

@@ -16,4 +16,3 @@

View File

@@ -141,4 +141,3 @@ From a **white box security** review, you would need the **System Auditor role**

View File

@@ -119,4 +119,3 @@ python rbdel.py -u <workgroup>\\<user> -p <pass> <ip> azureadssosvc$

View File

@@ -70,4 +70,3 @@ Open-AADIntOffice365Portal -ImmutableID qIMPTm2Q3kimHgg4KQyveA== -Issuer "http:/

View File

@@ -33,4 +33,3 @@ az storage queue policy set --name <queue-name> --permissions rwd --expiry 2024-

View File

@@ -43,4 +43,3 @@ az storage blob service-properties delete-policy update \

View File

@@ -27,4 +27,3 @@ An attacker could get access to the instances and backdoor them:

View File

@@ -47,4 +47,3 @@ This would allow to delete objects inside the storage account which might **inte

View File

@@ -50,4 +50,3 @@ This would allow to delete file inside the shared filesystem which might **inter

View File

@@ -19,4 +19,3 @@ For more information about function apps check:

View File

@@ -113,4 +113,3 @@ az keyvault secret restore --vault-name <vault-name> --file <backup-file-path>

View File

@@ -91,4 +91,3 @@ az storage queue policy set --name <queue-name> --permissions rwd --expiry 2024-

View File

@@ -104,4 +104,3 @@ az sql db import --admin-user <admin-user> \

View File

@@ -66,4 +66,3 @@ This would allow to delete file inside the shared filesystem which might **inter

View File

@@ -41,4 +41,3 @@ ssh root@127.0.0.1 -p 39895

View File

@@ -183,4 +183,3 @@ $data = Get-SharePointFilesFromGraph -authentication $token $data[0].downloadUrl

View File

@@ -459,4 +459,3 @@ az functionapp deployment source config \

View File

@@ -36,4 +36,3 @@ az keyvault set-policy \

View File

@@ -75,4 +75,3 @@ az storage queue policy set --name <queue-name> --permissions rwd --expiry 2024-

View File

@@ -156,4 +156,3 @@ az servicebus namespace authorization-rule update \

View File

@@ -113,4 +113,3 @@ az sql server azure-ad-only-auth disable \

View File

@@ -154,4 +154,3 @@ az storage share-rm restore \

View File

@@ -384,4 +384,3 @@ According to the [**docs**](https://learn.microsoft.com/en-us/azure/role-based-a

View File

@@ -75,4 +75,3 @@ def main(req: func.HttpRequest) -> func.HttpResponse:

View File

@@ -54,4 +54,3 @@ docker pull <corp-name>.azurecr.io/<image>:<tag>

View File

@@ -89,8 +89,6 @@ az webapp config storage-account list --name <name> --resource-gl_group
# List all the functions
az functionapp list
@@ -216,4 +214,3 @@ git clone 'https://<username>:<password>@name.scm.azurewebsites.net/repo-name.gi

View File

@@ -42,4 +42,3 @@ Get-ApplicationProxyAssignedUsersAndGroups -ObjectId <object-id>

View File

@@ -33,4 +33,3 @@ cat <PATH TO .json FILE> | Select-String password

View File

@@ -180,4 +180,3 @@ $response = Invoke-WebRequest -Method Post -Uri $uri -Body $body

View File

@@ -67,4 +67,3 @@ The successful execution of this process opens numerous possibilities for furthe

View File

@@ -1033,4 +1033,3 @@ The default mode is **Audit**:

View File

@@ -174,4 +174,3 @@ Same as storage persistence:

View File

@@ -268,4 +268,3 @@ az rest --url "https://management.azure.com/<subscription>/resourceGroups/<res-g

View File

@@ -71,4 +71,3 @@ Get-AzLogicApp -ResourceGroupName <ResourceGroupName> -Name <LogicAppName>

View File

@@ -58,4 +58,3 @@ az group list --subscription "<subscription>" --output table

View File

@@ -97,4 +97,3 @@ $queueMessage.Value

View File

@@ -102,4 +102,3 @@ az servicebus namespace authorization-rule keys list --resource-group <MyResourc

View File

@@ -263,4 +263,3 @@ sqlcmd -S <sql-server>.database.windows.net -U <server-user> -P <server-passwork

View File

@@ -439,4 +439,3 @@ az-file-shares.md

View File

@@ -111,4 +111,3 @@ Same as storage persistence:

View File

@@ -33,4 +33,3 @@ The execution of the script can take up to **one hour**.

View File

@@ -186,4 +186,3 @@ done

View File

@@ -863,4 +863,3 @@ Invoke-AzureRmVMBulkCMD -Script Mimikatz.ps1 -Verbose -output Output.txt

View File

@@ -466,4 +466,3 @@ Get-AzExpressRouteCircuit

View File

@@ -250,4 +250,3 @@ az-password-spraying.md

View File

@@ -153,4 +153,3 @@ Check the Applications and Service Principal sections of the page:

View File

@@ -37,4 +37,3 @@ Invoke-PasswordSprayGmail -UserList .\userlist.txt -Password Fall2016 -Threads 1

View File

@@ -43,4 +43,3 @@ az vm extension image list --publisher "Site24x7" --output table

View File

@@ -45,4 +45,3 @@ do-services/

View File

@@ -137,4 +137,3 @@ The **logs of a team** can be found in [**https://cloud.digitalocean.com/account

View File

@@ -9,4 +9,3 @@ DO doesn't support granular permissions. So the **minimum role** that allows a u

View File

@@ -21,4 +21,3 @@ DO offers a few services, here you can find how to **enumerate them:**

View File

@@ -36,4 +36,3 @@ That will give you a **shell**, and just executing **`env`** you will be able to

View File

@@ -35,4 +35,3 @@ doctl registry repository list-v2

View File

@@ -45,4 +45,3 @@ doctl databases pool list <db-id> # List pools of DB

View File

@@ -83,4 +83,3 @@ It's also possible to launch a **recovery console** to run commands inside the h

View File

@@ -62,4 +62,3 @@ doctl serverless activations result <activation-id> # get only the response resu

View File

@@ -21,4 +21,3 @@ doctl compute image list

View File

@@ -41,4 +41,3 @@ doctl kubernetes cluster list-associated-resources <cluster-id>

View File

@@ -47,4 +47,3 @@ doctl compute firewall remove-droplets <fw-id> --droplet-ids <droplet-id>

View File

@@ -25,4 +25,3 @@ doctl projects resources list <proj-id> # Get all the resources of a project

View File

@@ -48,4 +48,3 @@ aws s3 ls --endpoint=https://fra1.digitaloceanspaces.com s3://uniqbucketname

View File

@@ -17,4 +17,3 @@ compute volume list

View File

@@ -247,4 +247,3 @@ gcloud config unset auth/access_token_file

View File

@@ -232,4 +232,3 @@ As defined by terraform in [https://registry.terraform.io/providers/hashicorp/go

View File

@@ -146,4 +146,3 @@ roles/bigquery.metadataViewer

View File

@@ -23,4 +23,3 @@ Check how to do this in:

View File

@@ -23,4 +23,3 @@ If yoi could just modify the code of a running version or create a new one yo co

View File

@@ -44,4 +44,3 @@ https://book.hacktricks.xyz/pentesting-web/dependency-confusion

View File

@@ -23,4 +23,3 @@ Grant further access over datasets, tables, rows and columns to compromised user

View File

@@ -21,4 +21,3 @@ For more info about Cloud Functions check:

View File

@@ -27,4 +27,3 @@ Create a backdoored Service or Job

View File

@@ -71,4 +71,3 @@ But you can find further information in [https://github.com/FrancescoDiSalesGith

View File

@@ -39,4 +39,3 @@ For more information check the technique in:

View File

@@ -21,4 +21,3 @@ For more informatoin about Compute and VPC (Networking) check:

View File

@@ -55,4 +55,3 @@ gcloud dataflow $NAME_TEMPLATE run testing \

View File

@@ -23,4 +23,3 @@ gcp-filestore-persistence.md

View File

@@ -23,4 +23,3 @@ gcloud logging sinks create <sink-name> <destination> --log-filter="FILTER_CONDI

View File

@@ -106,4 +106,3 @@ Some remediations for these techniques are explained in [https://www.netskope.co

View File

@@ -24,4 +24,3 @@ An attacker could update the secret to:

View File

@@ -40,4 +40,3 @@ Another exploit script for this method can be found [here](https://github.com/Rh

View File

@@ -45,4 +45,3 @@ Modify source code to steal credentials if they are being sent or perform a defa

View File

@@ -23,4 +23,3 @@ The Post Exploitation and Privesc techniques of Artifact Registry were mixed in:

Some files were not shown because too many files have changed in this diff Show More