|
发表于 2020-10-11 16:00:55
|
显示全部楼层
我把要加密的代码替换成生成出来的set cam_post_dir [MOM_ask_env_var UGII_CAM_POST_DIR]
" ^) F" x4 [ q! |$ Aset this_post_dir "[file dirname [info script]]", U9 A% F3 Q* b4 M, O0 i! s, O
set encrypted_post_file "[file rootname [info script]]ab_crypt.txt"
: {3 ^ D! @# wif { ![file exists $encrypted_post_file] } {9 J" J# Y( P% X
set __msg "ERROR in[info script] :"$encrypted_post_file" is not found."
3 R/ u, Z0 _$ t9 |8 [ MOM_abort $__msg7 G; d/ L y, a0 e1 X) G h
}8 R0 l/ ?! |7 j
( e6 C& {# E. Y) [% I0 K5 H3 S; w" D2 M+ N
########################################################################
4 w) P2 [3 K4 o0 r M G set x64 0 ; set path "" ;
* L p$ f- v9 z- {( b Z set root_dir [MOM_ask_env_var UGII_ROOT_DIR] ;9 R/ S- t( ]) H6 n
set os_64 ${root_dir}ugtcl.dll
7 O5 b# \! ~8 @( y2 F0 R if { [file exists $os_64] } {
! {2 t8 G/ i. C; N, j set sz [ file size $os_64 ] ; set sz [ expr double($sz) ]
4 o, q0 z9 g$ ~6 ?1 d if {$sz>600000.} { set x64 1 ; } else { set x64 0 ; }2 \) \6 h# K: {6 C
} else { set x64 1 ; } w( y6 u3 K: U
if {$x64} { set encload_dll ${path}encload_x64.dll ; } else { set encload_dll ${path}encload_x32.dll ; }
9 K) m$ c7 L. \- q7 p if { ![file exists ${cam_post_dir}$encload_dll] } {1 d3 H! Y( |6 Y& w5 D+ R$ Y- r2 J
set __msg "ERROR in[info script] :Shared library "Encload" is not found in ${cam_post_dir}."1 {( K; Y5 a8 h# _% X: `$ h
MOM_abort $__msg' n. K: x: j, e" n7 o
}
7 V' l1 d! M3 x4 ?
0 y% \& @+ Q2 a- r4 F& c########################################################################% l1 [$ @2 ~8 b. p7 ~
catch {
! e! z! U) H$ Y3 `* \ MOM_run_user_function ${cam_post_dir}$encload_dll ufusr( H; r z* h, {7 b) D& s
encload [file nativename $encrypted_post_file]# Y3 L \( O! i
}7 H% O/ I0 }& s$ ^
但是不成功! 还请大佬教一下 |
|