|
|
发表于 2020-10-11 16:00:55
|
显示全部楼层
我把要加密的代码替换成生成出来的set cam_post_dir [MOM_ask_env_var UGII_CAM_POST_DIR]
- B& u* c# c5 B" }8 |set this_post_dir "[file dirname [info script]]"$ m* J& r! y. }
set encrypted_post_file "[file rootname [info script]]ab_crypt.txt"
, z/ t% C: H) n" W! ?! M' \, ]if { ![file exists $encrypted_post_file] } {
, v4 t0 [. F/ [( b set __msg "ERROR in[info script] :"$encrypted_post_file" is not found."
$ C) i0 F9 p$ I; R MOM_abort $__msg6 u1 g; z9 \, i0 M+ j% t( a
}
9 {( A1 ~2 Z' U8 b' K3 v8 t4 W2 B" W, z; w1 S6 K4 Z+ k
########################################################################
) _& o* ], V5 ]/ X6 W set x64 0 ; set path "" ;+ M, P, N! \5 ?" E) o1 y5 I" i
set root_dir [MOM_ask_env_var UGII_ROOT_DIR] ;( ^3 c0 X% ~1 T* B2 Q# Z: H
set os_64 ${root_dir}ugtcl.dll
, r: t( f3 c$ v! q3 S. F if { [file exists $os_64] } {- o# u$ H0 V" B8 l& F+ W
set sz [ file size $os_64 ] ; set sz [ expr double($sz) ]
' U7 }" |. h+ T/ s" h+ ~6 p7 H. ^ if {$sz>600000.} { set x64 1 ; } else { set x64 0 ; }/ g1 @# m6 Y7 P+ q3 C8 c& p
} else { set x64 1 ; }1 B2 T+ o, L& i( ]% r0 S
if {$x64} { set encload_dll ${path}encload_x64.dll ; } else { set encload_dll ${path}encload_x32.dll ; }6 ~6 h' y; g1 P6 t2 |
if { ![file exists ${cam_post_dir}$encload_dll] } {7 a0 R) u+ H) p& b+ G4 ?! _7 _
set __msg "ERROR in[info script] :Shared library "Encload" is not found in ${cam_post_dir}."1 [0 c I) r+ p) m/ L" s
MOM_abort $__msg& l# I' `2 A& a* L
}
! Y* ^( Z C) G
5 h. ~/ O4 z4 c" {" m2 `7 T7 F2 }########################################################################
9 X8 T% p/ @. a. |+ Y$ u* h7 lcatch {
8 }3 g0 H: I! s9 f3 y( {1 j MOM_run_user_function ${cam_post_dir}$encload_dll ufusr6 ~, f3 T! t5 L3 X3 |: S5 M! L
encload [file nativename $encrypted_post_file]2 J7 I% p* z* z3 o. B
}. s8 Y! a+ o& P2 ?% W" o' E* N
但是不成功! 还请大佬教一下 |
|