From 35f0406098864eca2629a1a6e4455a55e8c83d2c Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Mon, 11 Sep 2017 02:43:36 +0000
Subject: [PATCH] For guest logins, when prompting for the user's email address
 and location, check the trashcan files email.can and location.can (new). By
 adding "sh" and "shell" to these files (without the quotes), you can reduce
 the number of MIRAI-bot guest logins - the bot is immediately disconnected.

---
 exec/logon.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/exec/logon.js b/exec/logon.js
index 03070fd2e8..0fbd5ce191 100644
--- a/exec/logon.js
+++ b/exec/logon.js
@@ -39,17 +39,25 @@ if(user.security.restrictions&UFLAG_G) {
 		email=console.getstr(LEN_NETMAIL);
 		if(!email || !email.length)
 			continue;
+		if(bbs.trashcan("email", email)) {
+			bbs.hangup();
+			exit();
+		}
 		bbs.log_str("  " + email);
 		user.netmail=email;
 		user.settings|=USER_NETMAIL;
 		break;
 	}
-		
+
 	while(bbs.online) {
 		printf("\1y\1hPlease enter your location (City, State): \1w");
 		location=console.getstr(LEN_LOCATION,K_UPRLWR);
 		if(!location || !location.length)
 			continue;
+		if(bbs.trashcan("location", email)) {
+			bbs.hangup();
+			exit();
+		}
 		bbs.log_str("  " + location);
 		user.location=location;
 		break;
-- 
GitLab