|
|
发表于 2020-10-11 16:00:55
|
显示全部楼层
我把要加密的代码替换成生成出来的set cam_post_dir [MOM_ask_env_var UGII_CAM_POST_DIR]
" l! D# j' E# t; C" @2 E& ?8 gset this_post_dir "[file dirname [info script]]"; o& j- o# H$ x
set encrypted_post_file "[file rootname [info script]]ab_crypt.txt"
! H5 i( i% z* c6 N- Mif { ![file exists $encrypted_post_file] } {1 Z2 ~% B2 t& A2 h* Z! {, S, N
set __msg "ERROR in[info script] :"$encrypted_post_file" is not found."2 M" P( L. o ]
MOM_abort $__msg
0 M1 U6 |: M/ _7 b1 N! Z}2 l9 |% x. \+ U
0 f8 E, I* Y1 r########################################################################
) M- U& F# \, a* S, h set x64 0 ; set path "" ;
, J* t! r3 C. X+ W set root_dir [MOM_ask_env_var UGII_ROOT_DIR] ;
* U, {+ }7 L3 T5 W5 n. r. Q2 \0 U set os_64 ${root_dir}ugtcl.dll
3 H. S7 X, s8 S# U: b8 [( C7 v if { [file exists $os_64] } {
. D- B- j' o& g3 y# a6 A, i, d& m set sz [ file size $os_64 ] ; set sz [ expr double($sz) ]
. X7 l8 ~' ]5 z+ I& B) U3 g if {$sz>600000.} { set x64 1 ; } else { set x64 0 ; }
/ r9 M: ]+ ^/ A2 v G } else { set x64 1 ; }5 Z' S2 P& o* g: y" S5 d' ^
if {$x64} { set encload_dll ${path}encload_x64.dll ; } else { set encload_dll ${path}encload_x32.dll ; }9 \' C" ?$ ^) J: ^
if { ![file exists ${cam_post_dir}$encload_dll] } {0 z" K0 ~- R5 x/ y) L
set __msg "ERROR in[info script] :Shared library "Encload" is not found in ${cam_post_dir}."! ?4 s3 f( G. r1 `' s- J
MOM_abort $__msg
' {, o8 e( ?- \) o' u( Q }1 H1 @) E1 o5 g: p3 K9 i2 `
1 j7 ?; c% }- i$ |3 i9 R########################################################################
& k, ` t5 S! S6 |) {$ N4 ecatch {
9 \5 g/ r" z* x8 H- n3 a6 u MOM_run_user_function ${cam_post_dir}$encload_dll ufusr( P, x8 g; _% Z: @
encload [file nativename $encrypted_post_file]% \9 Q: ~* T& O) D
}
: s B- }+ x( `. Y2 l& A 但是不成功! 还请大佬教一下 |
|