|
发表于 2020-10-11 16:00:55
|
显示全部楼层
我把要加密的代码替换成生成出来的set cam_post_dir [MOM_ask_env_var UGII_CAM_POST_DIR]
/ \0 W% K5 V6 qset this_post_dir "[file dirname [info script]]"2 w v+ w: g$ c" C7 N" T
set encrypted_post_file "[file rootname [info script]]ab_crypt.txt"
6 @- N9 Y7 q7 z$ J2 a: C& B. yif { ![file exists $encrypted_post_file] } {8 l0 T) q8 q: [1 ^4 U/ A
set __msg "ERROR in[info script] :"$encrypted_post_file" is not found."
) Y/ Z; X; C6 t+ O/ n MOM_abort $__msg! w# u) Z% X( n2 J) Q
}' u$ I% l9 x) z
' M9 F/ N# h* H7 G" Y9 [
########################################################################+ n9 {& A3 t$ Z+ ?7 ]3 \
set x64 0 ; set path "" ;
9 x5 H+ E7 n3 j6 m9 B set root_dir [MOM_ask_env_var UGII_ROOT_DIR] ;; ^' R6 K9 Z9 Z x$ p3 G
set os_64 ${root_dir}ugtcl.dll
( E2 l% k, c: R- T if { [file exists $os_64] } {
1 \- J$ \2 \8 N2 B. z set sz [ file size $os_64 ] ; set sz [ expr double($sz) ]
! I% a" {* y. C if {$sz>600000.} { set x64 1 ; } else { set x64 0 ; }
0 {) o) \; G7 U0 ^" K0 F( g } else { set x64 1 ; }
1 t; G: F1 Q2 _" o" g: @8 a if {$x64} { set encload_dll ${path}encload_x64.dll ; } else { set encload_dll ${path}encload_x32.dll ; }3 l2 t6 f3 N) G6 s) l! V
if { ![file exists ${cam_post_dir}$encload_dll] } {5 d- ^6 y4 @9 v
set __msg "ERROR in[info script] :Shared library "Encload" is not found in ${cam_post_dir}."
6 _% S& n& Y" A8 D+ T9 D MOM_abort $__msg! m2 @9 U) m$ \9 C
}
9 c1 \7 I' }" `
3 _/ n! b2 }* _3 U8 Y########################################################################
S' _$ w ]/ Z( k/ Q8 }catch {1 _$ e" _. Y G- x" x; B, ^8 ]
MOM_run_user_function ${cam_post_dir}$encload_dll ufusr9 y3 ]1 }0 F! J8 K% x
encload [file nativename $encrypted_post_file]2 h9 h- `: X. ~3 L* }$ a
}# m4 M' l5 ?8 q" z' c4 G4 ^# [
但是不成功! 还请大佬教一下 |
|