File: netenum.c

package info (click to toggle)
irpas 0.10-6
  • links: PTS, VCS
  • area: non-free
  • in suites: stretch
  • size: 840 kB
  • ctags: 2,146
  • sloc: ansic: 16,695; makefile: 195
file content (25 lines) | stat: -rw-r--r-- 531 bytes parent folder | download | duplicates (6)
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;
}