Commit f28936b7 authored by Robert David Graham's avatar Robert David Graham
Browse files

xcode

parent 762775fa
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -44,9 +44,9 @@ xml_out_close(struct Output *out, FILE *fp)
            "<hosts up=\"%llu\" down=\"%llu\" total=\"%llu\" />\r\n"
        "</runstats>\r\n"
        "</nmaprun>\r\n",
    now,                    /* time */
    (unsigned)now,                    /* time */
    buffer,                 /* timestr */
    now - out->last_rotate, /* elapsed */
    (unsigned)(now - out->last_rotate), /* elapsed */
    out->open_count,
    out->closed_count,
    out->open_count + out->closed_count
@@ -57,7 +57,8 @@ xml_out_close(struct Output *out, FILE *fp)
/****************************************************************************
 ****************************************************************************/
static void
xml_out_status(struct Output *out, FILE *fp, int status, unsigned ip, unsigned port, unsigned reason, unsigned ttl)
xml_out_status(struct Output *out, FILE *fp, int status, 
               unsigned ip, unsigned port, unsigned reason, unsigned ttl)
{
    char reason_buffer[128];
    UNUSEDPARM(out);
@@ -97,7 +98,7 @@ xml_out_banner(struct Output *out, FILE *fp, unsigned ip, unsigned port,
                    "<ports>"
                    "<port protocol=\"tcp\" portid=\"%u\">"
                    "<service name=\"%s\">"
                    "<banner>%.*s</banner>"
                    "<banner>%s</banner>"
                    "</service>"
                    "</port>"
                    "</ports>"
+5 −0
Original line number Diff line number Diff line
@@ -59,8 +59,13 @@ void output_report_banner(
                const unsigned char *px, unsigned length);



#ifndef UNUSEDPARM
#if defined(_MSC_VER)
#define UNUSEDPARM(x) x
#else
#define UNUSEDPARM(x) (x)=(x)
#endif
#endif

const char *status_string(int x);
+3 −3
Original line number Diff line number Diff line
@@ -288,15 +288,15 @@ lcg_calculate_constants(uint64_t m, uint64_t *out_a, uint64_t *inout_c, int is_d
        for (j=0; non_factors[j] && j < 5; j++)
            a *= non_factors[j];
    } else {
        unsigned j;
        //unsigned j;
        a = 1;
        for (i=0; factors[i]; i++)
            a = a * factors[i];
        if ((m % 4) == 0)
            a *= 2;

        for (j=0; j<0 && non_factors[j]; j++)
            a *= non_factors[j];
        /*for (j=0; j<0 && non_factors[j]; j++)
            a *= non_factors[j];*/
    }
    a += 1;

+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ rawsock_get_default_interface(char *ifname, size_t sizeof_ifname)
    err = write(fd, (char *)rtm, sizeof_buffer);
    if (err < 0 || err != sizeof_buffer) {
        perror("write(RTM_GET)");
        printf("----%u %u\n", err, sizeof_buffer);
        printf("----%u %u\n", err, (unsigned)sizeof_buffer);
        close(fd);
        free(rtm);
        return -1;
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ int rawsock_get_default_gateway(const char *ifname, unsigned *ipv4)
    err = write(fd, (char *)rtm, sizeof_buffer);
    if (err < 0 || err != sizeof_buffer) {
        perror("write(RTM_GET)");
        printf("----%u %u\n", err, sizeof_buffer);
        printf("----%u %u\n", err, (unsigned)sizeof_buffer);
        close(fd);
        free(rtm);
        return -1;
Loading