Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging changes - version fix, make install, manpage #28

Merged
merged 2 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
CC ?= gcc
DESTDIR ?= /
prefix ?= /usr
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/bin
datarootdir ?= $(prefix)/share
datadir ?= $(datarootdir)
mandir ?= $(datarootdir)/man
man1dir ?= $(mandir)/man1

onesixtyone: onesixtyone.c
$(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o onesixtyone onesixtyone.c

Expand All @@ -7,4 +17,10 @@ solaris: onesixtyone.c
clean:
rm -rf onesixtyone

install:
install -p -D onesixtyone $(DESTDIR)$(bindir)/onesixtyone
install -p -D -m 0644 dict.txt $(DESTDIR)$(datadir)/onesixtyone/dict.txt
install -p -m 0644 -D onesixtyone.1 $(DESTDIR)$(man1dir)/onesixtyone.1


.PHONY: solaris clean
64 changes: 64 additions & 0 deletions onesixtyone.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.TH ONESIXTYONE
.SH NAME
onesixtyone \- efficient SNMP scanner
.SH SYNOPSIS
onesixtyone [options] <host> <community>
.SH DESCRIPTION
onesixtyone is an SNMP scanner which utilizes a sweep technique to achieve very
high performance. It can scan an entire class B network in under 13 minutes.
It can be used to discover devices responding to well-known community names
or to mount a dictionary attack against one or more SNMP devices.

onesixtyone takes a different approach to SNMP scanning. It takes advantage
of the fact that SNMP is a connectionless protocol and sends all SNMP requests
as fast as it can. Then the scanner waits for responses to come back and logs
them, in a fashion similar to Nmap ping sweeps. By default onesixtyone waits
for 10 milliseconds between sending packets, which is adequate for 100Mbs
switched networks. The user can adjust this value via the -w command line
option. If set to 0, the scanner will send packets as fast as the kernel would
accept them, which may lead to packet drop.
.SH OPTIONS
.HP
.B \-c <communityfile>
file with community names to try
.TP
.B \-i <inputfile>
file with target hosts
.TP
.B \-o <outputfile>
output log
.TP
.B \-d
debug mode, use twice for more information
.TP
.B \-w n
wait n milliseconds (1/1000 of a second) between sending packets (default 10)
.TP
.B \-q
quiet mode, do not print log to stdout, use with \-l
.PP
examples: onesixtyone \-c dict.txt 192.168.4.1 public
.IP
\&onesixtyone \-c dict.txt \-i hosts \-o my.log \-w 100
.HP
.B \-c <communityfile>
file with community names to try
.TP
.B \-i <inputfile>
file with target hosts
.TP
.B \-o <outputfile>
output log
.TP
.B \-d
debug mode, use twice for more information
.TP
.B \-w n
wait n milliseconds (1/1000 of a second) between sending packets (default 10)
.TP
.B \-q
quiet mode, do not print log to stdout, use with \-l
.PP
examples: onesixtyone \-c dict.txt 192.168.4.1 public
.IP
\&onesixtyone \-c dict.txt \-i hosts \-o my.log \-w 100
4 changes: 2 additions & 2 deletions onesixtyone.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* onesixtyone version 0.3.3
/* onesixtyone version 0.3.4
Copyright (C) 2002,2003 solareclipse@phreedom.org

This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -83,7 +83,7 @@ struct {
void usage()
{
int i;
printf("onesixtyone 0.3.3 [options] <host> <community>\n");
printf("onesixtyone 0.3.4 [options] <host> <community>\n");
printf(" -c <communityfile> file with community names to try\n");
printf(" -i <inputfile> file with target hosts\n");
printf(" -o <outputfile> output log\n");
Expand Down