clarify license

This commit is contained in:
van Hauser 2020-02-17 11:16:51 +01:00
parent 5b6fc88428
commit 90bbde1be8
9 changed files with 48 additions and 29 deletions

View file

@ -10,6 +10,9 @@
Please do not use in military or secret service organizations,
or for illegal purposes.
(This is the wish of the author and non-binding. Many people working
in these organizations do not care for laws and ethics anyways.
You are not one of the "good" ones if you ignore this.)

View file

@ -105,7 +105,8 @@ int32_t start_imap(int32_t s, char *ip, int32_t port, unsigned char options, cha
memset(buffer2, 0, sizeof(buffer2));
result = sasl_plain(buffer2, login, pass);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%.250s\r\n", buffer2);
break;
@ -163,17 +164,20 @@ int32_t start_imap(int32_t s, char *ip, int32_t port, unsigned char options, cha
switch (imap_auth_mechanism) {
case AUTH_CRAMMD5: {
result = sasl_cram_md5(buffer2, pass, buffer);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%s %.250s", preplogin, buffer2);
} break;
case AUTH_CRAMSHA1: {
result = sasl_cram_sha1(buffer2, pass, buffer);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%s %.250s", preplogin, buffer2);
} break;
case AUTH_CRAMSHA256: {
result = sasl_cram_sha256(buffer2, pass, buffer);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%s %.250s", preplogin, buffer2);
} break;
}

View file

@ -113,7 +113,8 @@ int32_t start_nntp(int32_t s, char *ip, int32_t port, unsigned char options, cha
memset(buffer, 0, sizeof(buffer));
result = sasl_plain(buffer, login, pass);
if (result == NULL) return 3;
if (result == NULL)
return 3;
char tmp_buffer[sizeof(buffer)];
sprintf(tmp_buffer, "%.250s\r\n", buffer);
@ -149,7 +150,8 @@ int32_t start_nntp(int32_t s, char *ip, int32_t port, unsigned char options, cha
memset(buffer2, 0, sizeof(buffer2));
result = sasl_cram_md5(buffer2, pass, buffer);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%s %.250s", preplogin, buffer2);
hydra_tobase64((unsigned char *)buffer, strlen(buffer), sizeof(buffer));

View file

@ -203,7 +203,8 @@ int32_t start_pop3(int32_t s, char *ip, int32_t port, unsigned char options, cha
memset(buffer, 0, sizeof(buffer));
result = sasl_plain(buffer, login, pass);
if (result == NULL) return 3;
if (result == NULL)
return 3;
char tmp_buffer[sizeof(buffer)];
sprintf(tmp_buffer, "%.250s\r\n", buffer);
@ -265,17 +266,20 @@ int32_t start_pop3(int32_t s, char *ip, int32_t port, unsigned char options, cha
switch (p->pop3_auth_mechanism) {
case AUTH_CRAMMD5: {
result = sasl_cram_md5(buffer2, pass, buffer);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%s %.250s", preplogin, buffer2);
} break;
case AUTH_CRAMSHA1: {
result = sasl_cram_sha1(buffer2, pass, buffer);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%s %.250s", preplogin, buffer2);
} break;
case AUTH_CRAMSHA256: {
result = sasl_cram_sha256(buffer2, pass, buffer);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%s %.250s", preplogin, buffer2);
} break;
}

View file

@ -139,7 +139,8 @@ int32_t start_sip(int32_t s, char *ip, char *lip, int32_t port, int32_t lport, u
char buffer2[512];
result = sasl_digest_md5(buffer2, login, pass, strstr(buf, "WWW-Authenticate: Digest") + strlen("WWW-Authenticate: Digest") + 1, host, "sip", NULL, 0, NULL);
if (result == NULL) return 3;
if (result == NULL)
return 3;
memset(buffer, 0, SIP_MAX_BUF);
snprintf(buffer, SIP_MAX_BUF,

View file

@ -68,7 +68,8 @@ int32_t start_smtp(int32_t s, char *ip, int32_t port, unsigned char options, cha
memset(buffer, 0, sizeof(buffer));
result = sasl_plain(buffer, login, pass);
if (result == NULL) return 3;
if (result == NULL)
return 3;
char tmp_buffer[sizeof(buffer)];
sprintf(tmp_buffer, "%.250s\r\n", buffer);
@ -104,7 +105,8 @@ int32_t start_smtp(int32_t s, char *ip, int32_t port, unsigned char options, cha
memset(buffer2, 0, sizeof(buffer2));
result = sasl_cram_md5(buffer2, pass, buffer);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%s %.250s", preplogin, buffer2);
hydra_tobase64((unsigned char *)buffer, strlen(buffer), sizeof(buffer));

View file

@ -126,7 +126,8 @@ int32_t start_xmpp(int32_t s, char *ip, int32_t port, unsigned char options, cha
case AUTH_PLAIN: {
memset(buffer2, 0, sizeof(buffer));
result = sasl_plain(buffer2, login, pass);
if (result == NULL) return 3;
if (result == NULL)
return 3;
sprintf(buffer, "%s%.250s%s", RESPONSE_STR, buffer2, RESPONSE_END_STR);
if (debug)
hydra_report(stderr, "DEBUG C: %s\n", buffer);
@ -138,7 +139,8 @@ int32_t start_xmpp(int32_t s, char *ip, int32_t port, unsigned char options, cha
memset(buffer2, 0, sizeof(buffer2));
result = sasl_cram_md5(buffer2, pass, buffer);
if (result == NULL) return 3;
if (result == NULL)
return 3;
rc = sasl_saslprep(login, SASL_ALLOW_UNASSIGNED, &preplogin);
if (rc) {

17
hydra.c
View file

@ -3,8 +3,9 @@
* https://github.com/vanhauser-thc/thc-hydra
*
* Parallized network login hacker.
* Don't use in military or secret service organizations, or for illegal
* purposes.
* Please don't use in military or secret service organizations, or for illegal
* purposes. This is a wish and is non-binding.
* If you ignore this be sure you are not a good person though.
*
* License: GNU AFFERO GENERAL PUBLIC LICENSE v3.0, see LICENSE file
*/
@ -551,11 +552,11 @@ void help(int32_t ext) {
"module help)\n");
PRINT_NORMAL(ext,
"\nSupported services: %s\n"
"\n%s is a tool to guess/crack valid login/password pairs. "
"Licensed under AGPL\n"
"v3.0. The newest version is always available at %s\n"
"Don't use in military or secret service organizations, or for "
"illegal purposes.\n",
"\n%s is a tool to guess/crack valid login/password pairs.\n"
"Licensed under AGPL v3.0. The newest version is always available at;\n%s\n"
"Please don't use in military or secret service organizations, or for illegal\n"
"purposes. (This is a wish and non-binding - most such people do not care about\n"
"laws and ethics anyway - and tell themselves they are one of the good ones.)\n",
SERVICES, PROGRAM, RESOURCE);
if (ext && strlen(unsupported) > 0) {
@ -2151,7 +2152,7 @@ int main(int argc, char *argv[]) {
struct sockaddr_in *ipv4 = NULL;
printf("%s %s (c) 2020 by %s & %s - Please do not use in military or secret "
"service organizations, or for illegal purposes.\n\n",
"service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).\n\n",
PROGRAM, VERSION, AUTHOR, AUTHOR2);
#ifndef LIBAFP
SERVICES = hydra_string_replace(SERVICES, "afp ", "");