File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
jvm/JVMAgent/src/main/java/com/security/smithloader Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -244,8 +244,9 @@ public String call() throws Exception {
244
244
SmithAgentLogger .logger .warning (proberPath + " loading fail!" );
245
245
}
246
246
else {
247
- System .setProperty ("smith.rasp" , probeVersion +"-" +checksumStr );
248
247
System .setProperty ("smith.status" , "attach" );
248
+ System .setProperty ("smith.rasp" , probeVersion +"-" +checksumStr );
249
+
249
250
System .setProperty ("rasp.probe" , "smith" );
250
251
}
251
252
}
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ use log::*;
4
4
use regex:: Regex ;
5
5
use std:: process:: Command ;
6
6
use std:: fs;
7
-
7
+ use std:: thread;
8
+ use std:: time:: Duration ;
8
9
use crate :: async_command:: run_async_process;
9
10
use crate :: process:: ProcessInfo ;
10
11
use crate :: runtime:: { ProbeCopy , ProbeState , ProbeStateInspect } ;
@@ -71,7 +72,7 @@ pub fn java_attach(pid: i32) -> Result<bool> {
71
72
if err. len ( ) != 0 {
72
73
info ! ( "{}" , & err) ;
73
74
}
74
- // thread::sleep(Duration::from_millis(100 ));
75
+ std :: thread:: sleep ( Duration :: from_millis ( 500 ) ) ;
75
76
match check_result ( pid, "attach" ) {
76
77
Ok ( _) => {
77
78
return Ok ( true ) ;
Original file line number Diff line number Diff line change @@ -352,8 +352,9 @@ impl RASPManager {
352
352
diff_ns = value;
353
353
if diff_ns {
354
354
let to = format ! ( "{}{}" , root_dir. clone( ) , settings:: RASP_JAVA_AGENT_BIN ( ) ) ;
355
+ self . copy_file_from_to_dest ( settings:: RASP_JAVA_JATTACH_BIN ( ) , root_dir. clone ( ) ) ;
355
356
self . copy_file_from_to_dest ( settings:: RASP_JAVA_AGENT_BIN ( ) , root_dir. clone ( ) ) ;
356
- info ! ( "copy from SmithAgent.jar to {}" , to. clone( ) ) ;
357
+ info ! ( "copy from jattach/ SmithAgent.jar to {}" , to. clone( ) ) ;
357
358
}
358
359
}
359
360
Err ( e) => {
You can’t perform that action at this time.
0 commit comments