Skip to content

Commit f7ddf4e

Browse files
authored
packaging changes - version fix, make install, manpage (#28)
* packaging changes - version fix, make install, manpage * preserve timestamps Sorry I forgot the option -p to preserve the timestamps
1 parent 405c9a3 commit f7ddf4e

File tree

3 files changed

+82
-2
lines changed

3 files changed

+82
-2
lines changed

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
CC ?= gcc
2+
DESTDIR ?= /
3+
prefix ?= /usr
4+
exec_prefix ?= $(prefix)
5+
bindir ?= $(exec_prefix)/bin
6+
datarootdir ?= $(prefix)/share
7+
datadir ?= $(datarootdir)
8+
mandir ?= $(datarootdir)/man
9+
man1dir ?= $(mandir)/man1
10+
111
onesixtyone: onesixtyone.c
212
$(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o onesixtyone onesixtyone.c
313

@@ -7,4 +17,10 @@ solaris: onesixtyone.c
717
clean:
818
rm -rf onesixtyone
919

20+
install:
21+
install -p -D onesixtyone $(DESTDIR)$(bindir)/onesixtyone
22+
install -p -D -m 0644 dict.txt $(DESTDIR)$(datadir)/onesixtyone/dict.txt
23+
install -p -m 0644 -D onesixtyone.1 $(DESTDIR)$(man1dir)/onesixtyone.1
24+
25+
1026
.PHONY: solaris clean

onesixtyone.1

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.TH ONESIXTYONE
2+
.SH NAME
3+
onesixtyone \- efficient SNMP scanner
4+
.SH SYNOPSIS
5+
onesixtyone [options] <host> <community>
6+
.SH DESCRIPTION
7+
onesixtyone is an SNMP scanner which utilizes a sweep technique to achieve very
8+
high performance. It can scan an entire class B network in under 13 minutes.
9+
It can be used to discover devices responding to well-known community names
10+
or to mount a dictionary attack against one or more SNMP devices.
11+
12+
onesixtyone takes a different approach to SNMP scanning. It takes advantage
13+
of the fact that SNMP is a connectionless protocol and sends all SNMP requests
14+
as fast as it can. Then the scanner waits for responses to come back and logs
15+
them, in a fashion similar to Nmap ping sweeps. By default onesixtyone waits
16+
for 10 milliseconds between sending packets, which is adequate for 100Mbs
17+
switched networks. The user can adjust this value via the -w command line
18+
option. If set to 0, the scanner will send packets as fast as the kernel would
19+
accept them, which may lead to packet drop.
20+
.SH OPTIONS
21+
.HP
22+
.B \-c <communityfile>
23+
file with community names to try
24+
.TP
25+
.B \-i <inputfile>
26+
file with target hosts
27+
.TP
28+
.B \-o <outputfile>
29+
output log
30+
.TP
31+
.B \-d
32+
debug mode, use twice for more information
33+
.TP
34+
.B \-w n
35+
wait n milliseconds (1/1000 of a second) between sending packets (default 10)
36+
.TP
37+
.B \-q
38+
quiet mode, do not print log to stdout, use with \-l
39+
.PP
40+
examples: onesixtyone \-c dict.txt 192.168.4.1 public
41+
.IP
42+
\&onesixtyone \-c dict.txt \-i hosts \-o my.log \-w 100
43+
.HP
44+
.B \-c <communityfile>
45+
file with community names to try
46+
.TP
47+
.B \-i <inputfile>
48+
file with target hosts
49+
.TP
50+
.B \-o <outputfile>
51+
output log
52+
.TP
53+
.B \-d
54+
debug mode, use twice for more information
55+
.TP
56+
.B \-w n
57+
wait n milliseconds (1/1000 of a second) between sending packets (default 10)
58+
.TP
59+
.B \-q
60+
quiet mode, do not print log to stdout, use with \-l
61+
.PP
62+
examples: onesixtyone \-c dict.txt 192.168.4.1 public
63+
.IP
64+
\&onesixtyone \-c dict.txt \-i hosts \-o my.log \-w 100

onesixtyone.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* onesixtyone version 0.3.3
1+
/* onesixtyone version 0.3.4
22
Copyright (C) 2002,2003 solareclipse@phreedom.org
33
44
This program is free software; you can redistribute it and/or modify
@@ -83,7 +83,7 @@ struct {
8383
void usage()
8484
{
8585
int i;
86-
printf("onesixtyone 0.3.3 [options] <host> <community>\n");
86+
printf("onesixtyone 0.3.4 [options] <host> <community>\n");
8787
printf(" -c <communityfile> file with community names to try\n");
8888
printf(" -i <inputfile> file with target hosts\n");
8989
printf(" -o <outputfile> output log\n");

0 commit comments

Comments
 (0)