Initial commit
This commit is contained in:
19
scripts/build.bat
Normal file
19
scripts/build.bat
Normal file
@@ -0,0 +1,19 @@
|
||||
@echo off
|
||||
setlocal EnableExtensions
|
||||
chcp 65001 >nul
|
||||
|
||||
set "ROOT=%~dp0.."
|
||||
set "DOCKER_BUILDKIT=1"
|
||||
|
||||
echo.
|
||||
echo Building custom/tower:1 ...
|
||||
docker build -t custom/tower:1 "%ROOT%"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
echo.
|
||||
echo Done. Restart AdminTower in Alvand-P:
|
||||
echo docker compose up -d --force-recreate AdminTower
|
||||
echo.
|
||||
|
||||
endlocal
|
||||
exit /b 0
|
||||
21
scripts/decode-js.bat
Normal file
21
scripts/decode-js.bat
Normal file
@@ -0,0 +1,21 @@
|
||||
@echo off
|
||||
setlocal EnableExtensions
|
||||
chcp 65001 >nul
|
||||
|
||||
set "JS=%~dp0..\app\static\js"
|
||||
cd /d "%JS%"
|
||||
|
||||
if not exist original mkdir original
|
||||
copy /Y *.js original\ >nul 2>&1
|
||||
|
||||
echo Beautifying JS files...
|
||||
call npx --yes js-beautify@1.15.1 --type js --indent-size 2 --wrap-line-length 120 "2.6eb46a21.chunk.js" -o "2.6eb46a21.chunk.js"
|
||||
call npx --yes js-beautify@1.15.1 --type js --indent-size 2 --wrap-line-length 120 "main.cc26925e.chunk.js" -o "main.cc26925e.chunk.js"
|
||||
call npx --yes js-beautify@1.15.1 --type js --indent-size 2 --wrap-line-length 120 "runtime~main.ce51eff0.js" -o "runtime~main.ce51eff0.js"
|
||||
|
||||
echo.
|
||||
echo Done. Minified backups: app\static\js\original\
|
||||
echo.
|
||||
|
||||
endlocal
|
||||
exit /b 0
|
||||
19
scripts/decode-js.sh
Normal file
19
scripts/decode-js.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
npm install -g js-beautify webcrack
|
||||
|
||||
mkdir -p original decoded
|
||||
cp *.js original/
|
||||
|
||||
for f in *.js; do
|
||||
echo "beautify $f"
|
||||
js-beautify --type js --indent-size 2 --wrap-line-length 120 "$f" -o "$f"
|
||||
done
|
||||
|
||||
for f in *.js; do
|
||||
name="${f%.js}"
|
||||
echo "webcrack $f"
|
||||
webcrack "$f" -o "decoded/$name" || echo "webcrack skipped $f"
|
||||
done
|
||||
|
||||
echo DONE
|
||||
wc -l *.js original/*.js
|
||||
Reference in New Issue
Block a user