GithubHelp home page GithubHelp logo

phase / asmifier Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 4.0 63 KB

Web interface for ASMifier

Home Page: https://asmifier.herokuapp.com/

License: Mozilla Public License 2.0

Kotlin 55.09% HTML 44.91%

asmifier's Introduction

asmifier

asmifier is a web interface for ASM's ASMifier.

wut?

  1. You give me Java code.
  2. I compile the Java code to a class file.
  3. I run the class file through ASMifier.
  4. I give you the result.

asmifier's People

Contributors

emavgl avatar phase avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

asmifier's Issues

Missing method names

Minimal reproducible example:

public class MainClass{

}

Result:

import java.util.*;
import org.objectweb.asm.*;
public class MainClassDump implements Opcodes {
    
    public static byte[] dump () throws Exception {
        
        ClassWriter cw = new ClassWriter(0);
        FieldVisitor fv;
        MethodVisitor mv;
        AnnotationVisitor av0;
        
        cw.visit(52, ACC_PUBLIC + ACC_SUPER, "MainClass", null, "java/lang/Object", null);
        
        {
            mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null);
            mv.visitCode();
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "", "()V", false);
            mv.visitInsn(RETURN);
            mv.visitMaxs(1, 1);
            mv.visitEnd();
        }
        cw.visitEnd();
        
        return cw.toByteArray();
    }
}

Problem is mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null); and mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "", "()V", false);

Bug report: Missing <init> parameter when instantiate an object

Hi, there is an issue with your web application.
It works fine except when it has to deal with an object instantiation.

For example, assume we use this input:

import java.util.Date;

class ExampleClass
{  
    public static void main(String args[])
    {
        Date d = new Date();
    }
}

The output will include the line:

mv.visitMethodInsn(INVOKESPECIAL, "java/util/Date", "", "()V", false);

The parameter <init> is missing, I assume that string is interpreted by the browser as a HTML tag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.