File: netenum.c

package info (click to toggle)
irpas 0.10-4.1
  • links: PTS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 412 kB
  • ctags: 973
  • sloc: ansic: 7,385; makefile: 145
file content (25 lines) | stat: -rw-r--r-- 531 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdio.h>
#include <stdlib.h>
#include "enum.h"

int main(int argc,char **argv) {
    int		n=0;

    if (argc>1) {
	if ((n=enumerate(argv[1],
			argc>2?atoi(argv[2]):0,
			argc>3?atoi(argv[3]):0))<0) {
	    printf("error in enumerate\n");
	} else {
	    if ((argc>3)&&(atoi(argv[3])>0)) printf("%d targets found\n",n);
	    enum_print();
	}
    } else {
	fprintf(stderr,"Netenum\n%s <destination> [timeout] [verbosity]\n"
		"if timeout is >0, pings are used to enum\n",
		argv[0]);
    }

    enum_free();
    return n;
}