ASM is a Java library used for JVM bytecode manipulation and creation. http://asm.ow2.org/

learn more… | top users | synonyms

0
votes
0answers
27 views

Gettings method arguments with ASM

I found some examples that show me the location of certain method calls using a MethodAdapter: public void visitMethodInsn(int opcode, String owner, String name, String desc) { if ...
16
votes
1answer
178 views

Is it possible to store secrets on the stack in java?

In Java the old way of storing a secret, such as a password, was to use char[] as you could overwrite its data when you were done with it. However this has since been shown to be insecure as the ...
0
votes
0answers
30 views

Is there a Java bytecode debugging tool which seems like OllyDbg on windows platform?

Is there a Java bytecode debugging tool which seems like OllyDbg on windows platform? I have a bunch of java bytecode instructions at hand and I want to know how to debug them efficiently. I wonder ...
2
votes
2answers
73 views

Java Bytecode instrumentation with ASM: VerifyError on code injection at INVOKESPECIAL instructions

I'm quite new in bytecode injection. Until now, I was able to get everything what I wanted by exhaustive research and painful trial and error :-) But I seem to have reached my limits with the ...
0
votes
0answers
28 views

Getting an error using Krakatau disassembler/assembler

I'm getting this error when trying to run my modified class http://oi43.tinypic.com/sbmw5g.jpg I changed a string from "www." to "wwwh7." so from what I've read on bytecode editing sites, this ...
3
votes
2answers
77 views

How can I add code to message before every return?

I'm currently trying to generate code through the wonderfully crafted java-asm library (Version 4). More specifically, I want to append code to the end of a method, just before every return call. I ...
0
votes
1answer
36 views

Detect if the method in an invoke instruction is native, or not, in ASM/java bytecode

Is there a way to know if the method in an invoke instruction in bytecode is a native method or not? I am looking for an ASM specific solution. The visitMethodInsn(int opcode, ...
1
vote
1answer
50 views

How do I get and use a class type from a Java class that I've dynamically created at runtime using ASM?

I'd like extend the class, get a class literal, use it as a type parameter, or cast to it. I already have a workaround, but I'm still curious. Currently I can define a class at runtime with ASM, ...
2
votes
2answers
78 views

Invisible java bytecode lines

I am wondering why the line numbers of Java Bytecode are not consecutive. What happens for example in the (not listed) lines 2 and 3 of the following getter? public java.lang.String getX(); Code: ...
0
votes
1answer
54 views

Java byte code instrumentation with an external library

I am using ASM with java agents. I have the following problem. Whenever I see a "PUTFIELD" instruction within a method call, I want call a method from my agent library. if (opcode == PUTFIELD) { ...
3
votes
1answer
40 views

IJVM ILOAD instruction does not load proper value

I am writing a simple program to compute the absolute value of a few integers in IJVM for the MIC1 architecture. I am using the emulator located here. Here is the code: BIPUSH 0xC0 DUP ISTORE i1 ...
0
votes
1answer
49 views

Works in sbt but not raw Java: after using `javac` to compile a .class file, why can't `java` find it?

I used ObjectWeb's ASMifier to get a 'HelloDump.java', and added classloader and a main method to load and run a spoofed "HelloWorld". If I run 'HelloDump.java' in the build tool sbt, everything ...
0
votes
0answers
34 views

How to get methods within HttpUrlConnection to call a method of my own

SOLVED I am trying to change the bytecode of the methods within java.net.HttpUrlConnection to call a method of my own. I am doing this runtime, using a javaagent and asm. Unfortunately I am getting a ...
1
vote
1answer
50 views

Remove LineNumberTable and filter LocalVariableTable?

Some frameworks read method argument names using debug information from the bytecode. But debug information contains much more. In order to minimize class size (just wondering), we might remove all ...
0
votes
1answer
165 views

ASM ByteCode - stackTrace of an Exception

I am using java Instrumentation and ASM ByteCode Library for developing a Javaagent. How to get Runtime exception thrown by a Method? Attached the Code. Here am getting whether the method is ...

1 2 3 4 5 11
15 30 50 per page