To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.
Modtcl: Difference between revisions
>Paccer |
m Redo warning about RCE. |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:modtcl}} | {{DISPLAYTITLE:modtcl}} | ||
{{Core Module | version = 1.0}} | {{Core Module | version = 1.0}} | ||
{{ambox | type = delete | text = This module has a RCE exploit that has been in ZNC since at least version 0.094 (2009) - 1.9.0 (2024). The RCE has been fixed in version 1.9.1. If you are compiling from source either unload the module or update to 1.9.1. If you are using a OS package install with a older versions of ZNC you need to verify if your distro has backported the fix and install a newer version of the module with your package manager. }} | |||
[[modtcl]] allows you to run tcl scripts in ZNC. | [[modtcl]] allows you to run tcl scripts in ZNC. | ||
Line 23: | Line 26: | ||
== modtcl.tcl and binds.tcl == | == modtcl.tcl and binds.tcl == | ||
modtcl comes with modtcl.tcl and binds.tcl (they help emulate an eggdrop) To load these files set the module argument to the absolute path of the file: | modtcl comes with modtcl.tcl and binds.tcl (they help emulate an eggdrop) To load these files set the module argument to the absolute path of the file: | ||
/msg *status loadmod modtcl /path/to/modtcl.tcl | /msg *status loadmod modtcl /path/to/modtcl.tcl | ||
By default modtcl.tcl loads binds.tcl aswell and you can add your own script files to be loaded under the "load other script files" section near the end of modtcl.tcl. | By default modtcl.tcl loads binds.tcl aswell and you can add your own script files to be loaded under the "load other script files" section near the end of modtcl.tcl. |
Latest revision as of 19:59, 10 November 2024
This module is a part of ZNC. This module is shipped with ZNC by default. If you have the right "LoadMod" you can activate it with /znc LoadMod modtcl The code for this module can be found here. This module is part of ZNC since Version 1.0 |
This module has a RCE exploit that has been in ZNC since at least version 0.094 (2009) - 1.9.0 (2024). The RCE has been fixed in version 1.9.1. If you are compiling from source either unload the module or update to 1.9.1. If you are using a OS package install with a older versions of ZNC you need to verify if your distro has backported the fix and install a newer version of the module with your package manager. |
modtcl allows you to run tcl scripts in ZNC.
No, your eggdrop scripts will not work. Only few very basic ones will, if you use modtcl.tcl like explained below.
Compiling
First, you need to use ./configure with option --enable-tcl.
Usage
Arguments
This network module takes one optional arguments. The argument is the absolute path to a tcl script file.
Read loading modules to learn more about loading modules.
modtcl allows you to run any tcl code via:
/msg *modtcl tcl-code /msg *modtcl format [string repe "%c" 10] 90 78 67 32 114 111 99 107 115 33
If you have modtcl.tcl loaded you can rehash your loaded scripts with:
/msg *modtcl rehash
modtcl.tcl and binds.tcl
modtcl comes with modtcl.tcl and binds.tcl (they help emulate an eggdrop) To load these files set the module argument to the absolute path of the file:
/msg *status loadmod modtcl /path/to/modtcl.tcl
By default modtcl.tcl loads binds.tcl aswell and you can add your own script files to be loaded under the "load other script files" section near the end of modtcl.tcl.
After you load them you can use some eggdrop commands:
/msg *modtcl putquick "privmsg #znc :testing" /msg *modtcl bind pub - !ping pubPing; proc pubPing {nick uhost handle chan arg} {putquick "privmsg $chan :$nick: pong"}