Browse files

Add stealth-prompt option to eggdrop.conf to configure stealth-telnet…

… prompt. Fixes #607

Found by: jack3 and simple
Patch by: michaelortmann
Fixes: #607

* introduce stealth prompt setting, allows user to configure custom telnet login prompt for stealth-telnets
* remove no-longer used language entries, we have new config variable now
  • Loading branch information...
michaelortmann authored and vanosg committed Sep 7, 2018
1 parent 88f49af commit abb895050902ee7f31935d179c03c3ca7c2a1697
@@ -344,9 +344,17 @@ set require-p 1
set open-telnets 0
# If you don't want Eggdrop to identify itself as an eggdrop on a telnet
# connection, set this setting to 1. Eggdrop will display 'Nickname' instead.
# connection, set this setting to 1. Eggdrop will display a logon prompt with
# only the contents of the stealth-prompt setting.
set stealth-telnets 0
# If stealth-telnets is 1, the string in this setting will replace the
# traditional Eggdrop banner. Two common choices are listed. (The \n's are
# present to maintain backwards compatibility and will be removed in a
# future release)
#set stealth-prompt "login: "
set stealth-prompt "\n\nNickname.\n"
# If you want Eggdrop to display a banner when telneting in, set this setting
# to 1. The telnet banner is set by 'set telnet-banner'.
set use-telnet-banner 0
@@ -127,7 +127,7 @@ Telnet botten og skriv 'NEW' som dit nick.\n
0x53c,Brugerfil mangler!
0x53e,%B (%E)\n\nSkriv venligst dit nick.\n
0x53f,Skifter logfil %s, over max-logsize (%d)
# 0x540 unused / ubrugt
0x541,Sidste besked gentaget %d gange\n
0x543,Ingen ledige sockets tilg�ngelig.
@@ -127,7 +127,7 @@ Telnet to the bot and enter 'NEW' as your nickname.
0x53c,User file is missing!
0x53e,%B (%E)\n\nPlease enter your nickname.\n
0x53f,Cycling logfile %s, over max-logsize (%d)
# 0x540 - unused
0x541,Last message repeated %d time(s).\n
0x543,No free sockets available.
@@ -127,7 +127,7 @@ Telnettaa botille ja sy
0x53c,K�ytt�j�tiedosto hukassa!
0x53e,%B (%E)\n\nSy�t� t�h�n sinun nickkisi.\n
0x53f,Kierr�tet��n logitiedostoa %s, maksimi-logikoko (%d)
# 0x540 - unused / k�ytt�m�t�n
0x541,Viimeinen viesti toistettu %d aika(a).\n
0x543,Ei vapaita kohtia saatavilla.
@@ -128,7 +128,7 @@ Faites un Telnet sur le bot et entrez 'NEW' comme surnom.
0x53c,La liste utilisateurs est innexistante!
0x53e,%B (%E)\n\nEntrez votre surnom.\n
0x53f,Rotation du fichier log %s, taille maximale depass�e (%d)
# 0x540 - unused / inutilis�
0x541,Dernier message rep�t� %d fois.\n
0x543,No free sockets available.
@@ -135,7 +135,7 @@ Baue eine Telnetverbindung zu dem Bot auf und gib 'NEW' als Deinen Nickname ein.
0x53c,Benutzerdatei fehlt!
0x53e,%B (%E)\n\nBitte gib Deinen Nickname ein:\n
0x53f,Rotiere Logdatei %s da groesser als max-logsize (%d)
# 0x540 - unused / Unbenutzt
0x541,Die letzte Meldung wiederholte sich %d mal.\n
0x543,Keine freien Sockets verfuegbar.
0x544,Tcl version:
@@ -127,7 +127,7 @@ Entre em ligação telnet com o bot e digite 'NEW' como o seu nick.
0x53c,Ficheiro de utilizador em falta!
0x53e,%B (%E)\n\nPor favor introduza o seu nick.\n
0x53f,Rodando ficheiro de log %s, acima do máximo do tamanho (%d)
# 0x540 - unused / não utilizado
0x541,Ultima mensagem repetida %d vez(s).\n
0x543,Sem sockets livres disponíveis.
@@ -67,6 +67,7 @@ int flood_telnet_thr = 5; /* Number of telnet connections to be
int flood_telnet_time = 60; /* In how many seconds? */
char network[41] = "unknown-net"; /* Name of the IRC network you're on */
char bannerfile[121] = "text/banner"; /* File displayed on telnet login */
char stealth_prompt[81] = "\n\nNickname.\n"; /* stealth_telnet prompt string */
static void dcc_telnet_hostresolved(int);
static void dcc_telnet_got_ident(int, char *);
@@ -140,7 +141,8 @@ static void strip_telnet(int sock, char *buf, int *len)
} else if (*p == TLN_AYT) {
/* "Are You There?" */
/* response is: "Hell, yes!" */
safe_write(sock, "\r\nHell, yes!\r\n", 14);
static unsigned char sb[] = "\r\n[Hell, yes!]\r\n";
safe_write(sock, sb, sizeof sb);
} else if (*p == TLN_IAC) {
/* IAC character in data, escaped with another IAC */
*o++ = *p++;
@@ -2390,7 +2392,7 @@ static void dcc_telnet_got_ident(int i, char *host)
/* Note: we don't really care about telnet status here. We use the
* STATUS option as a hopefully harmless way to detect if the other
* side is a telnet client or not. */
dprintf(i, TLN_IAC_C TLN_WILL_C TLN_STATUS_C "\n");
/* Copy acceptable-nick/host mask */
dcc[i].status = STAT_TELNET | STAT_ECHO;
@@ -2409,7 +2411,7 @@ static void dcc_telnet_got_ident(int i, char *host)
* about ourselves. <cybah>
if (stealth_telnets)
dprintf(i, stealth_prompt);
else {
dprintf(i, "\n\n");
sub_lang(i, MISC_BANNER);
@@ -117,7 +117,7 @@
/* was: MISC_BOTSCONNECTED 0x53d */
#define MISC_BANNER get_language(0x53e)
#define MISC_CLOGS get_language(0x53f)
#define MISC_BANNER_STEALTH get_language(0x540)
/* was: MISC_BANNER_STEALTH 0x540 */
#define MISC_LOGREPEAT get_language(0x541)
#define MISC_JUPED get_language(0x542)
#define MISC_NOFREESOCK get_language(0x543)
@@ -47,7 +47,7 @@ extern char origbotname[], botuser[], motdfile[], admin[], userfile[],
firewall[], helpdir[], notify_new[], vhost[], moddir[], owner[],
network[], botnetnick[], bannerfile[], egg_version[], natip[],
configfile[], logfile_suffix[], log_ts[], textdir[], pid_file[],
listen_ip[], stealth_prompt[];
extern int flood_telnet_thr, flood_telnet_time, shtime, share_greet,
@@ -404,6 +404,7 @@ static tcl_strings def_tcl_strings[] = {
{"timestamp-format",log_ts, 32, 0},
{"pidfile", pid_file, 120, STR_PROTECT},
{"configureargs", EGG_AC_ARGS, 0, STR_PROTECT},
{"stealth-prompt", stealth_prompt, 80, 0},
{NULL, NULL, 0, 0}

0 comments on commit abb8950

Please sign in to comment.