net-analyzer/knocker: drop 0.7.1-r3

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2023-05-01 13:48:49 +01:00
parent 7574e3d313
commit cedfc2dd94
5 changed files with 0 additions and 421 deletions
-1
View File
@@ -1,2 +1 @@
DIST knocker-0.7.1.tar.gz 72132 BLAKE2B a6eb8e37354df630481f809c77e98f1c9dab3290b8a34e1a3c7bbfc5f3d0f41b9a1f97a8f5a8afef7e1ec0c5afa444e908b8d50eeaedf08a384e86cda1c7b182 SHA512 e65d615235328c027e1c6179a11bee186fa3d173205850e8b9fac591819e344de770d968c2667f1a18bef88cf90422c357bf76b9d05a8915629977cb8e334cc2
DIST knocker-0.8.0.tar.gz 117380 BLAKE2B bb6b344efc0c7b22266b59430eff3b7982d328b54277085cef9709f9f41b7e6e40b1cc22944b36f927db00cd7f15afc1774be20df504e1f3f4eb2b2b1c293973 SHA512 127fde05f2f331e7a4489c4612852fe841f0981b737be1d871de33355a0b55f2ab50d2c083ef857420b4af81909d5cc8fbe6c89174e141f77e6bf25719b6bf47
@@ -1,149 +0,0 @@
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,7 +23,7 @@
.conf in the user ~/.knocker subdirectory.
13 May 2002
- - --no-fency (-nf for short) option added. This switch tells knocker to show
+ - --no-fancy (-nf for short) option added. This switch tells knocker to show
the output in a "polite" way. All the lines and stuffs shown in the default
mode, will not be displayed using this option.
--- a/src/knocker_args.c
+++ b/src/knocker_args.c
@@ -82,7 +82,7 @@
fprintf (stdout, "Extra options:\n");
fprintf (stdout, " %s, %s quiet mode (no console output, logs to file)\n", QUIET_MODE_SHORT_OPT, QUIET_MODE_LONG_OPT);
fprintf (stdout, " %s, %s <logfile> log scan results to the specified file\n", ENABLE_LOGFILE_SHORT_OPT, ENABLE_LOGFILE_LONG_OPT);
- fprintf (stdout, " %s, %s disable fency output\n", NO_FENCY_SHORT_OPT, NO_FENCY_LONG_OPT);
+ fprintf (stdout, " %s, %s disable fancy output\n", NO_FANCY_SHORT_OPT, NO_FANCY_LONG_OPT);
fprintf (stdout, " %s, %s disable colored output\n", NO_COLORS_SHORT_OPT, NO_COLORS_LONG_OPT);
fprintf (stdout, "\n");
fprintf (stdout, " %s let you configure %s\n", CONFIGURE_LONG_OPT, PACKAGE);
@@ -111,7 +111,7 @@
args->logfile = logfile;
args->quiet = quiet;
args->colors = colors;
- args->fency = TRUE; /* true by default */
+ args->fancy = TRUE; /* true by default */
return 0;
}
@@ -189,10 +189,10 @@
}
return (0); /* we should have all arguments here */
}
- else if ((!strcmp (argv[i], NO_FENCY_SHORT_OPT)) || (!strcmp (argv[i], NO_FENCY_LONG_OPT)))
+ else if ((!strcmp (argv[i], NO_FANCY_SHORT_OPT)) || (!strcmp (argv[i], NO_FANCY_LONG_OPT)))
{
- /* Disable fency output */
- args->fency = FALSE;
+ /* Disable fancy output */
+ args->fancy = FALSE;
}
else if ((!strcmp (argv[i], NO_COLORS_SHORT_OPT)) || (!strcmp (argv[i], NO_COLORS_LONG_OPT)))
{
--- a/src/knocker_output.c
+++ b/src/knocker_output.c
@@ -48,7 +48,7 @@
{
time_t timenow;
- if (!knocker_args.fency)
+ if (!knocker_args.fancy)
return 0;
@@ -104,7 +104,7 @@
*/
void knocker_output_host_info (const char *hostname_str, const char *hostip_str)
{
- if (knocker_args.fency)
+ if (knocker_args.fancy)
{
knocker_term_color_fprintf (knocker_output_fp, " - ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
knocker_term_color_fprintf (knocker_output_fp, "hostname to scan: ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
@@ -134,7 +134,7 @@
*/
void knocker_output_resolve_error (char *hostname_str)
{
- if (knocker_args.fency)
+ if (knocker_args.fancy)
{
knocker_term_color_fprintf (knocker_output_fp, " - ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
knocker_term_color_fprintf (knocker_output_fp, "failed to resolve given hostname/IP: ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
@@ -157,7 +157,7 @@
*/
void knocker_output_ports_info (int sp, int ep)
{
- if (!knocker_args.fency)
+ if (!knocker_args.fancy)
{
knocker_term_color_fprintf (knocker_output_fp, "\n", KNOCKER_COLOR_2, KNOCKER_COLOR_2_ATTR);
return;
@@ -183,7 +183,7 @@
*/
void knocker_output_open_port (int port, char *service_str)
{
- if (knocker_args.fency)
+ if (knocker_args.fancy)
{
knocker_term_color_fprintf (knocker_output_fp, " -=[ ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
knocker_term_color_intfprintf (knocker_output_fp, port, KNOCKER_COLOR_2, KNOCKER_COLOR_2_ATTR);
@@ -216,7 +216,7 @@
*/
void knocker_output_results (char *hostname_str, char *hostname_ip, int tot_ps, int open_ps, char *secs)
{
- if (knocker_args.fency)
+ if (knocker_args.fancy)
{
knocker_term_color_fprintf (knocker_output_fp, "\n", KNOCKER_COLOR_2, KNOCKER_COLOR_2_ATTR);
knocker_term_color_fprintf (knocker_output_fp, "+=- - - - - - - - - - - - - - - - - - - - - - - - - - - - ",
--- a/src/knocker_main.c
+++ b/src/knocker_main.c
@@ -75,7 +75,7 @@
knocker_core_init_portscan_data (&pscan_data);
- if (knocker_args.fency)
+ if (knocker_args.fancy)
knocker_term_clear ();
knocker_output_open ();
--- a/src/knocker_args.h
+++ b/src/knocker_args.h
@@ -53,9 +53,9 @@
#define QUIET_MODE_SHORT_OPT "-q"
#define QUIET_MODE_LONG_OPT "--quiet"
- /* option to disable fency cool out put */
-#define NO_FENCY_SHORT_OPT "-nf"
-#define NO_FENCY_LONG_OPT "--no-fency"
+ /* option to disable fancy cool out put */
+#define NO_FANCY_SHORT_OPT "-nf"
+#define NO_FANCY_LONG_OPT "--no-fancy"
/* option to disable colored out put */
#define NO_COLORS_SHORT_OPT "-nc"
@@ -88,7 +88,7 @@
int logfile; /* log to file TRUE,FALSE */
int quiet; /* quiet mode TRUE,FALSE */
int colors; /* no colors, TRUE,FALSE */
- int fency; /* fency output, TRUE, FALSE */
+ int fancy; /* fancy output, TRUE, FALSE */
int win32_frontend;
} knocker_args_t;
--- a/docs/knocker.1
+++ b/docs/knocker.1
@@ -38,8 +38,8 @@
\fB\-lf\fr, \fB\-\-logfile <logfile>\fR
log the results to a specified file.
.TP
-\fB\-nf\fr, \fB\-\-no-fency\fR
-disable fency output
+\fB\-nf\fr, \fB\-\-no-fancy\fR
+disable fancy output
.TP
\fB\-nc\fr, \fB\-\-no-colors\fR
disable colored output
@@ -1,215 +0,0 @@
--- a/src/knocker_args.c
+++ b/src/knocker_args.c
@@ -34,6 +34,7 @@
static int _have_last_host = 0; /* tells if we've got the host with the --last-host option */
+knocker_args_t knocker_args; /* command line arguments structure */
/*
============================================================================
--- a/src/knocker_args.h
+++ b/src/knocker_args.h
@@ -93,7 +93,7 @@
} knocker_args_t;
-knocker_args_t knocker_args; /* command line arguments structure */
+extern knocker_args_t knocker_args; /* command line arguments structure */
/*
Initialize a knocker_args_t type of structure
--- a/src/knocker_conf.c
+++ b/src/knocker_conf.c
@@ -31,6 +31,11 @@
#include "knocker_user.h"
#include "knocker_conf.h"
+int KNOCKER_USER_COLOR;
+int KNOCKER_COLOR_1;
+int KNOCKER_COLOR_2;
+int KNOCKER_COLOR_1_ATTR;
+int KNOCKER_COLOR_2_ATTR;
/*
============================================================================
--- a/src/knocker_conf.h
+++ b/src/knocker_conf.h
@@ -46,11 +46,11 @@
/* The actual values variable */
/* these values are read from the conf file */
/* by the knocker_conf_parse function */
-int KNOCKER_USER_COLOR;
-int KNOCKER_COLOR_1;
-int KNOCKER_COLOR_2;
-int KNOCKER_COLOR_1_ATTR;
-int KNOCKER_COLOR_2_ATTR;
+extern int KNOCKER_USER_COLOR;
+extern int KNOCKER_COLOR_1;
+extern int KNOCKER_COLOR_2;
+extern int KNOCKER_COLOR_1_ATTR;
+extern int KNOCKER_COLOR_2_ATTR;
void knocker_conf_configure ( void );
int knocker_conf_parse ( void );
--- a/src/knocker_core.c
+++ b/src/knocker_core.c
@@ -50,6 +50,9 @@
static void knocker_core_free_host_ip_string (knocker_core_host_t * hinfo);
+char *knocker_core_last_hostip; /* string of the last resolved host ip address */
+char *knocker_core_last_hostname; /* string of the last used host name */
+char *knocker_core_last_service; /* string of the last service */
/*
============================================================================
--- a/src/knocker_core.h
+++ b/src/knocker_core.h
@@ -164,9 +164,9 @@
static const char knocker_core_author_email[] = _KNOCKER_CORE_AUTHOR_EMAIL_;
/* allocated and deallocated within knocker_core_init, knocker_core_quit */
-char *knocker_core_last_hostip; /* string of the last resolved host ip address */
-char *knocker_core_last_hostname; /* string of the last used host name */
-char *knocker_core_last_service; /* string of the last service */
+extern char *knocker_core_last_hostip; /* string of the last resolved host ip address */
+extern char *knocker_core_last_hostname; /* string of the last used host name */
+extern char *knocker_core_last_service; /* string of the last service */
int knocker_core_init ( void );
--- a/src/knocker_led.c
+++ b/src/knocker_led.c
@@ -50,6 +50,9 @@
#define LED_VALUE_SCR LED_SCR
+knocker_led_t knocker_led_status;
+int ledt;
+
#ifndef NO_LED
static int initialized = 0;
#endif
--- a/src/knocker_led.h
+++ b/src/knocker_led.h
@@ -65,7 +65,7 @@
int sequence; /* used in knocker_led_sequence() only */
} knocker_led_t;
-knocker_led_t knocker_led_status;
+extern knocker_led_t knocker_led_status;
void knocker_led_turn_on (int led);
void knocker_led_turn_off (int led);
@@ -75,7 +75,7 @@
void knocker_led_reset ( void );
#define led_delay 1
-int ledt;
+extern int ledt;
#endif /* _KNOCKER_LED_H_ */
--- a/src/knocker_log.c
+++ b/src/knocker_log.c
@@ -30,7 +30,7 @@
const char knocker_log_header[] =
"+-----------------------------------------------------------------------------+\n|--=| k n o c k e r -- t h e -- n e t -- p o r t s c a n n e r |=-=[logfile]=-|\n+-----------------------------------------------------------------------------+\n";
-char *knocker_time;
+FILE *knocker_log_fp;
/*
============================================================================
--- a/src/knocker_log.h
+++ b/src/knocker_log.h
@@ -33,7 +33,7 @@
#include <string.h>
#define KNOCKER_LOG_FILE "knocker_scan.log"
-FILE *knocker_log_fp;
+extern FILE *knocker_log_fp;
int knocker_log_open (const char *filename);
void knocker_log_host_info (char *hostname_str, char *hostip_str);
--- a/src/knocker_output.c
+++ b/src/knocker_output.c
@@ -38,8 +38,6 @@
};
-char *knocker_time;
-
/*
============================================================================
============================================================================
--- a/src/knocker_services.c
+++ b/src/knocker_services.c
@@ -28,6 +28,9 @@
#include "knocker_services.h"
#include "knocker_core.h"
+int knocker_core_services_db_init;
+char *knocker_core_services_db[SERVICES_DB_TOTAL_SERVICES];
+
/* this following list of services has been automatically
generated from /etc/services */
--- a/src/knocker_services.h
+++ b/src/knocker_services.h
@@ -29,9 +29,9 @@
#define SERVICES_DB_TOTAL_SERVICES 30000 /* was erroneously 231 */
-int knocker_core_services_db_init;
+extern int knocker_core_services_db_init;
-char *knocker_core_services_db[SERVICES_DB_TOTAL_SERVICES];
+extern char *knocker_core_services_db[SERVICES_DB_TOTAL_SERVICES];
int init_knocker_core_services_db ( void );
void free_knocker_core_services_db ( void );
--- a/src/knocker_time.c
+++ b/src/knocker_time.c
@@ -40,6 +40,7 @@
static struct timeval timer_start;
#endif
+char *knocker_time;
void knocker_time_start_timer (void)
{
--- a/src/knocker_time.h
+++ b/src/knocker_time.h
@@ -30,6 +30,8 @@
#include <time.h>
+extern char *knocker_time;
+
void knocker_time_start_timer (void);
double knocker_time_get_ticks (void);
void knocker_time_delay (unsigned long ms);
--- a/src/knocker_user.c
+++ b/src/knocker_user.c
@@ -41,6 +41,8 @@
#define KNOCKER_LASTSCAN_FILE "lastscan"
#define KNOCKER_TOKEN "|"
+knocker_user_t knocker_user;
+
static int _dir_exists (const char *path);
static int _dir_create (const char *path);
static int _file_exists (const char *path);
--- a/src/knocker_user.h
+++ b/src/knocker_user.h
@@ -30,7 +30,7 @@
int super; /* user is root or not */
} knocker_user_t;
-knocker_user_t knocker_user;
+extern knocker_user_t knocker_user;
int knocker_user_is_root ( void );
char *knocker_user_get_username ( void );
@@ -1,30 +0,0 @@
--- a/src/knocker_conf.c
+++ b/src/knocker_conf.c
@@ -223,6 +223,8 @@
{
char *tmpp = malloc (strlen (line));
char *p = malloc (strlen (line));
+ char *tmpp_orig = tmpp;
+ char *p_orig = p;
/* Check if the option is present in the line */
tmpp = strstr (line, opt);
@@ -234,7 +236,7 @@
if (!_isblank (*tmpp) || *tmpp != KNOCKER_OPTION_TOKEN)
{
- free (tmpp);
+ free (tmpp_orig);
return 0;
}
@@ -247,8 +249,7 @@
strcpy (value, p);
- /* free(p); this cause knocker to segfault */
- /* well I have to know why... */
+ free(p_orig);
return 1;
}
@@ -1,26 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
DESCRIPTION="Knocker is an easy to use security port scanner written in C"
HOMEPAGE="http://knocker.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
PATCHES=(
"${FILESDIR}"/${P}-fency.patch
"${FILESDIR}"/${P}-free.patch
"${FILESDIR}"/${P}-knocker_user_is_root.patch
"${FILESDIR}"/${P}-fno-common.patch
)
DOCS=( AUTHORS BUGS ChangeLog NEWS README TO-DO )
src_configure() {
tc-export CC
default
}