| View previous topic :: View next topic |
| Author |
Message |
stomppa Voice
Joined: 19 Jul 2020 Posts: 2
|
Posted: Sun Jul 19, 2020 2:24 pm Post subject: cbc_functions.tcl errors upon loading. |
|
|
Currently using eggdrop v1.9.0 with tcl 8.6.
Trying to load cbc_functions.tcl from the Mircryption package and encountering the following issue. The script readme says to place their provided lib folder into the /eggdrop/lib directory, but i don't see any such directory in my current eggdrop directory.
It also says the blowfish package cannot be found but other scripts that also use blowfish have no problem loading. Perhaps I'm missing something. Any help would be greatly appreciated.
| Quote: |
McEggdrop TCL Helper Functions - settings file loaded.
McEggdrop TCL Helper Functions v1.00.29 loaded (replyencrypt noplainreply meowreply automagicon).
Tcl error in file 'testdrop.conf':
can't find package blowfish
while executing
"package require blowfish"
(file "scripts/cbc_functions.tcl" line 14)
invoked from within
"source scripts/cbc_functions.tcl"
(file "testdrop.conf" line 1652)
* CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
|
contents of the .tcl below.
| Code: |
#################################################################################
# CBC FUNCTIONS v1.0 for Mircryption 1.11+ by B0unTy © 2005
# require TCL 8.4.x+
#
# using : Blowfish Module v1.3 from sourceforge tcllib
# Base64 Module v2.3.1 from sourceforge tcllib
# mt_rand Module v1.0.0 from Frank Pilhofer
#
# updated nov 4, 2006 - bugfix by Ripclaw for cbc_decrypt
#
#################################################################################
#### REQUIRED PACKAGES FOR CBC FUNCTIONS ####
package require blowfish
package require base64
package require mt_rand
#### CBC ENCRYPTION FUNCTION ####
proc cbc_encrypt {key text} {
mt::seed [expr int(rand()*1000000)]
set iv [string range [mt::rand] end-7 end]
set cbc [::base64::encode -maxlen 0 "$iv[::blowfish::blowfish -mode cbc -dir enc -iv $iv -key $key -- $text]"]
return $cbc
}
#### CBC DECRYPTION FUNCTION ####
proc cbc_decrypt {key text} {
set x [::base64::decode [string range $text 0 end]]
binary scan [::blowfish::blowfish -mode cbc -dir dec -iv [string range $x 0 7] -key $key -- [string range $x 8 end]] A* plain
return "$plain"
}
|
|
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
|
| Back to top |
|
 |
stomppa Voice
Joined: 19 Jul 2020 Posts: 2
|
Posted: Sun Jul 19, 2020 4:22 pm Post subject: |
|
|
| yep. I seem to have solved the issue by installing the latest version to tcllib. |
|
| Back to top |
|
 |
scattywatty Voice
Joined: 18 Oct 2020 Posts: 2
|
Posted: Sun Oct 18, 2020 11:25 am Post subject: |
|
|
running eggdrop 1.8.4 and have the latest tcllib installed, not sure if it's correct in doing so, but copied the lib dir to a new lib dir under my eggdrop install, I load the script and get mt_rand module not found. any better instructions on enabling this successfully? debian 10 is OS
thanks |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Sun Oct 18, 2020 5:48 pm Post subject: |
|
|
Why did you copy the tcllib directory ? It is shared, and I don't think you compile your eggdrop with the --tcllib-dir option.
mt_rand is a part of the random package, I'm not sure this package is in tcllib, so you have to downoload this package and add it in a place the eggdrop can find it _________________ 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 |
|
 |
scattywatty Voice
Joined: 18 Oct 2020 Posts: 2
|
Posted: Sun Oct 18, 2020 9:22 pm Post subject: |
|
|
| I copied the lib dir that was in the cbc_fucntions portion of the script, not from the main tcllib directory...I believe I need to compile the eggdrop with the tcllib option as you mentioned. I'll try that and reply back. Thank you CrazyCat |
|
| Back to top |
|
 |
iller Voice
Joined: 26 Jan 2007 Posts: 1
|
Posted: Thu Oct 29, 2020 2:53 pm Post subject: |
|
|
| Copy the /lib/random from the script to /usr/lib/ then it works |
|
| Back to top |
|
 |
|