• Stars
    star
    151
  • Rank 246,057 (Top 5 %)
  • Language
    Java
  • License
    Other
  • Created about 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Procyon java decompiler - Procyon is a binary star system in Canis Minor

This is an early fork of Procyon from bitbucket.

Procyon has since moved to github.

For the latest version, please see https://github.com/mstrobel/procyon

Procyon is a suite of Java metaprogramming tools focused on code generation and analysis. It includes the following libraries:

  1. Core Framework
  2. Reflection Framework
  3. Expressions Framework
  4. Compiler Toolset (Experimental)
  5. Java Decompiler

The Procyon libraries are available from Maven Central under group ID org.bitbucket.mstrobel.

Core Framework

The procyon-core framework contains common support classes used by the other Procyon APIs. Its facilities include string manipulation, collection extensions, filesystem/path utilities, freezable objects and collections, attached data stores, and some runtime type helpers.

Reflection Framework

The procyon-reflection framework provides a rich reflection and code generation API with full support for generics, wildcards, and other high-level Java type concepts. It is based on .NET's System.Reflection and System.Reflection.Emit APIs and is meant to address many of the shortcomings of the core Java reflection API, which offers rather limited and cumbersome support for generic type inspection. Its code generation facilities include a TypeBuilder, MethodBuilder, and a bytecode emitter.

For more information, see the Reflection Framework topic.

Example

:::java
final Type<Map> map = Type.of(Map.class);
final Type<?> rawMap = map.getErasedType();
final Type<Map<String, Integer>> boundMap = map.makeGenericType(Types.String, Types.Integer);

System.out.println(map.getDeclaredMethods().get(1));
System.out.println(rawMap.getDeclaredMethods().get(1));
System.out.println(boundMap.getDeclaredMethods().get(1));

System.out.println(boundMap.getGenericTypeParameters());
System.out.println(boundMap.getTypeArguments());

Output

:::text
public abstract V put(K, V)
public abstract Object put(Object, Object)
public abstract Integer put(String, Integer)
[K, V]
[java.lang.String, java.lang.Integer]

Expressions Framework

The procyon-expressions framework provides a more natural form of code generation. Rather than requiring bytecode to be emitted directly, as with procyon-reflection and other popular libraries like ASM, procyon-expressions enables code composition using declarative expression trees. These expression trees may then be compiled directly into callbacks or coupled with a MethodBuilder. The procyon-expressions API is almost a direct port of System.Linq.Expressions from .NET's Dynamic Language Runtime, minus the dynamic callsite support (and with more relaxed rules regarding type conversions).

Example

:::java    
//
// This lambda closes over a complex constant (a String array).
//

final ConstantExpression items = constant(
    new String[] { "one", "two", "three", "four", "five" }
);

//
// If written in Java, the constructed expression would look something like this:
// 
// () -> {
//     for (String item : <closure>items)
//         System.out.printf("Got item: %s\n", item);
// }
//

final ParameterExpression item = variable(Types.String, "item");

final LambdaExpression<Runnable> runnable = lambda(
    Type.of(Runnable.class),
    forEach(
        item,
        items,
        call(
            field(null, Types.System.getField("out")),
            "printf",
            constant("Got item: %s\n"),
            item
        )
    )
);

System.out.println(runnable);

final Runnable delegate = runnable.compile();

delegate.run();

Output

:::text
() => for (String item : [one, two, three, four, five])
    System.out.printf("Got item: %s\n", new Object[] { item })

Got item: one
Got item: two
Got item: three
Got item: four
Got item: five

Compiler Toolset

The procyon-compilertools project is a work in progress that includes:

  1. Class metadata and bytecode inspection/manipulation facilities based on Mono.Cecil
  2. An optimization and decompiler framework based on ILSpy

The Compiler Toolset is still early in development and subject to change.

Decompiler Front-End

procyon-decompiler is a standalone front-end for the Java decompiler included in procyon-compilertools. All dependencies are embedded in the JAR for easy redistribution. For more information about the decompiler, see the Java Decompiler wiki page.

Powered by Procyon

Check out these third party products based on Procyon! Are you using Procyon in one of your projects? Contact me (email / twitter) if you would like it listed here.

  • SecureTeam Java Decompiler
    A JavaFX-based decompiler front-end with fast and convenient code navigation. Download it, or launch it directly from your browser.

  • Bytecode Viewer is an open source Java decompilation, disassembly, and debugging suite by @Konloch. It can produce decompiled sources from several modern Java decompilers, including Procyon, CFR, and FernFlower.

More Repositories

1

PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
C#
847
star
2

sql_profiler

Microsoft SQL-Server Profiler (command-line) for Linux/Mac/Windows (works over ssh)
C#
31
star
3

PdfSharpNetStandard

PdfSharp 1.5 ported to NetStandard 2.0
C#
31
star
4

Lumisoft.Net.Core

Lumisoft NET & Lumisoft MailServer for .NET Core 2.0 (and framework 4.5/4.6.1) - ported to Linux
C#
27
star
5

SvgConverter

Convert dxf to SVG
C#
24
star
6

json2csharp

Sourcecode for http://json2csharp.com/ from http://jsonclassgenerator.codeplex.com/
C#
18
star
7

FunctionInterception

Overwrite C/C++ functions in memory for x86-32/64 on Linux, Mac & Windows
C
15
star
8

AspNetCore.ReportViewer

Use issue 2 in this repo to get gitlab access to ReportViewer
C#
12
star
9

ExpressProfiler

SQL-Express Profiler, with quick-fix for datetime-format and xml-parameters
C#
12
star
10

VoiceRecognition

C#
11
star
11

Arsoft

.NET Core minimal DNS server - .NET Core Port of ARSoft.Tools.Net
C#
10
star
12

System.CoreFX.Forms

System.Windows.Forms for NetStandard
C#
9
star
13

RedmineMailService

Prototype - Check mails on exchange server and put them into redmine.
C#
7
star
14

Jwt_Net20

JWT (JSON Web Tokens) for .NET 2.0 and .NET Core - www.iana.org/assignments/jose/jose.xhtml
C#
7
star
15

SqlParser

Ways to remove sql-comments, including ANTLR4
ANTLR
6
star
16

DotSpatial

DotSpatial for NetStandard 2.0 - uses System.Drawing - therefore anything outside Projections might not work on Android/iOS
C#
6
star
17

RegistryExplorer

An alternative to the windows registry editor.
C#
5
star
18

AnySqlWebAdmin

Visual Studio replacement for the web - any DB - any platform (supported by .NET Core)
JavaScript
5
star
19

rtaVideoStreamer

Motion JPEG Streaming Server
C#
5
star
20

SkiaCaptchaTest

SkiaSharp test program - Captcha
C#
4
star
21

StackExchangeDataDumpImporter

Import large XML/JSON dump
C#
4
star
22

ngit-core

C#
4
star
23

WebCAD

WebGL CAD with TypeScript & BabylonJS
JavaScript
4
star
24

FuseExample

Example of using Mono.Fuse with C# with PostGreSQL/MySQL/MS-SQL
C#
4
star
25

Steamless.NET

Steamless is a DRM remover of the SteamStub variants. Written in C#.
C#
4
star
26

PdfSharp

C# PDF Library (MIT license)
C#
4
star
27

DownloadSVN

Download all files from SVN/GIT Repository (google-code, assemblea, etc.)
C#
4
star
28

ILRepack

Latest version of the ILRepack ILMerge clone with compatible modified Cecil - Compiles, but beware of the pitfalls
C#
4
star
29

MultiWikiParser

Parse & Convert MediaWiki ==> XHTML
HTML
3
star
30

old.forReference.Lumisoft.Net.Core

Lumisoft.Net for .NET Core
C#
3
star
31

wkHtmlToPdfSharp

wxHtmlToPdf - Thread-Safe with LoadLibrary for ASP.NET on IIS with shadow-copy !
C#
3
star
32

QrCode

QR-Code for Medium Trust (.NET 2.0 for SSRS 2008)
C#
3
star
33

viber-root-docker

Run Viber via Docker on 19.04 which only support OpenSSL 1.1, and not OpenSSL 1.0, fork of
Dockerfile
3
star
34

OdsReadWrite

Read- and Write OpenOffice SpreadSheets
C#
2
star
35

ScriptSplitter

Split SQL-Scripts at the GO keyword (like SSMS)
C#
2
star
36

DnDFileUpload

HTML5 Drag & Drop multi-file-upload
TSQL
2
star
37

libWkHtml2X

wkHtml2Pdf & wkHtml2Image for .NET 2.0 - .NET Core
C#
2
star
38

BuildVersionIncrement

BuildVersionIncrement for Visual Studio 2013
2
star
39

ParseoidSharp

C#
2
star
40

AntiDosAttackModules

DOS Attack mitigation
C#
2
star
41

SyslogSharp

1.0.07
C#
2
star
42

LycamobileTtlTetherUnblock

LycaTel - Lycamobile TTL Tether Unblock
C#
2
star
43

VectorTileServer

VectorTileServer for MapboxGL
JavaScript
2
star
44

msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
C#
1
star
45

DAL

Database Abstraction Layer
C#
1
star
46

WebReportDesigner

Design SSRS Reports online
JavaScript
1
star
47

TestPWA

Testing PWA implementation
TypeScript
1
star
48

ghostsvg

GhostPDL GhostSvg (gsvg.exe) imported from SVN
C
1
star
49

CrossPlatformServiceSample

Cross-Platform Service (Windows, Linux, Mac)
C#
1
star
50

SelfSignedCertificateGenerator

C#
1
star
51

Stammbaum

Testing the feasibility of a genealogical tree with PdfSharp and .NET Core - this won't compile until the dependencies have been fixed.
C#
1
star
52

TemporaryLayoutFarm

C#
1
star
53

GzipBomb

Bomb vulnerability scanners or IE11 with gzip https://blog.haschek.at/post/f2fda
C#
1
star
54

SyslogClients

C#
C#
1
star
55

ImageToPdf

Merge a folder of images into a PDF
C#
1
star
56

ReportViewerWrapper

Wrapper around ReportViewer Export Functionality
C#
1
star
57

CustomHttpHeaders

Add the P3P-HTTP-Header to SSRS 2012
Visual Basic
1
star
58

HyperTableSharp

Hypertable C# Client
C#
1
star
59

BlueMine

Redmine clone that operates on the same DB schema.
C#
1
star
60

SpamAssassinInterface

C# interface to SpamAssassin
C#
1
star
61

Svg3Dtest

Transform 3d coordinates to 2.5d (isometric projection)
JavaScript
1
star
62

Pdf2Svg

Convert PDF to SVG
C#
1
star
63

SqlMerge

Merge a bunch of SQL files (optionally sorted by number when prefixed by number) into one UTF8-file (AllInOne.sql), separated by go-statements
C#
1
star
64

ReportReader

C#
1
star
65

SHA-3

Imported from https://bitbucket.org/jdluzen/sha3
C#
1
star
66

SphoriumWebDav

WebDAV for .NET 2.0
JavaScript
1
star
67

SvgBasics

Basic SVG-manipulation
HTML
1
star
68

DnsValidator

Check domain availability (Custom DNS server)
C#
1
star
69

IPNetwork

C#
1
star
70

LinuxScreenshot

X11 Screenshot test program
C
1
star
71

AnySqlDataFeed

OData feeds for dynamic entities without Entity Framework for consumption by Excel 2013
C#
1
star
72

SqlServerStatistics

Statistical Functions, including Excel functions, for SQL-Server
C#
1
star
73

CoreAuth

Cookie auth with .NET Core
C#
1
star
74

DDay.iCal

Outlook Meeting Requests
C#
1
star
75

MarkdownReaderAndWriter

Read Markdown (allow edit in the future)
C#
1
star
76

ScriptConverter

Convert MS-SQL to ISO-SQL
C#
1
star
77

SimpleBitmap

Bitmap handling without dependency accross platform
C++
1
star
78

SqlServerDataFeeds

Excel OData-Feed from database
C#
1
star
79

rtcw-xna-csharp

Automatically exported from code.google.com/p/rtcw-xna-csharp
C#
1
star