This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

CTCP VERSION

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
O
ORATEGOD
Voice
Posts: 39
Joined: Mon Jun 08, 2020 5:50 pm

CTCP VERSION

Post by ORATEGOD »

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
User avatar
CrazyCat
Revered One
Posts: 1217
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

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.
User avatar
CrazyCat
Revered One
Posts: 1217
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

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: Select all

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.
Last edited by CrazyCat on Wed Jul 14, 2021 3:40 am, edited 1 time in total.
O
ORATEGOD
Voice
Posts: 39
Joined: Mon Jun 08, 2020 5:50 pm

Post by ORATEGOD »

works 100% ... as always I appreciate all the help they offer to all users.

(excuse my bad English)
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Please change:

Code: Select all

if {[string tolower $nick] eq [string tolower $::botnick]} { return 0 } 
to:

Code: Select all

if {[isbotnick $nick]} return
cos bothers my OCD. :lol:
Once the game is over, the king and the pawn go back in the same box.
User avatar
CrazyCat
Revered One
Posts: 1217
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Can't see what you're talking about :lol: (thanks edit :D)

I must stop paste&copy starts of my proc from really old scripts I made :)
Post Reply