Skip to content
/ pochi Public

Java birthmark toolkit, detecting the software theft by native characteristics of the programs.

License

Notifications You must be signed in to change notification settings

tamada/pochi

Repository files navigation

🐶 pochi

build Coverage Status codebeat badge

License Version DOI

Javadoc Docker GitHub Discussion

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.

🔖 Table of Contents in the Web page of pochi

🏃 CLI Interface

pochi [OPTIONS] [SCRIPT_FILE [ARGV...]]
OPTIONS
    -c, --classpath <CLASSPATH>      specifies the classpaths for Groovy (JVM) separated with colon (:).
    -C, --config <CONFIG_FILE>       specifies the configuration file.
    -e, --expression <EXPRESSION>    specifies one line script.
    -w, --working-dir <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 🐜 Examples.

🐳 Docker

Container images of pochi for Docker are:

  • ghcr.io/tamada/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.

Docker

To run pochi on Docker container OS, type the following commands.

$ 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

GitHub Discussion

If you have any problems or suggestions on pochi, please post the messages to the GitHub Discussions.

Maven repository

Copy and paste the following snippet into your pom.xml.

<repositories>
  <repository>
    <id>tamada_github</id>
    <name>Apache Maven Packages of tamada</name>
    <url>https://tamada.github.io/maven</url>
  </repository>
</repositories>

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

Module graph