| View previous topic :: View next topic |
| Author |
Message |
ORATEGOD Voice
Joined: 08 Jun 2020 Posts: 32
|
Posted: Mon Jul 12, 2021 7:40 pm Post subject: CTCP VERSION |
|
|
Greetings Guys entering a server a few days ago and I found this message from an eggdrop.
The question is can this TCL be replicated?
[19:25] <Data> Your IRC Client is susceptible to hacks! Upgrade or get a new client. See https://www.exploit-db.com/exploits/46392 Upgrade to 7.55+ @ www.mirc.com or !Search mirc in #Chat
THANK YOU IN ADVANCE FOR YOUR RESPONSES |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Tue Jul 13, 2021 2:53 am Post subject: |
|
|
Yes it can. The difficulty is to determine how to set versions and check them.
I think it's possible with a kind of dataset containing clients, minimal version and message to send.
I'll try to look about that in the day. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Tue Jul 13, 2021 6:24 am Post subject: |
|
|
Few hours after
Here is a short code, it actually works on join channel, I let you adapt the way you want to have it working.
| Code: | namespace eval vwarn {
dict set minver mirc {min 7.55 msg "Please update to mIRC 7.55" }
dict set minver weechat {min 3.1 msg "New version 4.0 is better"}
bind join - * ::vwarn::join
proc join {nick uhost handle chan} {
if {[isbotnick $nick]} { return 0 }
putserv "PRIVMSG $nick :\001VERSION\001"
}
bind ctcr - VERSION ::vwarn::check
proc check {nick uhost handle dest kw arg} {
foreach soft [dict keys $::vwarn::minver] {
if {[string match "*${soft}*" [string tolower $arg]]} {
regexp {(\d{1,}\.?\d{1,})} $arg - vnum
if {[package vcompare $vnum [dict get $::vwarn::minver $soft min]]==-1} {
putserv "PRIVMSG $nick :[dict get $::vwarn::minver $soft msg]"
}
}
}
}
} |
The important thing is the lines begining with dict set minver, which allows you to add client (in my case mirc and weechat), the minimal version (7.55 and 3.1) and the associated message. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Last edited by CrazyCat on Wed Jul 14, 2021 3:40 am; edited 1 time in total |
|
| Back to top |
|
 |
ORATEGOD Voice
Joined: 08 Jun 2020 Posts: 32
|
Posted: Tue Jul 13, 2021 8:53 pm Post subject: |
|
|
works 100% ... as always I appreciate all the help they offer to all users.
(excuse my bad English) |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Jul 14, 2021 3:03 am Post subject: |
|
|
Please change:
| Code: |
if {[string tolower $nick] eq [string tolower $::botnick]} { return 0 }
|
to:
| Code: |
if {[isbotnick $nick]} return
|
cos bothers my OCD.  _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Wed Jul 14, 2021 3:42 am Post subject: |
|
|
Can't see what you're talking about (thanks edit )
I must stop paste© starts of my proc from really old scripts I made  _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
|