Skip to content

Commit

Permalink
snmp
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdavidgraham committed Sep 18, 2013
1 parent 236f8e0 commit f7dd227
Show file tree
Hide file tree
Showing 9 changed files with 615 additions and 10 deletions.
10 changes: 10 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "pixie-timer.h" /* portable time functions */
#include "pixie-threads.h" /* portable threads */
#include "templ-payloads.h" /* UDP packet payloads */
#include "proto-snmp.h" /* parse SNMP responses */

#include <limits.h>
#include <string.h>
Expand Down Expand Up @@ -545,6 +546,11 @@ receive_thread(void *v)
if (parms->adapter_ip != ip_me)
continue;

/* if '--packet-trace' nmap option is sent, print decode to
* command-line */
if (parms->masscan->nmap.packet_trace) {
packet_trace(stdout, px, length, 0);
}

/*
* Handle non-TCP protocols
Expand Down Expand Up @@ -1081,6 +1087,9 @@ int main(int argc, char *argv[])
* for Windows and PF_RING. */
rawsock_init();

/* Init some protocol parser data structures */
snmp_init();

/* Set randomization seed for SYN-cookies */
syn_set_entropy(masscan->seed);

Expand Down Expand Up @@ -1134,6 +1143,7 @@ int main(int argc, char *argv[])
*/
{
int x = 0;
x += snmp_selftest();
x += payloads_selftest();
x += blackrock_selftest();
x += rawsock_selftest();
Expand Down
1 change: 1 addition & 0 deletions src/proto-banner1.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ enum {
PROTO_FTP1,
PROTO_FTP2,
PROTO_DNS_VERSIONBIND,
PROTO_SNMP,
};

struct Banner1
Expand Down
Loading

0 comments on commit f7dd227

Please sign in to comment.