https://github.com/secretsheppy/vineflower-server
A server that can be called to decompile java class files with Vineflower
https://github.com/secretsheppy/vineflower-server
decompilation java-decompilation vineflower
Last synced: 15 days ago
JSON representation
A server that can be called to decompile java class files with Vineflower
- Host: GitHub
- URL: https://github.com/secretsheppy/vineflower-server
- Owner: SecretSheppy
- License: bsd-3-clause
- Created: 2026-03-26T13:05:53.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-26T15:33:10.000Z (3 months ago)
- Last Synced: 2026-03-27T06:19:07.107Z (3 months ago)
- Topics: decompilation, java-decompilation, vineflower
- Language: Java
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vineflower Server
A server that can be run to repeatedly call Vineflower without continuously creating and destroying new jvm instances.
## About
Initially built to improve efficiency the [Pitest](https://github.com/hcoles/pitest) framework integration with
[Marv](https://github.com/SecretSheppy/marv), which makes thousands of decompilation calls to vineflower in order to
extract the generated mutants.
## Usage
Vineflower Server provides only one route `/vineflower` which is used as a rough replica of the
[Vineflower cli](https://vineflower.org/usage/). There are a few differences:
* `.class` or `.jar` file paths must be specified with the `source` parameter.
* Library location paths (optional) must be specified with the `library` parameter.
* The destination path or file (optional) must be specified with the `destination` parameter. If no destination is provided then the decompiled files will be returned in the response JSON.
All other Vineflower [base decompiler options](https://vineflower.org/usage/#base-decompiler-options) can be added
with the name seen in the documentation without any `-` or `--` prefixes. For example:
### Example Usage in Go
```go
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"strings"
)
const BaseUrl = "http://localhost:8080/vineflower"
var Parameters = []string{
"source=/path/to/source.class",
"source=/path/to/other_source.class",
"banner=hello%20world", // base decompiler option --banner
}
type Response struct {
Destination string `json:"destination"`
Output map[string]string `json:"output"`
}
func (r Response) String() string {
return fmt.Sprintf("Destination:%s,Output:%v", r.Destination, r.Output)
}
func main() {
params := strings.Join(Parameters, "&")
url := fmt.Sprintf("%s?%s", BaseUrl, params)
res, err := http.Get(url)
if err != nil {
panic(err)
}
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
var response Response
if err := json.Unmarshal(body, &response); err != nil {
panic(err)
}
fmt.Println(response)
}
```