egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

cbc_functions.tcl errors upon loading.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
stomppa
Voice


Joined: 19 Jul 2020
Posts: 2

PostPosted: Sun Jul 19, 2020 2:24 pm    Post subject: cbc_functions.tcl errors upon loading. Reply with quote

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
View user's profile Send private message
CrazyCat
Owner


Joined: 13 Jan 2002
Posts: 848
Location: France

PostPosted: Sun Jul 19, 2020 3:25 pm    Post subject: Reply with quote

Did you enable blowfish in your eggdrop.conf ?
_________________
https://www.eggdrop.fr
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
stomppa
Voice


Joined: 19 Jul 2020
Posts: 2

PostPosted: Sun Jul 19, 2020 4:22 pm    Post subject: Reply with quote

yep. I seem to have solved the issue by installing the latest version to tcllib.
Back to top
View user's profile Send private message
scattywatty
Voice


Joined: 18 Oct 2020
Posts: 2

PostPosted: Sun Oct 18, 2020 11:25 am    Post subject: Reply with quote

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
View user's profile Send private message
CrazyCat
Owner


Joined: 13 Jan 2002
Posts: 848
Location: France

PostPosted: Sun Oct 18, 2020 5:48 pm    Post subject: Reply with quote

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
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
scattywatty
Voice


Joined: 18 Oct 2020
Posts: 2

PostPosted: Sun Oct 18, 2020 9:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
iller
Voice


Joined: 26 Jan 2007
Posts: 1

PostPosted: Thu Oct 29, 2020 2:53 pm    Post subject: Reply with quote

Copy the /lib/random from the script to /usr/lib/ then it works
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber