Skip to content

Commit bc27441

Browse files
authored
Merge branch 'HackTricks-wiki:master' into master
2 parents dc46025 + 540bca5 commit bc27441

288 files changed

Lines changed: 7655 additions & 1610 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_master.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,21 @@ jobs:
3535
- name: Build mdBook
3636
run: MDBOOK_BOOK__LANGUAGE=en mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1)
3737

38-
- name: Update searchindex.js in repo
38+
- name: Update searchindex in repo
3939
run: |
40+
ls -la
41+
ls -la book
4042
git config --global --add safe.directory /__w/hacktricks/hacktricks
4143
git pull
4244
git config --global user.email "build@example.com"
4345
git config --global user.name "Build master"
4446
git config pull.rebase false
45-
cp book/searchindex.js searchindex.js
46-
cp book/searchindex.json searchindex.json
47-
git add searchindex.js searchindex.json
48-
git commit -m "Update searchindex"
49-
git push
47+
if [ -f "book/searchindex.js" ]; then
48+
cp book/searchindex.js searchindex.js
49+
fi
50+
(git add searchindex.js;
51+
git commit -m "Update searchindex";
52+
git push) || echo "No changes to searchindex.js"
5053
5154
# Login in AWs
5255
- name: Configure AWS credentials using OIDC
@@ -58,4 +61,4 @@ jobs:
5861
# Sync the build to S3
5962
- name: Sync to S3
6063
run: aws s3 sync ./book s3://hacktricks-wiki/en --delete
61-
64+

.github/workflows/translate_af.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ jobs:
6666
6767
- name: Build mdBook
6868
run: |
69+
git checkout "$BRANCH"
70+
git pull
6971
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)
7072
7173
- name: Update searchindex.js in repo
7274
run: |
7375
git checkout $BRANCH
7476
git pull
75-
cp book/searchindex.js searchindex.js
76-
cp book/searchindex.json searchindex.json
77-
git add searchindex.js searchindex.json
78-
git commit -m "Update searchindex for $BRANCH"
79-
git push
77+
if [ -f "book/searchindex.js" ]; then
78+
cp book/searchindex.js searchindex.js
79+
fi
80+
(git add searchindex.js;
81+
git commit -m "Update searchindex";
82+
git push) || echo "No changes to searchindex.js"
8083
8184
# Login in AWs
8285
- name: Configure AWS credentials using OIDC
@@ -87,4 +90,11 @@ jobs:
8790

8891
# Sync the build to S3
8992
- name: Sync to S3
90-
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
93+
run: |
94+
echo "Current branch:"
95+
git rev-parse --abbrev-ref HEAD
96+
echo "Syncing $BRANCH to S3"
97+
aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
98+
echo "Sync completed"
99+
echo "Cat 3 files from the book"
100+
find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat

.github/workflows/translate_de.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ jobs:
6666
6767
- name: Build mdBook
6868
run: |
69+
git checkout "$BRANCH"
70+
git pull
6971
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)
7072
7173
- name: Update searchindex.js in repo
7274
run: |
7375
git checkout $BRANCH
7476
git pull
75-
cp book/searchindex.js searchindex.js
76-
cp book/searchindex.json searchindex.json
77-
git add searchindex.js searchindex.json
78-
git commit -m "Update searchindex for $BRANCH"
79-
git push
77+
if [ -f "book/searchindex.js" ]; then
78+
cp book/searchindex.js searchindex.js
79+
fi
80+
(git add searchindex.js;
81+
git commit -m "Update searchindex";
82+
git push) || echo "No changes to searchindex.js"
8083
8184
# Login in AWs
8285
- name: Configure AWS credentials using OIDC
@@ -87,4 +90,11 @@ jobs:
8790

8891
# Sync the build to S3
8992
- name: Sync to S3
90-
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
93+
run: |
94+
echo "Current branch:"
95+
git rev-parse --abbrev-ref HEAD
96+
echo "Syncing $BRANCH to S3"
97+
aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
98+
echo "Sync completed"
99+
echo "Cat 3 files from the book"
100+
find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat

.github/workflows/translate_el.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ jobs:
6666
6767
- name: Build mdBook
6868
run: |
69+
git checkout "$BRANCH"
70+
git pull
6971
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)
7072
7173
- name: Update searchindex.js in repo
7274
run: |
7375
git checkout $BRANCH
7476
git pull
75-
cp book/searchindex.js searchindex.js
76-
cp book/searchindex.json searchindex.json
77-
git add searchindex.js searchindex.json
78-
git commit -m "Update searchindex for $BRANCH"
79-
git push
77+
if [ -f "book/searchindex.js" ]; then
78+
cp book/searchindex.js searchindex.js
79+
fi
80+
(git add searchindex.js;
81+
git commit -m "Update searchindex";
82+
git push) || echo "No changes to searchindex.js"
8083
8184
# Login in AWs
8285
- name: Configure AWS credentials using OIDC
@@ -87,4 +90,11 @@ jobs:
8790

8891
# Sync the build to S3
8992
- name: Sync to S3
90-
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
93+
run: |
94+
echo "Current branch:"
95+
git rev-parse --abbrev-ref HEAD
96+
echo "Syncing $BRANCH to S3"
97+
aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
98+
echo "Sync completed"
99+
echo "Cat 3 files from the book"
100+
find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat

.github/workflows/translate_es.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Translator to ES (Spanish)
1+
name: Translator to ES (Spachins)
22

33
on:
44
push:
@@ -53,6 +53,7 @@ jobs:
5353
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
5454
cd ..
5555
56+
5657
- name: Run translation script on changed files
5758
run: |
5859
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
@@ -65,17 +66,20 @@ jobs:
6566
6667
- name: Build mdBook
6768
run: |
69+
git checkout "$BRANCH"
70+
git pull
6871
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)
6972
7073
- name: Update searchindex.js in repo
7174
run: |
7275
git checkout $BRANCH
7376
git pull
74-
cp book/searchindex.js searchindex.js
75-
cp book/searchindex.json searchindex.json
76-
git add searchindex.js searchindex.json
77-
git commit -m "Update searchindex for $BRANCH"
78-
git push
77+
if [ -f "book/searchindex.js" ]; then
78+
cp book/searchindex.js searchindex.js
79+
fi
80+
(git add searchindex.js;
81+
git commit -m "Update searchindex";
82+
git push) || echo "No changes to searchindex.js"
7983
8084
# Login in AWs
8185
- name: Configure AWS credentials using OIDC
@@ -86,4 +90,11 @@ jobs:
8690

8791
# Sync the build to S3
8892
- name: Sync to S3
89-
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
93+
run: |
94+
echo "Current branch:"
95+
git rev-parse --abbrev-ref HEAD
96+
echo "Syncing $BRANCH to S3"
97+
aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
98+
echo "Sync completed"
99+
echo "Cat 3 files from the book"
100+
find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat

.github/workflows/translate_fr.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ jobs:
6666
6767
- name: Build mdBook
6868
run: |
69+
git checkout "$BRANCH"
70+
git pull
6971
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)
7072
7173
- name: Update searchindex.js in repo
7274
run: |
7375
git checkout $BRANCH
7476
git pull
75-
cp book/searchindex.js searchindex.js
76-
cp book/searchindex.json searchindex.json
77-
git add searchindex.js searchindex.json
78-
git commit -m "Update searchindex for $BRANCH"
79-
git push
77+
if [ -f "book/searchindex.js" ]; then
78+
cp book/searchindex.js searchindex.js
79+
fi
80+
(git add searchindex.js;
81+
git commit -m "Update searchindex";
82+
git push) || echo "No changes to searchindex.js"
8083
8184
# Login in AWs
8285
- name: Configure AWS credentials using OIDC
@@ -87,4 +90,11 @@ jobs:
8790

8891
# Sync the build to S3
8992
- name: Sync to S3
90-
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
93+
run: |
94+
echo "Current branch:"
95+
git rev-parse --abbrev-ref HEAD
96+
echo "Syncing $BRANCH to S3"
97+
aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
98+
echo "Sync completed"
99+
echo "Cat 3 files from the book"
100+
find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat

.github/workflows/translate_hi.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ jobs:
6666
6767
- name: Build mdBook
6868
run: |
69+
git checkout "$BRANCH"
70+
git pull
6971
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)
7072
7173
- name: Update searchindex.js in repo
7274
run: |
7375
git checkout $BRANCH
7476
git pull
75-
cp book/searchindex.js searchindex.js
76-
cp book/searchindex.json searchindex.json
77-
git add searchindex.js searchindex.json
78-
git commit -m "Update searchindex for $BRANCH"
79-
git push
77+
if [ -f "book/searchindex.js" ]; then
78+
cp book/searchindex.js searchindex.js
79+
fi
80+
(git add searchindex.js;
81+
git commit -m "Update searchindex";
82+
git push) || echo "No changes to searchindex.js"
8083
8184
# Login in AWs
8285
- name: Configure AWS credentials using OIDC
@@ -87,4 +90,11 @@ jobs:
8790

8891
# Sync the build to S3
8992
- name: Sync to S3
90-
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
93+
run: |
94+
echo "Current branch:"
95+
git rev-parse --abbrev-ref HEAD
96+
echo "Syncing $BRANCH to S3"
97+
aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
98+
echo "Sync completed"
99+
echo "Cat 3 files from the book"
100+
find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat

.github/workflows/translate_it.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ jobs:
6666
6767
- name: Build mdBook
6868
run: |
69+
git checkout "$BRANCH"
70+
git pull
6971
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)
7072
7173
- name: Update searchindex.js in repo
7274
run: |
7375
git checkout $BRANCH
7476
git pull
75-
cp book/searchindex.js searchindex.js
76-
cp book/searchindex.json searchindex.json
77-
git add searchindex.js searchindex.json
78-
git commit -m "Update searchindex for $BRANCH"
79-
git push
77+
if [ -f "book/searchindex.js" ]; then
78+
cp book/searchindex.js searchindex.js
79+
fi
80+
(git add searchindex.js;
81+
git commit -m "Update searchindex";
82+
git push) || echo "No changes to searchindex.js"
8083
8184
# Login in AWs
8285
- name: Configure AWS credentials using OIDC
@@ -87,4 +90,11 @@ jobs:
8790

8891
# Sync the build to S3
8992
- name: Sync to S3
90-
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
93+
run: |
94+
echo "Current branch:"
95+
git rev-parse --abbrev-ref HEAD
96+
echo "Syncing $BRANCH to S3"
97+
aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
98+
echo "Sync completed"
99+
echo "Cat 3 files from the book"
100+
find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat

.github/workflows/translate_ja.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ jobs:
6666
6767
- name: Build mdBook
6868
run: |
69+
git checkout "$BRANCH"
70+
git pull
6971
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)
7072
7173
- name: Update searchindex.js in repo
7274
run: |
7375
git checkout $BRANCH
7476
git pull
75-
cp book/searchindex.js searchindex.js
76-
cp book/searchindex.json searchindex.json
77-
git add searchindex.js searchindex.json
78-
git commit -m "Update searchindex for $BRANCH"
79-
git push
77+
if [ -f "book/searchindex.js" ]; then
78+
cp book/searchindex.js searchindex.js
79+
fi
80+
(git add searchindex.js;
81+
git commit -m "Update searchindex";
82+
git push) || echo "No changes to searchindex.js"
8083
8184
# Login in AWs
8285
- name: Configure AWS credentials using OIDC
@@ -87,4 +90,11 @@ jobs:
8790

8891
# Sync the build to S3
8992
- name: Sync to S3
90-
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
93+
run: |
94+
echo "Current branch:"
95+
git rev-parse --abbrev-ref HEAD
96+
echo "Syncing $BRANCH to S3"
97+
aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
98+
echo "Sync completed"
99+
echo "Cat 3 files from the book"
100+
find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat

.github/workflows/translate_ko.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ jobs:
6666
6767
- name: Build mdBook
6868
run: |
69+
git checkout "$BRANCH"
70+
git pull
6971
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)
7072
7173
- name: Update searchindex.js in repo
7274
run: |
7375
git checkout $BRANCH
7476
git pull
75-
cp book/searchindex.js searchindex.js
76-
cp book/searchindex.json searchindex.json
77-
git add searchindex.js searchindex.json
78-
git commit -m "Update searchindex for $BRANCH"
79-
git push
77+
if [ -f "book/searchindex.js" ]; then
78+
cp book/searchindex.js searchindex.js
79+
fi
80+
(git add searchindex.js;
81+
git commit -m "Update searchindex";
82+
git push) || echo "No changes to searchindex.js"
8083
8184
# Login in AWs
8285
- name: Configure AWS credentials using OIDC
@@ -87,4 +90,11 @@ jobs:
8790

8891
# Sync the build to S3
8992
- name: Sync to S3
90-
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
93+
run: |
94+
echo "Current branch:"
95+
git rev-parse --abbrev-ref HEAD
96+
echo "Syncing $BRANCH to S3"
97+
aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
98+
echo "Sync completed"
99+
echo "Cat 3 files from the book"
100+
find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat

0 commit comments

Comments
 (0)