|
Joined: Oct 2014
Posts: 52
Babel fish
|
OP
Babel fish
Joined: Oct 2014
Posts: 52 |
already running a version on connect script .. but wondering if i can have an addon please that if a set version is returned then the user gets shunned automatically please on 1:CTCPREPLY:VERSION*:/msg #mastercontrol,#version 3VERSION $nick : $2- Thats the reply section from my ctcp script
|
|
|
|
Joined: Jan 2012
Posts: 333
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Jan 2012
Posts: 333 |
If I understood you correctly, then you want so that when a specific version of the client is found this script set the mode SHUN per user??? You should be aware that to use this command you must be in IRCop status and have certain rights on the server to be able to execute such a command. Also, you should understand that in this way you will block all innocent users who are found to have this version of the client during the check, and they will not be able to do anything on the server. But if you still want to use this, then in order for everything started working, this requires you need to changing your code something like this:
on 1:CTCPREPLY:VERSION*:{
;----------------------------
var %banversion = mIRC v7.55
;----------------------------
if (%banversion isin $strip($2-)) {
/msg #mastercontrol,#version 04SHUN VERSION $nick : $2-
/notice $nick Warning! Your client version: %banversion - outdated. Please install a more recent version ...
/SHUN $nick 1h : %banversion - Shunned version
}
else { /msg #mastercontrol,#version 03VERSION $nick : $2- }
}
Where the value of the variable " %banversion" will be the version for which the banned mode will be set for this client's user. Replace this value after the " =" sign with the part of the text that your script should catch. I also recommend that you additionally perform auto send a " /notice" with a message for to all users who will be banned using this script.
|
|
|
|
Joined: Jan 2004
Posts: 2,081
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,081 |
I'm not aware of any versions where the standard reply contains color codes, so $strip isn't needed. As this is, it's possible for this to have false positives and false negatives. It can be a false positive because people can, and often do, attach their script to check for the version check then reply their own script's version along with mirc's. so this can trigger when a script sends "Bob's super-duper script which requires mIRC v7.55 or greater" It can be a false negative because it's possible to block or change the version reply by using ON PARSELINE, but we'll not worry about that. Nor will we worry about people using /ignore -t to block all ctcp's causing them to make no reply at all. It can also be a false negative if you want to ban versions older than a certain version. For example if you want to ban mIRC versions of v7.55 and older (or at least warn them) because they're vulnerable to the CVE fixed in v7.56 The version reply is always 2 words, so you can narrow down the flag by changing your match text to only check like: on 1:CTCPREPLY:VERSION*:{
becomes
on 1:CTCPREPLY:VERSION mIRC &:{ which triggers only if there's exactly 1 word behind the "mirc". Then instead of checking if it's equal to the last version that can be vulnerable to the exploit, check if it's less-than-or-equal: if (%banversion isin $strip($2-)) {
becomes
if ($2- <= %banversion) { If you want to ban ONLY the specific version instead of that-version-and-all-earlier, then the <= can change to just == You could alternatively remove "mirc" from %banversion then check $3 instead of $2- If you make the 2nd code change without the 1st, then this triggers in error for clients whose name is alphabetically prior to "M"
|
|
|
|
Joined: Oct 2014
Posts: 52
Babel fish
|
OP
Babel fish
Joined: Oct 2014
Posts: 52 |
The client in question is Igloo IRC: https://iglooirc.com - v1.8.12 (13460) That's what we are targetting
|
|
|
|
Joined: Jan 2004
Posts: 2,081
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,081 |
Sorry, I thought you were trying to block an mIRC version. When I look at that client's FAQ page, they say they don't give a ctcpreply at freenode because of "reasons", and I'm not going to install their app just to test it. Can you show what kind of response to a ctcp version is made by the offending version? i.e. a response when you put this in a remote script: on *:CTCPREPLY:VERSION *:{
bset -t &v 1 $encode($parms,bm) | noop $decode(&v,bm)
echo -s version reply nick: $nick text: $parms binary: $bvar(&v,1-)
} This makes it easier for us to know exactly what kind of reply that client makes, just in case Epic's original script doesn't work for you.
|
|
|
|
Joined: Oct 2014
Posts: 52
Babel fish
|
OP
Babel fish
Joined: Oct 2014
Posts: 52 |
Oh we get a ctcp version reply ok! This is the default version reply without using that echo script Maroon! from the server [07:47] [PM-bbs VERSION reply]: Igloo IRC: https://iglooirc.com - v1.8.12 (13460) and from my bot... [07:48] <Titan_Bot> 3VERSION PM-bbs : Igloo IRC: https://iglooirc.com - v1.8.12 (13460) Thats not a problem for us 
Last edited by Orobas; 07/12/20 08:29 AM.
|
|
|
|
Joined: Jan 2012
Posts: 333
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Jan 2012
Posts: 333 |
You can try changing the value in the script I provided #Post268164 and see how he will react: var %banversion = Igloo IRC: https://iglooirc.com - v1.8.12 (13460) If you need to block any version of this application, you can try to specify it like this: var %banversion = Igloo IRC: https://iglooirc.com
|
|
|
|
Joined: Oct 2014
Posts: 52
Babel fish
|
OP
Babel fish
Joined: Oct 2014
Posts: 52 |
ran into issues right away.. it shunned the first connection ! not the targetted one lol on 1:CTCPREPLY:VERSION*:{
;----------------------------
var %banversion = Igloo IRC: https://iglooirc.com - v1.8.12 (13460)
;----------------------------
if ($2- <= %banversion) {
/msg #mastercontrol,#version 04SHUN VERSION $nick : $2-
/tempshun $nick : %banversion - Shunned version
}
else { /msg #mastercontrol,#version 03VERSION $nick : $2- }
} had a mibbit user connect and it shunned it.. so something is wrong 
Last edited by Orobas; 07/12/20 08:53 AM. Reason: forgot additional info
|
|
|
|
Joined: Jan 2012
Posts: 333
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Jan 2012
Posts: 333 |
Please clarify your question in more detail. You need to specify several different versions of clients at once, which should be blocked by this script?
|
|
|
|
Joined: Oct 2014
Posts: 52
Babel fish
|
OP
Babel fish
Joined: Oct 2014
Posts: 52 |
Apologies if it hasnt been clear..
I need Igloo IRC to be blocked.... ONLY
The script is to announce all versions.. but only take action (tempshun) on Igloo IRC clients
Last edited by Orobas; 07/12/20 09:19 AM.
|
|
|
|
Joined: Jan 2004
Posts: 2,081
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,081 |
The reason for my script was to verify the string received, to make it easier to match a specific string. For example, there might be multiple consecutive spaces, or whether the version reply actually contains the underline codes, or whether that's just being added by this forum.
|
|
|
|
Joined: Oct 2014
Posts: 52
Babel fish
|
OP
Babel fish
Joined: Oct 2014
Posts: 52 |
Sorry, I thought you were trying to block an mIRC version. When I look at that client's FAQ page, they say they don't give a ctcpreply at freenode because of "reasons", and I'm not going to install their app just to test it. Can you show what kind of response to a ctcp version is made by the offending version? i.e. a response when you put this in a remote script: on *:CTCPREPLY:VERSION *:{
bset -t &v 1 $encode($parms,bm) | noop $decode(&v,bm)
echo -s version reply nick: $nick text: $parms binary: $bvar(&v,1-)
} This makes it easier for us to know exactly what kind of reply that client makes, just in case Epic's original script doesn't work for you. - * Invalid parameters: $encode (line 2, oper statuswindows) - that refers to this line... bset -t &v 1 $encode($parms,bm) | noop $decode(&v,bm)
Last edited by Orobas; 08/12/20 08:50 AM.
|
|
|
|
Joined: Jan 2004
Posts: 2,081
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,081 |
Sorry, was a typo. The bm is there twice, but the 1st one should be only m So $encode($parms,bm) becomes $encode($parms,m)
|
|
|
|
Joined: Oct 2014
Posts: 52
Babel fish
|
OP
Babel fish
Joined: Oct 2014
Posts: 52 |
-
[15:35] -> [TheEvilPuppetMaster] VERSION
-
[15:35] -> *#mastercontrol,#version* 3VERSION TheEvilPuppetMaster : Igloo IRC: https://iglooirc.com - v1.8.12 (13460)
-
version reply nick: TheEvilPuppetMaster text: VERSION Igloo IRC: https://iglooirc.com - v1.8.12 (13460) binary: 86 69 82 83 73 79 78 32 73 103 108 111 111 32 73 82 67 58 32 104 116 116 112 115 58 47 47 105 103 108 111 111 105 114 99 46 99 111 109 32 45 32 118 49 46 56 46 49 50 32 40 49 51 52 54 48 41
-
|
|
|
|
Joined: Jan 2012
Posts: 333
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Jan 2012
Posts: 333 |
If the user connects through a different source or client, then of course, the response of his client's version may be very different. As far as I know, the webgate "Mibbit" writes its name of the client version in response. In this case, we can work only with that with the response of the user program that it gives to our CTCP request. Most likely, we will not be able to get the answer that is hidden from us and inaccessible for receiving, because the program will not give it back. That is, in other words, if a user has a client signed as " Igloo", then you can block it according to my script or how you configure it. Otherwise, no. I apologize in advance if I misunderstood you due to the complexity of the translation. And I noticed that you have an error in this code: if ($2- <= %banversion) { This will only work if you need to compare the numeric version index, which must be less than or equal to the specified in the variable. As it was presented in examples by maroon -> #Post268166But in my opinion you need something completely different. Therefore, in this form, the script should work correctly and as you need it:
on *:CTCPREPLY:VERSION*:{
;----------------------------
var %banversion = Igloo IRC: https://iglooirc.com - v1.8.12 (13460)
;----------------------------
if (%banversion isin $strip($2-)) {
/msg #mastercontrol,#version 04SHUN VERSION $nick : $2-
/tempshun $nick : %banversion - Shunned version
}
else { /msg #mastercontrol,#version 03VERSION $nick : $2- }
}
Or you can specify this in a variable to cover a wide range of any version numbers for that client: var %banversion = Igloo IRC P.S. Perhaps this will greatly upset the developers of the Igloo client, because you will block via (tempshun) all users using this application 
|
|
|
|
|