mirror of
https://github.com/danielmiessler/SecLists.git
synced 2025-04-28 01:36:29 -04:00
fix(cicd): Fixed line-ending normalization on "remote-wordlists-updater.yml"
Fixes #397
This commit is contained in:
parent
026a367e37
commit
9efa493fcc
2 changed files with 29 additions and 0 deletions
21
.bin/brute-force-renormalize.sh
Normal file
21
.bin/brute-force-renormalize.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
FILE="$1"
|
||||
|
||||
if [[ -z "$FILE" ]]; then
|
||||
echo "This script renormalizes a file until its SHA256 hash stops changing, ensuring proper normalization."
|
||||
echo "Usage: $0 <file_path>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while true; do
|
||||
ORIGINAL_HASH=$(sha256sum "$FILE" | awk '{print $1}')
|
||||
|
||||
git add --renormalize "$FILE" && git add "$FILE"
|
||||
|
||||
NEW_HASH=$(sha256sum "$FILE" | awk '{print $1}')
|
||||
|
||||
if [[ "$ORIGINAL_HASH" == "$NEW_HASH" ]]; then
|
||||
break
|
||||
fi
|
||||
done
|
|
@ -17,6 +17,12 @@ jobs:
|
|||
- name: Update lists
|
||||
run: ./.bin/wordlist-updaters/updater.py
|
||||
|
||||
- name: Ensure UTF-8 encoding
|
||||
run: |
|
||||
wget https://raw.githubusercontent.com/ItsIgnacioPortal/utf8fixer/f42bfe64db0bc095e9e93a10ac6bba746f09670c/utf8fixer.py
|
||||
chmod +x utf8fixer.py
|
||||
./utf8fixer.py Discovery/Web-Content/trickest-robots-disallowed-wordlists/top-10000.txt utf8
|
||||
|
||||
- name: Commit files if changed
|
||||
run: |
|
||||
git add -N .
|
||||
|
@ -26,6 +32,8 @@ jobs:
|
|||
else
|
||||
echo "[+] Files were changed! Pushing changed..."
|
||||
git add --renormalize -A && git add -A
|
||||
chmod +x ./.bin/brute-force-renormalize.sh
|
||||
./.bin/brute-force-renormalize.sh ./Discovery/Web-Content/trickest-robots-disallowed-wordlists/top-10000.txt
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
|
|
Loading…
Add table
Reference in a new issue