icedog022 / javasnoop

Automatically exported from code.google.com/p/javasnoop
0 stars 0 forks source link

Access to parameters in Custom Script #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Attach to any Java Program
2. Hook any method with parameters
3. Check "Tamper with parameters" and write a simple 
System.out.println(ParameterName); 

What is the expected output? What do you see instead?
The expected output is the value of the parameter. Insted of that, the 
following message is shown:

Failure establishing hooks: javassist.CannotCompileException [source error] no 
such class: ParameterName

What version of the product are you using? On what operating system?
I tested it with JavaSnoop 1.0 Final and 1.1 RC1 on Windows XP SP3

Please provide any additional information below.
All the other options as Print Parameters, Tamper with Parameters and Pause 
Program works fine.

Original issue reported on code.google.com by mafebr...@gmail.com on 18 Dec 2011 at 4:41

GoogleCodeExporter commented 8 years ago
Ok, it seems I found it. You can use $1, $2, ... to access the parameters. 

Original comment by mafebr...@gmail.com on 18 Dec 2011 at 5:26

GoogleCodeExporter commented 8 years ago

Original comment by arshan.d...@gmail.com on 29 Mar 2012 at 4:44

GoogleCodeExporter commented 8 years ago
Just in case anyone else finds this trying to figure out how to access 
parameters, I couldn't find this in any documentation so thought I'd add it 
here.

After the hook has run, the return value can be access in $_ . (Therefore, you 
can only access it at the end of the method run.) 

Original comment by Nathan.K...@gmail.com on 24 Oct 2013 at 9:05