Commit 7fd2b2b9 authored by robertdavidgraham's avatar robertdavidgraham
Browse files

ssl certs

parent e1109278
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>



@@ -75,10 +76,13 @@ timeouts_add(struct Timeouts *timeouts, struct TimeoutEntry *entry,
             size_t offset, uint64_t timestamp)
{
    unsigned index;
    time_t now = time(0);
    time_t time_future = (unsigned)(timestamp/16384ULL);

    /* Unlink from wherever the entry came from */
    timeout_unlink(entry);

printf("++ADD %d.%03u\n", time_future-now, (unsigned)(((timestamp%16384ULL)/16384.0)*1000.0));
    /* Initialize the new entry */    
    entry->timestamp = timestamp;
    entry->offset = (unsigned)offset;
@@ -90,6 +94,7 @@ timeouts_add(struct Timeouts *timeouts, struct TimeoutEntry *entry,
    entry->prev = &timeouts->slots[index];
    if (entry->next)
        entry->next->prev = &entry->next;
printf("++PREV=0x%llx\n", entry->prev);
}

/***************************************************************************
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ timeout_unlink(struct TimeoutEntry *entry)
    entry->next = 0;
    entry->prev = 0;
    entry->timestamp = 0;
printf("--PREV=0x%llx\n", entry->prev);
}

/***************************************************************************
+1 −1
Original line number Diff line number Diff line
@@ -1099,7 +1099,7 @@ masscan_command_line(struct Masscan *masscan, int argc, char *argv[])
            case 'd': /* just do same as verbosity level */
                {
                    int v;
                    for (v=1; argv[i][v] == 'v'; v++) {
                    for (v=1; argv[i][v] == 'd'; v++) {
                        verbosity++;
						debuglevel++;
					}
+28 −15
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
#include "proto-snmp.h"         /* parse SNMP responses */
#include "templ-port.h"

#include <assert.h>
#include <limits.h>
#include <string.h>
#include <time.h>
@@ -1163,10 +1164,22 @@ int main(int argc, char *argv[])
     * of their ranges, and when doing wide scans, add the exclude list to
     * prevent them from being scanned.
     */
    {
        uint64_t range = rangelist_count(&masscan->targets) * rangelist_count(&masscan->ports);
        uint64_t range2;
        rangelist_exclude(&masscan->targets, &masscan->exclude_ip);
        rangelist_exclude(&masscan->ports, &masscan->exclude_port);
        rangelist_remove_range2(&masscan->targets, range_parse_ipv4("224.0.0.0/4", 0, 0));

        range2 = rangelist_count(&masscan->targets) * rangelist_count(&masscan->ports);

        if (range2 != range && masscan->resume.index) {
            LOG(0, "FAIL: Attempted to add additional 'exclude' ranges after scan start.\n");
            LOG(0, "   ...This messes things up the scan randomization, so you have to restart scan\n");
            exit(1);
        }
    }



    /*
+4 −0
Original line number Diff line number Diff line
@@ -89,6 +89,10 @@ proto_string(unsigned proto)
    case PROTO_DNS_VERSIONBIND: return "dns-ver";
    case PROTO_SNMP: return "snmp";
    case PROTO_NBTSTAT: return "nbtstat";
    case PROTO_SSL3:    return "ssl";
    case PROTO_SMTP:    return "smtp";
    case PROTO_POP3:    return "pop";
    case PROTO_IMAP4:   return "imap";

    default:
        sprintf_s(tmp, sizeof(tmp), "(%u)", proto);
Loading