FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
AsmImpl/src/main/java/com/github/fishjava/HelloWorld.java at master · fish-java/AsmImpl · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
fish-java
/
AsmImpl
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
2
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
AsmImpl
/
src
/
main
/
java
/
com
/
github
/
fishjava
/
HelloWorld.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (18 loc) · 785 Bytes
Breadcrumbs
AsmImpl
/
src
/
main
/
java
/
com
/
github
/
fishjava
/
HelloWorld.java
Copy path
File metadata and controls
24 lines (18 loc) · 785 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package
com
.
github
.
fishjava
;
import
java
.
io
.
FileOutputStream
;
import
org
.
objectweb
.
asm
.
ClassWriter
;
import
org
.
objectweb
.
asm
.
FieldVisitor
;
import
org
.
objectweb
.
asm
.
MethodVisitor
;
import
org
.
objectweb
.
asm
.
Opcodes
;
/**
* 看起其实也是非常简单,就是把class文件用一个数据结构来表示,然后修改它
*/
public
class
HelloWorld
extends
ClassLoader
implements
Opcodes
{
public
static
void
main
(
final
String
args
[])
throws
Exception
{
//直接将二进制流加载到内存中
//HelloWorld loader = new HelloWorld();
//Class<?> exampleClass = loader.defineClass("com.github.fish.Monkey", code, 0, code.length);
//通过反射调用main方法
//exampleClass.getMethods()[0].invoke(null, new Object[]{null});
}
}
Back
|
FazBrowse Home
|
New Git URL