diff --git a/.github/workflows/build_master.yml b/.github/workflows/build_master.yml index f936d8a88..224e70d45 100644 --- a/.github/workflows/build_master.yml +++ b/.github/workflows/build_master.yml @@ -50,7 +50,7 @@ jobs: # Build the mdBook - name: Build mdBook - run: MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + run: MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Cat hacktricks-preprocessor.log #- name: Cat hacktricks-preprocessor.log diff --git a/.github/workflows/translate_af.yml b/.github/workflows/translate_af.yml index da1c8d92a..b3e8894d4 100644 --- a/.github/workflows/translate_af.yml +++ b/.github/workflows/translate_af.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_de.yml b/.github/workflows/translate_de.yml index 93b3a4ad8..e8d3f16a3 100644 --- a/.github/workflows/translate_de.yml +++ b/.github/workflows/translate_de.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_el.yml b/.github/workflows/translate_el.yml index 2a97877e4..8d95ea613 100644 --- a/.github/workflows/translate_el.yml +++ b/.github/workflows/translate_el.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_es.yml b/.github/workflows/translate_es.yml index fe9a6bfc9..67a64f979 100644 --- a/.github/workflows/translate_es.yml +++ b/.github/workflows/translate_es.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_fr.yml b/.github/workflows/translate_fr.yml index 9f28308e8..83aad9ffe 100644 --- a/.github/workflows/translate_fr.yml +++ b/.github/workflows/translate_fr.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_hi.yml b/.github/workflows/translate_hi.yml index 9e567a8fa..b60d1118a 100644 --- a/.github/workflows/translate_hi.yml +++ b/.github/workflows/translate_hi.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_it.yml b/.github/workflows/translate_it.yml index 94c244feb..0bf13b8c3 100644 --- a/.github/workflows/translate_it.yml +++ b/.github/workflows/translate_it.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_ja.yml b/.github/workflows/translate_ja.yml index 25c9e96f2..1fb153d5a 100644 --- a/.github/workflows/translate_ja.yml +++ b/.github/workflows/translate_ja.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_ko.yml b/.github/workflows/translate_ko.yml index 9b42c7ecc..ef07a3e3c 100644 --- a/.github/workflows/translate_ko.yml +++ b/.github/workflows/translate_ko.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_pl.yml b/.github/workflows/translate_pl.yml index 1af70c170..3acaa273a 100644 --- a/.github/workflows/translate_pl.yml +++ b/.github/workflows/translate_pl.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_pt.yml b/.github/workflows/translate_pt.yml index 7472a35fa..189adbaab 100644 --- a/.github/workflows/translate_pt.yml +++ b/.github/workflows/translate_pt.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_sr.yml b/.github/workflows/translate_sr.yml index 5085afea5..afd6bf827 100644 --- a/.github/workflows/translate_sr.yml +++ b/.github/workflows/translate_sr.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_sw.yml b/.github/workflows/translate_sw.yml index 6f27b4876..cbc63c9eb 100644 --- a/.github/workflows/translate_sw.yml +++ b/.github/workflows/translate_sw.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_tr.yml b/.github/workflows/translate_tr.yml index 12c2972fc..bee7a1c64 100644 --- a/.github/workflows/translate_tr.yml +++ b/.github/workflows/translate_tr.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_uk.yml b/.github/workflows/translate_uk.yml index 8f1a1d9e7..46a5d55d5 100644 --- a/.github/workflows/translate_uk.yml +++ b/.github/workflows/translate_uk.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/.github/workflows/translate_zh.yml b/.github/workflows/translate_zh.yml index 725fff02e..574b61a29 100644 --- a/.github/workflows/translate_zh.yml +++ b/.github/workflows/translate_zh.yml @@ -63,7 +63,7 @@ jobs: - name: Build mdBook run: | - MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && exit 1) + MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) # Login in AWs - name: Configure AWS credentials using OIDC diff --git a/scripts/translator.py b/scripts/translator.py index 323ea7f5d..739c2183b 100644 --- a/scripts/translator.py +++ b/scripts/translator.py @@ -78,19 +78,43 @@ def cp_translation_to_repo_dir_and_check_gh_branch(branch, temp_folder, translat for file_name in filenames: src_file = os.path.join(dirpath, file_name) shutil.copy2(src_file, dest_path) - print(f"[+] Copied from {src_file} to {file_name}") + if not "/images/" in src_file: + print(f"[+] Copied from {src_file} to {file_name}") print(f"Translated files copied to branch: {branch}") if translate_files: - subprocess.run(['git', 'add', "-A"]) - subprocess.run(['git', 'commit', '-m', f"Translated {translate_files} to {branch}"[:72]]) - subprocess.run(['git', 'push', '--set-upstream', 'origin', branch]) - print("Commit created and pushed") + commit_and_push(translate_files, branch) else: print("No commiting anything, leaving in language branch") +def commit_and_push(translate_files, branch): + # Define the commands we want to run + commands = [ + ['git', 'add', '-A'], + ['git', 'commit', '-m', f"Translated {translate_files} to {branch}"[:72]], + ['git', 'push', '--set-upstream', 'origin', branch], + ] + + for cmd in commands: + result = subprocess.run(cmd, capture_output=True, text=True) + + # Print stdout and stderr (if any) + if result.stdout: + print(f"STDOUT for {cmd}:\n{result.stdout}") + if result.stderr: + print(f"STDERR for {cmd}:\n{result.stderr}") + + # Check for errors + if result.returncode != 0: + raise RuntimeError( + f"Command `{cmd}` failed with exit code {result.returncode}" + ) + + print("Commit created and pushed") + + def translate_text(language, text, file_path, model, cont=0, slpitted=False, client=None): if not text: return text diff --git a/src/pentesting-cloud/azure-security/az-enumeration-tools.md b/src/pentesting-cloud/azure-security/az-enumeration-tools.md index f7bc6d98f..06171ebad 100644 --- a/src/pentesting-cloud/azure-security/az-enumeration-tools.md +++ b/src/pentesting-cloud/azure-security/az-enumeration-tools.md @@ -149,4 +149,3 @@ The Azure Active Directory (AD) module, now **deprecated**, is part of Azure Pow Follow this link for the [**installation instructions**](https://www.powershellgallery.com/packages/AzureAD). -