|
|
发表于 2020-10-11 16:00:55
|
显示全部楼层
我把要加密的代码替换成生成出来的set cam_post_dir [MOM_ask_env_var UGII_CAM_POST_DIR]1 B( H8 T2 S" S% p" Q
set this_post_dir "[file dirname [info script]]"4 m8 [4 H' A/ Q
set encrypted_post_file "[file rootname [info script]]ab_crypt.txt"% n! b( G) ^3 V1 i5 I+ O% g7 M) H
if { ![file exists $encrypted_post_file] } {
3 z/ @- E* G& u' K6 h& Q+ E4 e* h set __msg "ERROR in[info script] :"$encrypted_post_file" is not found."' t8 k5 x2 D3 J$ V! L1 ^
MOM_abort $__msg7 s k1 X+ e, W# I/ G" T
}: Y/ w! H8 l8 l) U. R( ^
+ J" q# L( T f
########################################################################
1 J) U: `5 V) |# ~. u set x64 0 ; set path "" ;
3 f$ ]0 C4 P) ]( n! r, C set root_dir [MOM_ask_env_var UGII_ROOT_DIR] ;7 m; n6 `/ ]7 y9 }* V. ^; u
set os_64 ${root_dir}ugtcl.dll3 C+ {- S+ v2 g6 P0 E
if { [file exists $os_64] } {( Q, U% `4 q6 ^! Q) B' e8 b' v
set sz [ file size $os_64 ] ; set sz [ expr double($sz) ]
7 c. A0 \7 U& b# B+ J if {$sz>600000.} { set x64 1 ; } else { set x64 0 ; }
5 [0 D" n' R" G; r } else { set x64 1 ; }; ^7 \. ^, L: I1 ? ] h l9 M7 d
if {$x64} { set encload_dll ${path}encload_x64.dll ; } else { set encload_dll ${path}encload_x32.dll ; }/ i; u* Q: f$ j2 A3 j
if { ![file exists ${cam_post_dir}$encload_dll] } {
/ M. A$ x' Z! t set __msg "ERROR in[info script] :Shared library "Encload" is not found in ${cam_post_dir}."
/ g* k. t1 b: r MOM_abort $__msg4 E K& i3 k4 }& m) R3 G1 Z
}
2 q4 E% e9 t; O7 s: s" H : _, m7 q! v0 X& ^2 n* a
########################################################################0 s/ o/ k( E5 _2 W
catch {
6 Z! J7 t+ D+ y0 u MOM_run_user_function ${cam_post_dir}$encload_dll ufusr
' T) Q& y1 n7 z6 l encload [file nativename $encrypted_post_file]
9 ^. g* n) y: M( Z}
( D8 A1 ]% W! B2 R2 V 但是不成功! 还请大佬教一下 |
|