Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.57 KB | None | 0 0
  1. Compiling the source code....
  2. $g++ -std=c++11 main.cpp -o demo -lm -pthread -lgmpxx -lgmp -lreadline 2>&1
  3. main.cpp: In function �int make_socket(char*, char*)�:
  4. main.cpp:2:25: error: aggregate �make_socket(char*, char*)::addrinfo hints� has incomplete type and cannot be defined
  5. struct addrinfo hints, *servinfo, *p;
  6. ^
  7. main.cpp:5:40: error: �memset� was not declared in this scope
  8. memset(&hints, 0, sizeof(hints));
  9. ^
  10. main.cpp:6:27: error: �AF_UNSPEC� was not declared in this scope
  11. hints.ai_family = AF_UNSPEC;
  12. ^
  13. main.cpp:7:29: error: �SOCK_STREAM� was not declared in this scope
  14. hints.ai_socktype = SOCK_STREAM;
  15. ^
  16. main.cpp:8:56: error: �getaddrinfo� was not declared in this scope
  17. if((r=getaddrinfo(host, port, &hints, &servinfo))!=0) {
  18. ^
  19. main.cpp:9:25: error: �stderr� was not declared in this scope
  20. fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(r));
  21. ^
  22. main.cpp:9:68: error: �gai_strerror� was not declared in this scope
  23. fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(r));
  24. ^
  25. main.cpp:9:69: error: �fprintf� was not declared in this scope
  26. fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(r));
  27. ^
  28. main.cpp:10:23: error: �exit� was not declared in this scope
  29. exit(0);
  30. ^
  31. main.cpp:12:32: error: �NULL� was not declared in this scope
  32. for(p = servinfo; p != NULL; p = p->ai_next) {
  33. ^
  34. main.cpp:12:43: error: invalid use of incomplete type �struct make_socket(char*, char*)::addrinfo�
  35. for(p = servinfo; p != NULL; p = p->ai_next) {
  36. ^
  37. main.cpp:2:16: error: forward declaration of �struct make_socket(char*, char*)::addrinfo�
  38. struct addrinfo hints, *servinfo, *p;
  39. ^
  40. main.cpp:13:36: error: invalid use of incomplete type �struct make_socket(char*, char*)::addrinfo�
  41. if((sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) {
  42. ^
  43. main.cpp:2:16: error: forward declaration of �struct make_socket(char*, char*)::addrinfo�
  44. struct addrinfo hints, *servinfo, *p;
  45. ^
  46. main.cpp:13:50: error: invalid use of incomplete type �struct make_socket(char*, char*)::addrinfo�
  47. if((sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) {
  48. ^
  49. main.cpp:2:16: error: forward declaration of �struct make_socket(char*, char*)::addrinfo�
  50. struct addrinfo hints, *servinfo, *p;
  51. ^
  52. main.cpp:13:66: error: invalid use of incomplete type �struct make_socket(char*, char*)::addrinfo�
  53. if((sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) {
  54. ^
  55. main.cpp:2:16: error: forward declaration of �struct make_socket(char*, char*)::addrinfo�
  56. struct addrinfo hints, *servinfo, *p;
  57. ^
  58. main.cpp:13:79: error: �socket� was not declared in this scope
  59. if((sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) {
  60. ^
  61. main.cpp:16:35: error: invalid use of incomplete type �struct make_socket(char*, char*)::addrinfo�
  62. if(connect(sock, p->ai_addr, p->ai_addrlen)==-1) {
  63. ^
  64. main.cpp:2:16: error: forward declaration of �struct make_socket(char*, char*)::addrinfo�
  65. struct addrinfo hints, *servinfo, *p;
  66. ^
  67. main.cpp:16:47: error: invalid use of incomplete type �struct make_socket(char*, char*)::addrinfo�
  68. if(connect(sock, p->ai_addr, p->ai_addrlen)==-1) {
  69. ^
  70. main.cpp:2:16: error: forward declaration of �struct make_socket(char*, char*)::addrinfo�
  71. struct addrinfo hints, *servinfo, *p;
  72. ^
  73. main.cpp:16:59: error: �connect� was not declared in this scope
  74. if(connect(sock, p->ai_addr, p->ai_addrlen)==-1) {
  75. ^
  76. main.cpp:17:35: error: �close� was not declared in this scope
  77. close(sock);
  78. ^
  79. main.cpp:22:17: error: �NULL� was not declared in this scope
  80. if(p == NULL) {
  81. ^
  82. main.cpp:24:46: error: �freeaddrinfo� was not declared in this scope
  83. freeaddrinfo(servinfo);
  84. ^
  85. main.cpp:25:25: error: �stderr� was not declared in this scope
  86. fprintf(stderr, "No connection could be made\n");
  87. ^
  88. main.cpp:25:64: error: �fprintf� was not declared in this scope
  89. fprintf(stderr, "No connection could be made\n");
  90. ^
  91. main.cpp:26:23: error: �exit� was not declared in this scope
  92. exit(0);
  93. ^
  94. main.cpp:29:38: error: �freeaddrinfo� was not declared in this scope
  95. freeaddrinfo(servinfo);
  96. ^
  97. main.cpp:30:17: error: �stderr� was not declared in this scope
  98. fprintf(stderr, "[Connected -> %s:%s]\n", host, port);
  99. ^
  100. main.cpp:30:61: error: �fprintf� was not declared in this scope
  101. fprintf(stderr, "[Connected -> %s:%s]\n", host, port);
  102. ^
  103. main.cpp: In function �void attack(char*, char*, int)�:
  104. main.cpp:46:16: error: �SIGPIPE� was not declared in this scope
  105. signal(SIGPIPE, &broke);
  106. ^
  107. main.cpp:46:31: error: �signal� was not declared in this scope
  108. signal(SIGPIPE, &broke);
  109. ^
  110. main.cpp:51:52: error: �write� was not declared in this scope
  111. r=write(sockets[x], "\0", 1);
  112. ^
  113. main.cpp:53:49: error: �close� was not declared in this scope
  114. close(sockets[x]);
  115. ^
  116. main.cpp:57:33: error: �stderr� was not declared in this scope
  117. fprintf(stderr, "[%i: Voly Sent]\n", id);
  118. ^
  119. main.cpp:57:64: error: �fprintf� was not declared in this scope
  120. fprintf(stderr, "[%i: Voly Sent]\n", id);
  121. ^
  122. main.cpp:59:25: error: �stderr� was not declared in this scope
  123. fprintf(stderr, "[%i: Voly Sent]\n", id);
  124. ^
  125. main.cpp:59:56: error: �fprintf� was not declared in this scope
  126. fprintf(stderr, "[%i: Voly Sent]\n", id);
  127. ^
  128. main.cpp:60:30: error: �usleep� was not declared in this scope
  129. usleep(300000);
  130. ^
  131. main.cpp: In function �void cycle_identity()�:
  132. main.cpp:66:53: warning: deprecated conversion from string constant to �char*� [-Wwrite-strings]
  133. int socket = make_socket("localhost", "9050");
  134. ^
  135. main.cpp:66:53: warning: deprecated conversion from string constant to �char*� [-Wwrite-strings]
  136. main.cpp:67:48: error: �write� was not declared in this scope
  137. write(socket, "AUTHENTICATE \"\"\n", 16);
  138. ^
  139. main.cpp:70:25: error: �stderr� was not declared in this scope
  140. fprintf(stderr, "[%i: cycle_identity -> signal NEWNYM\n", r);
  141. ^
  142. main.cpp:70:76: error: �fprintf� was not declared in this scope
  143. fprintf(stderr, "[%i: cycle_identity -> signal NEWNYM\n", r);
  144. ^
  145. main.cpp:71:30: error: �usleep� was not declared in this scope
  146. usleep(300000);
  147. ^
  148. main.cpp: In function �int main(int, char**)�:
  149. main.cpp:80:25: error: �fork� was not declared in this scope
  150. if(fork())
  151. ^
  152. main.cpp:82:30: error: �usleep� was not declared in this scope
  153. usleep(200000);
  154. ^
  155. main.cpp:84:14: error: �stdin� was not declared in this scope
  156. getc(stdin);
  157. ^
  158. main.cpp:84:19: error: �getc� was not declared in this scope
  159. getc(stdin);
  160. ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement