|
发表于 2020-10-11 16:00:55
|
显示全部楼层
我把要加密的代码替换成生成出来的set cam_post_dir [MOM_ask_env_var UGII_CAM_POST_DIR]; E' I7 R; H" T/ P% I
set this_post_dir "[file dirname [info script]]"
) P4 N( X" B, L1 J; y- Hset encrypted_post_file "[file rootname [info script]]ab_crypt.txt"
' k9 a& n4 l, {3 gif { ![file exists $encrypted_post_file] } {
9 d$ ]4 i. k+ T1 n set __msg "ERROR in[info script] :"$encrypted_post_file" is not found."
/ ^: I. P* i% _( ^2 `7 K7 [/ ] MOM_abort $__msg/ g! ]% G7 `5 P* y
}$ o% L) ]& g9 T; g* v! x
$ V4 t( n& ?; x g7 F6 s
########################################################################4 r, ^) v: H1 j+ B
set x64 0 ; set path "" ;
; Z* M: B% s' p. L set root_dir [MOM_ask_env_var UGII_ROOT_DIR] ;
0 U" g8 K7 W3 A3 O: u set os_64 ${root_dir}ugtcl.dll M% z+ a: @" N6 Z/ K/ }8 O
if { [file exists $os_64] } {2 a4 C) s7 ?& Q" n& n& A& [! \
set sz [ file size $os_64 ] ; set sz [ expr double($sz) ]
2 a4 ?0 `$ `+ h: Y if {$sz>600000.} { set x64 1 ; } else { set x64 0 ; }
2 |9 c, g) H' A u: p } else { set x64 1 ; }; p( F. F: G3 C5 ^4 ~0 V
if {$x64} { set encload_dll ${path}encload_x64.dll ; } else { set encload_dll ${path}encload_x32.dll ; }
* ?9 H+ f/ y7 |6 e4 S% C/ h% L if { ![file exists ${cam_post_dir}$encload_dll] } {
, {5 S3 r* c' O- v set __msg "ERROR in[info script] :Shared library "Encload" is not found in ${cam_post_dir}."
( _) K6 q1 T- e MOM_abort $__msg
' Y |6 k8 |) ~: Z9 t8 Z7 @8 z- ] }
h; t$ w; l, c6 q& y # V) W+ c# N4 H
########################################################################
' t- m3 E- l! {$ D4 [4 o9 U( Mcatch {
) M# x4 f3 }/ R9 z! _/ x; { MOM_run_user_function ${cam_post_dir}$encload_dll ufusr7 I0 g+ X! o( D
encload [file nativename $encrypted_post_file]) w5 b9 Q! {/ U/ H
}/ F+ z% Y3 G" M4 v+ s
但是不成功! 还请大佬教一下 |
|