|
发表于 2020-10-11 16:00:55
|
显示全部楼层
我把要加密的代码替换成生成出来的set cam_post_dir [MOM_ask_env_var UGII_CAM_POST_DIR]* g8 A q9 R, t
set this_post_dir "[file dirname [info script]]"3 [: H( p; e: A. I- F1 I' i4 K
set encrypted_post_file "[file rootname [info script]]ab_crypt.txt", A; d p ^' n4 T7 @$ }% P
if { ![file exists $encrypted_post_file] } {
2 M# o5 q, n8 j( s! ]! p5 ]4 j set __msg "ERROR in[info script] :"$encrypted_post_file" is not found."
: n& x/ a6 e5 ?" ^0 Z3 x MOM_abort $__msg
+ m1 Z! @% X* y' D+ z4 G& i}
2 M$ U4 C8 d( P8 v4 b9 j% I* }( ^" L9 g% I
########################################################################
6 s+ e1 g }5 }" F/ O set x64 0 ; set path "" ;
% I9 e% |( A+ C0 r set root_dir [MOM_ask_env_var UGII_ROOT_DIR] ;
3 m1 \" X& Z9 O; U7 R; R% H8 K9 @ set os_64 ${root_dir}ugtcl.dll
- S, s$ g" L/ }0 `: } if { [file exists $os_64] } {0 ]3 _/ W* {9 o
set sz [ file size $os_64 ] ; set sz [ expr double($sz) ]
?3 o# w2 t" H! z7 Q/ f if {$sz>600000.} { set x64 1 ; } else { set x64 0 ; }+ Q" N3 c0 c& M! D) b/ s
} else { set x64 1 ; }/ Q8 ]; P* p; e
if {$x64} { set encload_dll ${path}encload_x64.dll ; } else { set encload_dll ${path}encload_x32.dll ; }4 e( Y5 F! @% d5 b M
if { ![file exists ${cam_post_dir}$encload_dll] } {+ Z! P2 G& ~$ W1 `! e$ ]
set __msg "ERROR in[info script] :Shared library "Encload" is not found in ${cam_post_dir}."
, a8 f, u/ u' Q8 ]! L2 |# z" P MOM_abort $__msg
W& U$ C4 b$ b# y2 Z7 O9 E# ~ }
6 t& S9 c$ j+ c4 o$ d" E , }7 z' c& `! I7 F7 h
########################################################################, l8 y6 m+ [/ c- h$ g- _3 X( q h
catch {+ @7 `6 ^' i5 L$ d# e* N
MOM_run_user_function ${cam_post_dir}$encload_dll ufusr
2 V/ L2 G/ d* h, Y* {* f% _ encload [file nativename $encrypted_post_file]
$ R! }) l. e& C; L, R1 x) }}
! H$ T$ w+ t, k/ f A: E/ O 但是不成功! 还请大佬教一下 |
|