From 71deace00d1a2b091313fe137ab7092418c6f87c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 10 Feb 2020 21:05:55 +0000 Subject: gentoo resync : 10.02.2020 --- net-analyzer/authforce/Manifest | 4 + net-analyzer/authforce/authforce-0.9.9-r3.ebuild | 47 +++++++++ ...e-0.9.9-fix-parsing-of-sample-config-file.patch | 54 ++++++++++ ....9.9-fix-submit_dummy_list-re-declaration.patch | 25 +++++ .../authforce-0.9.9-fixes-for-Wall-warnings.patch | 111 +++++++++++++++++++++ 5 files changed, 241 insertions(+) create mode 100644 net-analyzer/authforce/authforce-0.9.9-r3.ebuild create mode 100644 net-analyzer/authforce/files/authforce-0.9.9-fix-parsing-of-sample-config-file.patch create mode 100644 net-analyzer/authforce/files/authforce-0.9.9-fix-submit_dummy_list-re-declaration.patch create mode 100644 net-analyzer/authforce/files/authforce-0.9.9-fixes-for-Wall-warnings.patch (limited to 'net-analyzer/authforce') diff --git a/net-analyzer/authforce/Manifest b/net-analyzer/authforce/Manifest index 84990f34b8f7..6bc37f12e06e 100644 --- a/net-analyzer/authforce/Manifest +++ b/net-analyzer/authforce/Manifest @@ -1,5 +1,9 @@ AUX authforce-0.9.9-curl.patch 227 BLAKE2B e241e1ca54a51a39d8d57036467a892812c070609892fb2eaa44aec7c9ef4430f6f2b3fe59fb316fa2b3199375ea4f03299bae13ef38b23c3a088d4fb2ea83b5 SHA512 15467c0e12cf3739ef786ace9a8e83ee6e443681ecdc58c9c9258307036c66db35556400d8baaf44cb17e1c322db5bd52da8570a5a8c05506f2b7624e0ec3563 +AUX authforce-0.9.9-fix-parsing-of-sample-config-file.patch 1518 BLAKE2B 28216a6011065365bde5cb21b794181ef5da9592036190cad28e186feafd2fb61f98f1a7b489ef67aab4aca91ec177428d50db56df45aeef6752dc7a5d0ec96a SHA512 3e80da0fc91ad750d2c7ce1e97d42fb43bbdef018c366dc849206ac6327f643ba9208f8c97fe5823bf1ff265bcf11d30a905df23f49f6723796fc44a6919bfc3 +AUX authforce-0.9.9-fix-submit_dummy_list-re-declaration.patch 674 BLAKE2B fe773755eea616de618f748e0d917f5675a1b52cde43050ee0a4bd70abe50c22ed8a231eb65b1ce2c421e367963b40feb3f87f6b0ca4944c153b7254c233bd05 SHA512 a227bc06b34e2df5b82b884fedc99e205855a09c667ffdd2e4f6a3f455f470a9c22dde3ab355cf958165875411034327fb53ce0ad1c33da6ce15de6fe0af5be0 +AUX authforce-0.9.9-fixes-for-Wall-warnings.patch 2867 BLAKE2B 20289a3409c5aff4a58094039abdda48efd5d1af30c1ece802381295ddbd358a6b0b5998c69f80a89866cbd3739db143a504991cabd4cdf440f16993e83206de SHA512 bced2b7a28c5da2cb6615a791d258d786da66abc5d30e4a2be8cab63b2faa893eb63103122051ade275bad311944ff8c8595cd33f596625727167cf7a1f640cd AUX authforce-0.9.9-locale.patch 325 BLAKE2B 4379902c336744609ecd3a0a3d4039a10b83fe8ab3859d6e7faf9fd4aef3a74fc55f05f6c2fead2898bf112f1da774fa7c3ef54fae543d8af8bb9cd62e19e02d SHA512 0aa863400f54709a726fd2913d2d6039d3591221f9fcf60c843a3a24a2191f9eab70dd03cc574dc34cbc7e2824a58071b7167cc291f7e5cfad13da6e145f9206 DIST authforce-0.9.9.tar.gz 424557 BLAKE2B 3b962f7c3d445525364b8e40e3b47d0c951e04b7b5d40077540b1dc34721aca5163f9328451f23b7f1891d3a5440d003568ca6eb5104a523bdccb33ade61546d SHA512 fd94c6ac5f98f480af4acba2de7c0ad81dbc4c759cce8f3f722dcf8870b0c16a9e7d462f4542784737e021f9c8d480b26895dddb4d5953f730ff8a181ad474b3 EBUILD authforce-0.9.9-r2.ebuild 872 BLAKE2B 71560cdde0fa460b22953a85ea0f6a2b3d8c8d149acd4c31224c02c2fde9b8df903d01ed74dd1ec7aaeaa9cbf9ead9e7a8dfba688ad74e71a813332a97e6c2a4 SHA512 64920923498c8532fc64f8147a42383c0d60a1abbeb8cb3305fa36b14086fcd94103dfcadf3b63c1dde23e05c467e55163f3fae902dadff5f4372047b800a7e1 +EBUILD authforce-0.9.9-r3.ebuild 1047 BLAKE2B d52edda68977f6fee8a21fa7b61361d77afbde4dbe2f3651f72b404c86fdf0fc4ced3504666456ab9797dfb7ed23400246f0fc4ba2dbdb80df2ae952b248126d SHA512 a66f1c99632be37f3b5c189ede27130093effd6d05428f21c3f4210c104ce741f05f11fa778f7a002ba8d0f6d57550265e37c75847375d6f46a7db35da4dc865 MISC metadata.xml 382 BLAKE2B 2a1952e7ba3806db62d8b3c6d1251af18707ddca296b137c786fb6713a75b472446f5b9f7746d51eedd58408cb429868886fba43bf78fbef5b33dc7a4897a069 SHA512 9db5772c5ccd05d53b3c6bb2fabe790348fa3933d95eae80e4347bb781b58bce870f4d3ea2fe9feccf7dccdffcaacca081231069774c345162d0d8219f8144d6 diff --git a/net-analyzer/authforce/authforce-0.9.9-r3.ebuild b/net-analyzer/authforce/authforce-0.9.9-r3.ebuild new file mode 100644 index 000000000000..183912b43cae --- /dev/null +++ b/net-analyzer/authforce/authforce-0.9.9-r3.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="An HTTP authentication brute forcer" +HOMEPAGE="http://www.divineinvasion.net/authforce/" +SRC_URI="http://www.divineinvasion.net/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="curl nls" + +RDEPEND="sys-libs/readline:0= + curl? ( net-misc/curl )" +DEPEND="${RDEPEND}" +BDEPEND="nls? ( sys-devel/gettext )" + +DOCS=( AUTHORS BUGS NEWS README THANKS TODO ) + +PATCHES=( + "${FILESDIR}"/${P}-curl.patch + "${FILESDIR}"/${P}-locale.patch + "${FILESDIR}"/${P}-fixes-for-Wall-warnings.patch + "${FILESDIR}"/${P}-fix-parsing-of-sample-config-file.patch + "${FILESDIR}"/${P}-fix-submit_dummy_list-re-declaration.patch +) + +src_prepare() { + default + gunzip doc/${PN}.1.gz + sed -i -e "s/${PN}.1.gz/${PN}.1/g" \ + -e "s/\/mang/\/man1/g" doc/Makefile* || die +} + +src_configure() { + econf \ + $(use_with curl) \ + $(use_enable nls) \ + --with-path=/usr/share/${PN}/data:. +} + +src_install() { + default + doman doc/${PN}.1 +} diff --git a/net-analyzer/authforce/files/authforce-0.9.9-fix-parsing-of-sample-config-file.patch b/net-analyzer/authforce/files/authforce-0.9.9-fix-parsing-of-sample-config-file.patch new file mode 100644 index 000000000000..902b2a086e0d --- /dev/null +++ b/net-analyzer/authforce/files/authforce-0.9.9-fix-parsing-of-sample-config-file.patch @@ -0,0 +1,54 @@ +From 294ef3529016c29769d10dee9e5f639c2ce02b91 Mon Sep 17 00:00:00 2001 +From: "Zachary P. Landau" +Date: Wed, 5 Feb 2020 23:18:31 -0800 +Subject: [PATCH 3/4] Fix parsing of sample config file + +This code is horribly broken, but we should at least be able to parse +the authforcerc.sample file, and report the right line number when +failing. +--- + src/config.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/config.c b/src/config.c +index 4462fcc..66313d9 100644 +--- a/src/config.c ++++ b/src/config.c +@@ -11,7 +11,7 @@ + #endif /* MEMWATCH */ + #include "extern.h" + +-#define BUFFER_LEN 82 ++#define BUFFER_LEN 100 + #define IS_BIT(x) (!strcmp(x, "0") || !strcmp(x, "1")) + + static void process_boolean(char *option, char *value, int *variable) { +@@ -30,7 +30,7 @@ void parse_config(char *config) { + char *option; /* config file option */ + char *value; /* value for option */ + +- int line_number = 1; ++ int line_number = 0; + char *chop; + + /* MEMWATCH: reports this isnt freed, why? */ +@@ -45,6 +45,7 @@ void parse_config(char *config) { + } + + while (fgets(buffer, sizeof(buffer), fp)) { ++ line_number++; + if (buffer[0] == '#' || buffer[0] == ';' || buffer[0] == '\n') + continue; + remove_crud(buffer); +@@ -123,8 +124,6 @@ void parse_config(char *config) { + else + if (!quiet) + printf("parse_config: option %s is not valid\n", option); +- +- line_number++; + } + + debug(3, "parse_config: read %s [%i]\n", config, line_number-1); +-- +2.25.0 + diff --git a/net-analyzer/authforce/files/authforce-0.9.9-fix-submit_dummy_list-re-declaration.patch b/net-analyzer/authforce/files/authforce-0.9.9-fix-submit_dummy_list-re-declaration.patch new file mode 100644 index 000000000000..e6ca243fcad7 --- /dev/null +++ b/net-analyzer/authforce/files/authforce-0.9.9-fix-submit_dummy_list-re-declaration.patch @@ -0,0 +1,25 @@ +From d7f718e78444acef635acdd19e34dc4783e741fa Mon Sep 17 00:00:00 2001 +From: "Zachary P. Landau" +Date: Wed, 5 Feb 2020 23:00:06 -0800 +Subject: [PATCH 1/4] Fix submit_dummy_list re-declaration + +--- + src/extern.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/extern.h b/src/extern.h +index 6798bd7..cc08e0a 100644 +--- a/src/extern.h ++++ b/src/extern.h +@@ -61,7 +61,7 @@ extern void initialize_submit(void); + extern int submit(char *username, char *password); + extern void shutdown_submit(void); + #ifdef USE_DUMMY +-char **submit_dummy_list; ++extern char **submit_dummy_list; + #endif /* USE_DUMMY */ + + /* files.c */ +-- +2.25.0 + diff --git a/net-analyzer/authforce/files/authforce-0.9.9-fixes-for-Wall-warnings.patch b/net-analyzer/authforce/files/authforce-0.9.9-fixes-for-Wall-warnings.patch new file mode 100644 index 000000000000..083bb93d1296 --- /dev/null +++ b/net-analyzer/authforce/files/authforce-0.9.9-fixes-for-Wall-warnings.patch @@ -0,0 +1,111 @@ +From ef74da31208f1390bbc17d4c455c821f141ec78b Mon Sep 17 00:00:00 2001 +From: "Zachary P. Landau" +Date: Wed, 5 Feb 2020 23:17:50 -0800 +Subject: [PATCH 2/4] Fixes for -Wall warnings + +--- + src/files.c | 10 +++++----- + src/http.c | 4 ---- + src/methods.c | 4 ++-- + 3 files changed, 7 insertions(+), 11 deletions(-) + +diff --git a/src/files.c b/src/files.c +index 1068616..92d45ac 100644 +--- a/src/files.c ++++ b/src/files.c +@@ -70,7 +70,7 @@ char **textlist(char *textfile) { + + /* MEMWATCH: this isnt freed, why? */ + wordlist[count] = malloc_w(sizeof(NULL)); +- wordlist[count] = (char)NULL; ++ wordlist[count] = NULL; + + fclose(fp); + +@@ -83,7 +83,7 @@ char **copy_list(char **list) { + char **n_list; /* new list */ + + /* find num of elements */ +- while (list[i] != (char)NULL) ++ while (list[i] != NULL) + i++; + /* plus one for NULL */ + i++; +@@ -91,12 +91,12 @@ char **copy_list(char **list) { + n_list = malloc_w(i*sizeof(char*)); + + i=0; +- while (list[i] != (char)NULL) { ++ while (list[i] != NULL) { + n_list[i] = (char*)strdup_w(list[i]); + i++; + } + +- n_list[i] = (char)NULL; ++ n_list[i] = NULL; + + return (n_list); + } +@@ -104,7 +104,7 @@ char **copy_list(char **list) { + void free_list(char **list) { + int i=0; + +- while (list[i] != (char)NULL) { ++ while (list[i] != NULL) { + free(list[i]); + i++; + } +diff --git a/src/http.c b/src/http.c +index 88acdfc..397ac1f 100644 +--- a/src/http.c ++++ b/src/http.c +@@ -40,7 +40,6 @@ int submit(char *username, char *password) { + CURLcode result; + char error[CURL_ERROR_SIZE] = ""; + char authstring[92]; +- time_t before, after; + + + num_connects++; +@@ -59,8 +58,6 @@ int submit(char *username, char *password) { + } else + printf("trying %s->%s\n", username, password); + +- before = time(0); +- + if (curl) { + curl_easy_setopt(curl, CURLOPT_URL, url); + curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error); +@@ -79,7 +76,6 @@ int submit(char *username, char *password) { + result = curl_easy_perform(curl); + } + +- after = time(0); + /* num_connects jumps the gun earlier on */ + // acs = stats(acs, after-before, num_connects-1); + +diff --git a/src/methods.c b/src/methods.c +index 3c74c65..bdb6efc 100644 +--- a/src/methods.c ++++ b/src/methods.c +@@ -76,7 +76,7 @@ char *transform(char *username, char *password) { + + strncpy(old_password, password, sizeof(char)*41); + +- while ((cur_element = elements[i]) != (char)NULL) { ++ while ((cur_element = elements[i]) != NULL) { + if (!strcmp(password, "{username}")) + strncpy(insertion, username, sizeof(insertion)); + else if (!strcmp(password, "{emanresu}")) +@@ -120,7 +120,7 @@ void common_pairs(void) { + } + + while (1) { +- if (common_pairs_list[i] == (char)NULL) ++ if (common_pairs_list[i] == NULL) + break; + strncpy(username, common_pairs_list[i], sizeof(char)*81); + password = extract(username, ':'); +-- +2.25.0 + -- cgit v1.2.3