Skip to content

Instantly share code, notes, and snippets.

@nolageek
Last active August 29, 2015 14:06
Show Gist options
  • Save nolageek/e3634085ad2636019a58 to your computer and use it in GitHub Desktop.
Save nolageek/e3634085ad2636019a58 to your computer and use it in GitHub Desktop.
banning script kiddies' IPs in synchronet
# For default
###################################
Open login.js in your /sbbs/exec directory (or in /sbbs/mods) or applicable login.js replacement.
IPs are added to
/sbbs/text/ip.can
Find this...
// New user application?
if(str.toUpperCase()=="NEW") {
if(bbs.newuser()) {
bbs.logon();
exit();
}
continue;
}
/// Add this right after (remove + signs!):
+ if(str.toUpperCase()== "ROOT" || "ADMINISTRATOR" || "ADMIN")
+ {
+ console.print("BANNING IP: ");
+ console.print(client.ip_address);
+ console.print("\r\nContact you@email.com to request removal.");
+ system.filter_ip(client.protocol, "Banned username", client.host_name, client.ip_address);
+ bbs.hangup();
+ break;
+ }
// Continue normal login (prompting for password)
if(bbs.login(str, "\1n\1c\1hPW:\b\b\bPassword: \1w")) {
bbs.logon();
exit();
}
// If we get here, then the user didn't enter "new".
// If user numbers are allowed and the username contains
{snip}
# For DigiDistortion Login Matrix
##########################
Open DDLoginMatrix.js and look for
if (username.toUpperCase() == gGenLangStrings.NEW.toUpperCase())
{
doNewUser = true;
break;
}
/// Add this right after (remove + signs!):
+ if (username.toUpperCase() == "ROOT" || "ADMINISTRATOR" || "ADMIN")
+ {
+ console.print("BANNING IP: ");
+ console.print(client.ip_address);
+ console.print("\r\nContact you@email.com to request removal.");
+ system.filter_ip(client.protocol, "Banned username", client.host_name, client.ip_address);
+ bbs.hangup();
+ break;
+ }
// If we get here, then the user didn't enter "new".
// If user numbers are allowed and the username contains
{snip}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment