Commit 0c287ebf authored by robertdavidgraham's avatar robertdavidgraham
Browse files
parents bab50eb0 94c86479
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@ asynchronous transmission. The major difference is that it's faster than these
other scanners. In addition, it's more flexible, allowing arbitrary address
ranges and port ranges.

This tool is free, but consider funding it here:
1MASSCANaHUiyTtR3bJ2sLGuMw5kDBaj4T

# Building

+1 −1
Original line number Diff line number Diff line
@@ -1377,7 +1377,7 @@ int main(int argc, char *argv[])
     * Initialize those defaults that aren't zero
     */
    memset(masscan, 0, sizeof(*masscan));
    masscan->seed = time(0); /* a predictable, but 'random' seed */
    masscan->seed = get_entropy(); /* entropy for randomness */
    masscan->wait = 10; /* how long to wait for responses when done */
    masscan->max_rate = 100.0; /* max rate = hundred packets-per-second */
    masscan->nic_count = 1;
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
    (h/t Marsh Ray @marshray for this idea)

    This is a randomization/reshuffling function based on a crypto
    "Feistal network" as describ ed in the paper:
    "Feistel network" as describ ed in the paper:

    'Ciphers with Arbitrary Finite Domains'
        by John Black and Phillip Rogaway
@@ -38,7 +38,7 @@

    The cryptographic strength of this construction depends upon the
    number of rounds, and the exact nature of the inner "F()" function.
    Because it's a Feistal network, that "F()" function can be almost
    Because it's a Feistel network, that "F()" function can be almost
    anything.

    We don't care about cryptographic strength, just speed, so we are
+1 −9
Original line number Diff line number Diff line
@@ -15,19 +15,11 @@
 * NOTE: Mostly it's here to amuse cryptographers with its lulz.
 ***************************************************************************/
uint64_t
syn_get_entropy(uint64_t seed)
get_entropy(void)
{
    uint64_t entropy[2] = {0,0};
    unsigned i;

    /*
     * If we have a manual seed, use that instead
     */
    if (seed) {
        entropy[0] = seed;
        return seed;
    }

    /*
     * Gather some random bits
     */
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ syn_cookie( unsigned ip_dst, unsigned port_dst,
/**
 * Called on startup to set a secret key
 */
uint64_t syn_get_entropy(uint64_t seed);
uint64_t get_entropy(void);


#endif