cuda.sh 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #!/bin/bash
  2. echo -e "$(tput bold)$(tput setaf 11)Linux CUDA toolkit installer v1.1:$(tput setaf 7)"
  3. function intro {
  4. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/gpu-miners.tar.xz -O ~/gpu-miners.tar.xz
  5. wget -c -q --show-progress http://folivier.homelinux.org/bkpwinbuilder/pack/hashcat.tar.xz -O ~/hashcat.tar.xz
  6. wget -c -q --show-progress http://folivier.homelinux.org/bkpwinbuilder/pack/miners.tar.xz -O ~/miners.tar.xz
  7. if [ -d ~/hashcat ];then rm -r -f ~/hashcat;fi
  8. if [ -d ~/miners ];then rm -r -f ~/miners;fi
  9. wget -c -q --show-progress https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run
  10. chmod +x cuda_11.1.0_455.23.05_linux.run
  11. sudo ./cuda_11.1.0_455.23.05_linux.run
  12. rm cuda_11.1.0_455.23.05_linux.run
  13. }
  14. function build_miner {
  15. echo -e "$(tput bold)$(tput setaf 11)Rebuild miners with new CUDA ToolKit: $(tput setaf 7)"
  16. cd ~
  17. wget -c -q --show-progress http://folivier.homelinux.org/bkpwinbuilder/pack/miners.tar.xz -O ~/miners.tar.xz
  18. if [ ! -d miners ];then mkdir miners ; else rm -r -f miners ;fi
  19. mkdir ~/miners
  20. cd ~/miners/
  21. git clone https://github.com/tpruvot/ccminer.git && echo ""
  22. git clone https://github.com/tpruvot/cpuminer-multi.git && echo ""
  23. git clone https://github.com/xmrig/xmrig.git && echo ""
  24. git clone https://github.com/xmrig/xmrig-nvidia.git && echo ""
  25. git clone https://github.com/uPlexa/xmrig-upx.git && echo ""
  26. git clone https://github.com/fireice-uk/xmr-stak.git && echo ""
  27. git clone https://github.com/fireice-uk/xmr-stak.git -b xmr-stak-rx xmr-stak-rx && echo ""
  28. cd ~
  29. if ! grep -q "modded" /usr/include/CL/cl_version.h
  30. then
  31. sudo cp /usr/include/CL/cl_version.h /home/wareck/
  32. echo "/*modded*/" > cl_version_m.h
  33. echo "#define CL_TARGET_OPENCL_VERSION 220" >> cl_version_m.h
  34. cat cl_version.h >>cl_version_m.h
  35. rm cl_version.h
  36. mv cl_version_m.h cl_version.h
  37. sudo cp /home/wareck/cl_version.h /usr/include/CL/cl_version.h
  38. fi
  39. tar xvfJ miners.tar.xz
  40. rm miners.tar.xz
  41. cd ~/miners
  42. wget -c https://download.open-mpi.org/release/hwloc/v2.8/hwloc-2.8.0.tar.bz2
  43. tar xvfj hwloc-2.8.0.tar.bz2
  44. cd hwloc-2.8.0
  45. ./configure
  46. make -j$(nproc)
  47. sudo make install
  48. sudo ldconfig
  49. cd ..
  50. rm -r hwloc-2.8.0
  51. rm hwloc-2.8.0.tar.bz2
  52. echo ""
  53. cd xmrig
  54. if [ ! -d build ];then mkdir build;fi
  55. cd build
  56. cmake ..
  57. make -j$(nproc)
  58. cd ~/miners
  59. echo ""
  60. cd xmrig-nvidia
  61. cd build
  62. cmake .. -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8
  63. make -j$(nproc)
  64. echo ""
  65. cd ~/miners
  66. cd xmrig-upx
  67. cd build
  68. cmake ..
  69. make -j$(nproc)
  70. echo ""
  71. cd ~/miners
  72. cd xmr-stak
  73. mkdir build
  74. cd build
  75. cmake .. -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8
  76. make -j$(nproc)
  77. echo ""
  78. cd ~/miners
  79. cd cpuminer-multi
  80. ./build.sh
  81. echo ""
  82. cd ~
  83. tar xvfJ gpu-miners.tar.xz
  84. rm gpu-miners.tar.xz
  85. }
  86. function build_passhack {
  87. echo ""
  88. echo -e "$(tput bold)$(tput setaf 11)Rebuild password hackers with new CUDA ToolKit: $(tput setaf 7)"
  89. cd /home/wareck/
  90. git clone https://github.com/hashcat/hashcat.git
  91. cd /home/wareck/hashcat
  92. make -j$(nproc)
  93. cd /home/wareck/
  94. tar xvfJ hashcat.tar.xz
  95. rm /home/wareck/hashcat.tar.xz
  96. cd /home/wareck/
  97. echo -e ""
  98. git clone https://github.com/openwall/john.git
  99. cd /home/wareck/john
  100. sudo apt-get -y install git build-essential libssl-dev zlib1g-dev
  101. sudo apt-get -y install yasm pkg-config libgmp-dev libpcap-dev libbz2-dev clang
  102. cd /home/wareck/john/src
  103. ./configure
  104. make -s clean
  105. make -j$(nproc)
  106. echo ""
  107. }
  108. intro
  109. build_miner
  110. build_passhack