https://github.com/tamada/pochi
Java birthmark toolkit, detecting the software theft by native characteristics of the programs.
https://github.com/tamada/pochi
birthmark-toolkit birthmarks java9module plagiarism-detection software-theft-detection
Last synced: 3 months ago
JSON representation
Java birthmark toolkit, detecting the software theft by native characteristics of the programs.
- Host: GitHub
- URL: https://github.com/tamada/pochi
- Owner: tamada
- License: apache-2.0
- Created: 2017-02-22T07:18:34.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-11-16T01:23:49.000Z (over 2 years ago)
- Last Synced: 2025-03-14T17:08:17.493Z (3 months ago)
- Topics: birthmark-toolkit, birthmarks, java9module, plagiarism-detection, software-theft-detection
- Language: Java
- Homepage: https://tamada.github.io/pochi
- Size: 32.5 MB
- Stars: 3
- Watchers: 4
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :dog: pochi
[](https://github.com/tamada/pochi/actions?query=workflow%3Abuild)
[](https://coveralls.io/github/tamada/pochi?branch=main)
[](https://codebeat.co/projects/github-com-tamada-pochi-main)[](https://github.com/tamada/pochi/blob/master/LICENSE)
[](https://github.com/tamada/pochi/releases/tag/v2.6.0)
[](https://zenodo.org/badge/latestdoi/82773287)[](https://tamada.github.io/pochi/apidocs)
[](https://github.com/users/tamada/packages/container/package/pochi)
[](https://github.com/tamada/pochi/discussions)Detecting the software theft, the birthmark toolkit for the JVM platform.
**pochi** is the birthmarking toolkit for the JVM platform.
The birthmarks are the native characteristics extracted from executable programs.
Then, we compare them and computes the similarities.
The resultant similarities shows the copy relation possibilities between two programs.## :bookmark: Table of Contents in the Web page of pochi
* [:books: Birthmarks](https://tamada.github.io/pochi/birthmarks)
- [:green_book: Definition of Birthmarks](https://tamada.github.io/pochi/birthmarks#-definition-of-birthmarks)
- [:blue_book: Types of Birthmarks](https://tamada.github.io/pochi/birthmarks#-types-of-birthmarks)
- [:orange_book: Similarities](https://tamada.github.io/pochi/birthmarks#-similarities)
- [:closed_book: Theft detection process by birthmarks](https://tamada.github.io/pochi/birthmarks#-theft-detection-process-by-birthmarks)
* :newspaper: What is **pochi**
- [:key: Key idea](https://tamada.github.io/pochi/description#-key-idea)
- :fork_and_knife: Usage
- [:runner: CLI Interface](https://tamada.github.io/pochi/description#-cli-interface)
- [:whale: Docker](https://tamada.github.io/pochi/description#-docker)
- [:swimmer: The birthmarking flow](https://tamada.github.io/pochi/description#-the-birthmarking-flow)
* :anchor: Install
- [:beer: Homebrew](https://tamada.github.io/pochi/install#-homebrew)
- [:muscle: Compiling pochi yourself](https://tamada.github.io/pochi/install#-compiling-pochi-yourself)
- [:package: Maven repository](https://tamada.github.io/pochi/install#-maven-repository)
- :briefcase: Requirements
- [:pouch: Modules](https://tamada.github.io/pochi/install#-modules)
* :ant: Examples
- [:one: `printing_args.groovy`](https://tamada.github.io/pochi/examples#1-printing_argsgroovy)
- [:two: `printing_pochi_info.groovy`](https://tamada.github.io/pochi/examples#2-printing_pochi_infogroovy)
- [:three: `extracting_birthmarks.groovy`](https://tamada.github.io/pochi/examples#3-extracting_birthmarksgroovy)
- [:four: `filtering_source.groovy`](https://tamada.github.io/pochi/examples#4-filtering_sourcegroovy)
- [:five: `comparing_birthmarks.groovy`](https://tamada.github.io/pochi/examples#5-comparing_birthmarksgroovy)
- [:six: `comparing_birthmarks_with_specified_pair_matcher.groovy`](https://tamada.github.io/pochi/examples#6-comparing_birthmarks_with_specified_pair_matchergroovy)
- [:seven: `registering_new_extractor.groovy`](https://tamada.github.io/pochi/examples#6-registering_new_extractorgroovy)
* :smile: About
- [:scroll: License](https://tamada.github.io/pochi/about#-license)
- [:man_office_worker: Developers :woman_office_worker:](https://tamada.github.io/pochi/about#-developers-)
- [:question: Icon of pochi](https://tamada.github.io/pochi/about#-icon-of-pochi)
- :surfer: References
- [:basketball: Surveys](https://tamada.github.io/pochi/about#-surveys)
- [:soccer: Articles of supported birthmark types](https://tamada.github.io/pochi/about#-articles-of-supported-birthmark-types)
- [:tennis: Articles by H. Tamada](https://tamada.github.io/pochi/about#-articles-by-h-tamada)
* [:smile_cat: API document](https://tamada.github.io/pochi/apidocs)### :runner: CLI Interface
```sh
pochi [OPTIONS] [SCRIPT_FILE [ARGV...]]
OPTIONS
-c, --classpath specifies the classpaths for Groovy (JVM) separated with colon (:).
-C, --config specifies the configuration file.
-e, --expression specifies one line script.
-w, --working-dir specifies the working directory.
-v, --verbose sets as verbose mode.-h, --help prints this message.
SCRIPT_FILE [ARGV...]
Groovy script file name and its arguments.
If no script files and no expression were given, pochi runs on interactive mode.
```#### Script file
The script files are parsed by the Groovy.
For more detail, see [:ant: Examples](https://tamada.github.io/pochi/examples).### :whale: Docker
Container images of **pochi** for Docker are:
* [`ghcr.io/tamada/pochi`](https://github.com/users/tamada/packages/container/package/pochi)
* `2.6.0`, `latest`
* `2.5.2`
* `2.5.1`
* `2.5.0`
* `2.4.6`
* `2.4.0`
* `2.3.24`
* `2.3.23`
* `2.3.21`
* `2.3.19`
* `2.3.18`
* `2.3.17`
* `2.3.16`
* `2.3.10`
* `2.3.2`
* `2.3.1`
* `2.3.0`
* `2.2.0`
* `2.1.0`
* `2.0.0`
* accept only `.groovy` script files.
* `1.0.0`
* accept only `.js` script files.[](https://github.com/users/tamada/packages/container/package/pochi)
To run **pochi** on Docker container OS, type the following commands.
```sh
$ docker run --rm -it -v "$PWD":/home/pochi ghcr.io/tamada/pochi:latest [OPTIONS] [SCRIPT [ARGV...]]
```* `OPTIONS`: the options for **pochi**.
* `[SCRIPT [ARGV...]]`: script file for **pochi**.
* `--rm`: remove the container after running.
* `-it`: interactive and tty mode.
* `-v "$PWD":/home/pochi`: share volume `$PWD` in host OS to `/home/pochi` in the container OS.
* `$PWD` must be the absolute path.`ghcr.io/tamada/pochi` does not include groovy interactive shell environment.
Therefore, it does not work on interactive mode.
If want to run `pochi` on the interactive mode, use `ghcr.io/tamada/pochi-groovysh` image instead.#### Environments in the docker container
* `USER`: `pochi`
* `WORKDIR`: `/home/pochi`
* `JAVA_HOME`: `/opt/java` (symbolic link from `/opt/openjdk-11-minimal`)
* This Java runtime environment do not include unnecessary modules.
* `GROOVY_HOME`: `/opt/groovy` (symbolic link from `/opt/groovy-**3.0.9**`)
* `POCHI_HOME`: `/opt/pochi` (symbolic link from `/opt/pochi-2.0.0`)## Discussion
[](https://github.com/tamada/pochi/discussions)
If you have any problems or suggestions on pochi, please post the messages to the [GitHub Discussions](https://github.com/tamada/pochi/discussions).
## Maven repository
Copy and paste the following snippet into your `pom.xml`.
```xml
tamada_github
Apache Maven Packages of tamada
https://tamada.github.io/maven
```
Then, add the dependencies of your `pom.xml`.
| groupId | artifactId | version |
|--------------------|--------------|---------|
|`jp.cafebabe.pochi` | `kunai2` | `2.6.0` |
|`jp.cafebabe.pochi` | `pochi-core` | `2.6.0` |
|`jp.cafebabe.pochi` | `pochi-api` | `2.6.0` |
|`jp.cafebabe.pochi` | `pochi-cmd` | `2.6.0` |## Modules
**pochi** provides the following modules, and the dependant modules are shown below.
* `jp.cafebabe.kunai`
* `org.objectweb.asm`
* `jdk.zipfs`
* `jp.cafebabe.birthmarks`
* `java.logging`
* `io.vavr`
* `com.fasterxml.jackson.databind`
* `jp.cafebabe.kunai`
* `jp.cafebabe.pochi`
* `java.logging`
* `jp.cafebabe.birthmarks`
* `jp.cafebabe.pochicmd`
* `info.picocli`
* `java.scripting`
