mIRC Home    About    Download    Register    News    Help

Print Thread
#269320 30/08/21 06:17 PM
Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
Hi, I had this in the remote of a mIRC client that I was using as a bot and it was working fine a month ago during the time I had botnets connecting to my server and spamming. Lately, it is ignoring everything I have listed and going to 'else' and I have not changed anything.

Code
on +200:SNOTICE:*client connecting at palace.morphforest.com*:{
  if ($8 == norenxaq) { /msg #Zen-Activity $8 is safe }
  if ($8 == EricMouse) { /msg #Zen-Activity $8 is safe }
  if ($8 == ErikMouse) { /msg #Zen-Activity $8 is safe }
  if ($8 == MFServ) { /msg #Zen-Activity $8 is safe }
  else { /msg #Zen-Activity $8 }
}


And what the client sees when anyone connects to it is "-anthropia.morphforest.com- *** Notice -- Client connecting at palace.morphforest.com: EricMouse (erikmouse@hostmask)

ErikMouse #269321 30/08/21 07:33 PM
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Nothing in your message has "MFServ" so it falls into the else.

ErikMouse #269322 30/08/21 07:44 PM
Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
You forgot to explain what your script should do, but I think I already guessed about it.

Probably, this script should notify you on the specified channel about who is connecting to your server and should give a characteristic for certain nicknames, whose behavior you already know before.

Try using code like this:
Code
on *:SNOTICE:*Client connecting*: client_connecting $1-
alias -l client_connecting {
  var %cc_snotice $strip($1-)
  var %cc_server $gettok(%cc_snotice,1,58)
  if (palace.morphforest.com isin %cc_server) {
    var %cc_chan #Zen-Activity
    var %cc_user $gettok(%cc_snotice,2,58)
    var %cc_nick $gettok(%cc_user,1,32)
    var %cc_mask $remove($wildtok(%cc_user,*@*,1,32),$chr(40),$chr(41))
    if ($istok(ErikMouse EricMouse norenxaq MFServ,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),03,Good user,,$chr(41)) | halt
    }
    if ($istok(Troll Fool,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),04,Bad user,,$chr(41)) | halt
    }
    msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),07,Unknown user,,$chr(41))
  }
}

In lines: "if ($istok(ErikMouse EricMouse norenxaq MFServ,%cc_nick,32))" - you must list separated by a space all nicknames with which you are already familiar.

If I made a mistake in my conclusions about the task of the script, then please describe the necessary in more detail.



🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #269323 30/08/21 08:12 PM
Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
Originally Posted by Epic
You forgot to explain what your script should do, but I think I already guessed about it.

If I made a mistake in my conclusions about the task of the script, then please describe the necessary in more detail.
Sorry, I forgot the explain that I ended up creating that script to temporary z:line for a month all connections to the server except those that were excepted such as norenxaq, ErikMouse, EricMouse, and MFServ.

ErikMouse #269324 30/08/21 08:52 PM
Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
Are you sure that you want your server to be visited only by the specified 4 people (nicknames), and all the rest should be immediately (Z:line) banned when connecting for up to 30 days ??? o_0

This idea seems very bad to me. But if you insist, please me the complete correct syntax for the "ZLINE" command on your server.

Or, you can independently supplement this script with the necessary lines with commands, indicating them below the messages in the corresponding condition for checking.




🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #269325 30/08/21 08:59 PM
Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
Originally Posted by Epic
Are you sure that you want your server to be visited only by the specified 4 people, and all the rest should be immediately banned when connecting for up to 30 days ???

This idea seems very bad to me. But if you insist, please me the complete correct syntax for the "ZLINE" command on your server.

Or you can independently supplement this script with the necessary lines with commands below under the appropriate conditions for checking.


Well, I just have it as a temporary script while I have spambots connecting to the server, but usually I have it turned off and allow anyone to connect sometime after the spambots have stopped trying to connect.

Epic #269326 30/08/21 09:03 PM
Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
Oh, and the complete correct syntax for the GZLINE command on my server is
Code
/gzline <hostmask> +30d Open Proxy
and is the command I use when I got major spambot problems.

ErikMouse #269327 30/08/21 10:05 PM
Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
Well, then, based on your requirements, you can try using this script:
Code
on *:SNOTICE:*Client connecting*: client_connecting $1-
alias -l client_connecting {
  var %cc_snotice $strip($1-)
  var %cc_server $gettok(%cc_snotice,1,58)
  if (palace.morphforest.com isin %cc_server) {
    var %cc_chan #Zen-Activity
    var %cc_user $gettok(%cc_snotice,2,58)
    var %cc_nick $gettok(%cc_user,1,32)
    var %cc_mask $remove($wildtok(%cc_user,*@*,1,32),$chr(40),$chr(41))
    var %cc_zline $+(*@,$gettok(%cc_mask,2,64))
    if ($istok(ErikMouse EricMouse norenxaq MFServ,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),03,Good user,,$chr(41)) | halt
    }
    if ($istok(Troll Jester Fool Boob Dummy,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),07,Local clown,,$chr(41)) | halt
    }
    msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),04,Potential intruder,,$chr(41))
    .gzline %cc_zline +30d You came at the wrong time and fell under the distribution, the next attempt to get into our network you will have in 30 days.
  }
}


Last edited by Epic; 30/08/21 10:28 PM. Reason: additional fix in the code: %cc_zline

🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #269328 31/08/21 12:30 AM
Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
Originally Posted by Epic
Well, then, based on your requirements, you can try using this script:
Code
on *:SNOTICE:*Client connecting*: client_connecting $1-
alias -l client_connecting {
  var %cc_snotice $strip($1-)
  var %cc_server $gettok(%cc_snotice,1,58)
  if (palace.morphforest.com isin %cc_server) {
    var %cc_chan #Zen-Activity
    var %cc_user $gettok(%cc_snotice,2,58)
    var %cc_nick $gettok(%cc_user,1,32)
    var %cc_mask $remove($wildtok(%cc_user,*@*,1,32),$chr(40),$chr(41))
    var %cc_zline $+(*@,$gettok(%cc_mask,2,64))
    if ($istok(ErikMouse EricMouse norenxaq MFServ,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),03,Good user,,$chr(41)) | halt
    }
    if ($istok(Troll Jester Fool Boob Dummy,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),07,Local clown,,$chr(41)) | halt
    }
    msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),04,Potential intruder,,$chr(41))
    .gzline %cc_zline +30d You came at the wrong time and fell under the distribution, the next attempt to get into our network you will have in 30 days.
  }
}


Just to let you know, I had tested out this script in my mIRC bot client and it worked correctly. The only thing is I need to change
Code
.gzline %cc_zline +30d
to
Code
.gzline %cc_nick +30d
instead to where it is doing
Code
/gzline <nick> +30d
instead since the server translates the nick to the IP address of the connecting nick, and
Code
/gzline <hostmask> +30d
was resulting in the following.

Code
-anthropia.morphforest.com- ERROR: (g)zlines must be placed at *@ipmask, not user@ipmask. This is because (g)zlines are processed BEFORE dns and ident lookups are done. If you want to use usermasks, use a KLINE/GLINE instead.

ErikMouse #269582 07/11/21 11:40 PM
Joined: Nov 2021
Posts: 91
Babel fish
Online
Babel fish
Joined: Nov 2021
Posts: 91
There is a far easier way to prevent uninvited guests from joining wich is to use password to be able to connect and allow ssl only but thats just another layer the password should do and also use a non default port to connect to and share with your friends of course so they can connect this should guarantee you peace on your server

I run a test net myself so i tried to come up with all kinds of solutions let me know how it worked out so we may try other solutions as there are various


Link Copied to Clipboard