Search:

Type: Posts; User: breimer273

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,752

    That would be valid yes. If you are unsure you...

    That would be valid yes. If you are unsure you can use valgrind to see if you are infact leaking memory. In this case, you are not.
  2. To avoid this problem I ALWAYS use braces. Even...

    To avoid this problem I ALWAYS use braces. Even if the loop or if statement only applies to one line. It makes it more clear to the next person who is going to look at my code what I mean, and then...
  3. Replies
    12
    Views
    2,978

    Just wanted to let everyone know that I think I...

    Just wanted to let everyone know that I think I have fixed the issue. I ended up using the socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)) call. I was worried that the header(s) would be different, not...
  4. Replies
    12
    Views
    2,978

    Well, A pretty standard getting started place is...

    Well, A pretty standard getting started place is Beej's guide:
    Beej's Guide to Network Programming

    It's been a while since I looked at that guide, I also reference a systems programming book and...
  5. Replies
    12
    Views
    2,978

    So, just to see I went ahead and changed my...

    So, just to see I went ahead and changed my socket call to this. Now my header information is not correct so I am not sure if it is working like it should but I am seeing a lot more packets, seems to...
  6. Replies
    12
    Views
    2,978

    Yes, I am attempting to do that with the...

    Yes, I am attempting to do that with the following calls:


    struct ifreq ifr;
    strncpy(ifr.ifr_name, interface, strlen(interface) + 1);
    if((ioctl(sock, SIOCGIFFLAGS, &ifr) == -1)) {
    /*Could...
  7. Replies
    12
    Views
    2,978

    Another thought, would it make a difference how...

    Another thought, would it make a difference how the different machines are on the network, say if they are both wireless or both switched or a combo of the two? My thoughts would be that if the...
  8. Replies
    12
    Views
    2,978

    OK, for the purposes of this excersize I changed...

    OK, for the purposes of this excersize I changed the socket call to:


    socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);

    Makes it easier to test but should still have the same effect.
    Ok and here is my...
  9. Replies
    12
    Views
    2,978

    Yes sorry, I am working in Linux. My...

    Yes sorry, I am working in Linux.

    My understanding of the difference between:


    socket(AF_INET, SOCK_RAW, IPPROTO_TCP);

    and
  10. Replies
    12
    Views
    2,978

    Packet Sniffer

    Hey guys, I have been looking at the following guide:
    http://dl.packetstormsecurity.net/sniffers/Sniffer2.txt
    This is the second part of a two part guide talking about making a packet sniffer. So...
  11. Thread: Linked List

    by breimer273
    Replies
    20
    Views
    1,747

    To answer your first question, sure it looks...

    To answer your first question, sure it looks alright the lack of indents and/or comments makes it a little difficult to read. It's always a good practice to use "safe" functions. So use fgets instead...
  12. Replies
    5
    Views
    908

    Certainly there is a way to do this. As mentioned...

    Certainly there is a way to do this. As mentioned previously '\0' is the null terminating character that you should use to end EVER c-string. You can do this one of two ways. Either you can simply...
  13. Replies
    8
    Views
    1,404

    Somebody correct me if I am wrong but in my...

    Somebody correct me if I am wrong but in my experience I have never seen a specific "standard" or custom when it comes to filenaming and filesystem structure. I think it is up to the project...
  14. Replies
    4
    Views
    1,162

    A little more information about what is going...

    A little more information about what is going wrong would help to debug the program. I agree with adding "else", not really needed but will save a little bit of computation time.
  15. I just started looking at this code and I will...

    I just started looking at this code and I will post somethings that I see. First I noticed this:


    int **array = (int**)malloc(sizeof(int *) * 10);
    for(i = 0; i < 10; i++){
    array[i] =...
  16. Replies
    3
    Views
    4,257

    Wow.... THANKS!! I love and hate how its the...

    Wow.... THANKS!! I love and hate how its the mistakes like these that keep me up at night.
  17. Replies
    3
    Views
    4,257

    OK, I looked at the documentation again. The...

    OK, I looked at the documentation again. The first call I have to GetTokenInformation() will always fail because of the arguments that I am passing in. Every function call up to that point I know is...
  18. exit can't be a variable name since it is similar...

    exit can't be a variable name since it is similar to return.
  19. Replies
    40
    Views
    3,279

    the scanf warning just means that scanf is an...

    the scanf warning just means that scanf is an unsafe function (meaning that someone could exploit it using buffer overflow or something like that). In your case it probably wont matter which one you...
  20. Replies
    3
    Views
    4,257

    GetTokenInformation

    Hi, hopefully somebody here can help me with this question. I am trying to build a client/server program where the client asks the server to serve a file. Its really a lab assignment where we are...
  21. Replies
    7
    Views
    1,210

    How can I regenerate the makefile?

    How can I regenerate the makefile?
  22. In my experience, using gcc, a statement like ...

    In my experience, using gcc, a statement like


    char *p = "this is a string";

    was always acceptable. Trying to do anything with this string, however, is nearly impossible and I can't think of...
  23. Replies
    7
    Views
    1,210

    Yes, I do mean "use" instead of "implement" sorry...

    Yes, I do mean "use" instead of "implement" sorry for the clerical error. asn_DEF_Certificate is defined in the Certificate.c file. Here is the definition:


    asn_TYPE_descriptor_t...
  24. Replies
    7
    Views
    1,210

    /opt/local/lib/snort_dynamicpreprocessor/libsf_smt...

    /opt/local/lib/snort_dynamicpreprocessor/libsf_smtp_preproc.so does exist on my machine. The asn_DEF_Certificate function is a function that should be created using the asn1c compiler. I already...
  25. Replies
    7
    Views
    1,210

    Makefile help...I think

    Although the problem I am getting is a result of running snort I do not think my problem is snort specific so I am going to go ahead an ask it. First of for a reference point, when executing snort...
Results 1 to 25 of 28
Page 1 of 2 1 2