Skip to content

Commit 8ff7e44

Browse files
authored
Merge pull request #6 from FalsePattern/dev
1.2.0
2 parents 73e38ee + 92ff3f5 commit 8ff7e44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2464
-211
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
with:
1212
fetch-depth: 0
1313

14-
- name: Set up JDK 8
14+
- name: Set up JDK 17
1515
uses: actions/setup-java@v3
1616
with:
1717
distribution: 'adopt'
18-
java-version: '8'
18+
java-version: '17'
1919

2020
- name: Build with Maven
2121
run: mvn --batch-mode --update-snapshots verify

.github/workflows/release-tags.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
with:
1414
fetch-depth: 0
1515

1616
- name: Set release version
1717
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
1818

19-
- name: Set up JDK 8
19+
- name: Set up JDK 17
2020
uses: actions/setup-java@v3
2121
with:
2222
distribution: 'adopt'
23-
java-version: '8'
23+
java-version: '17'
2424
server-id: mavenpattern
2525
server-username: MAVEN_DEPLOY_USER
2626
server-password: MAVEN_DEPLOY_PASSWORD
2727

2828
- name: Build and Publish with Maven
2929
run: mvn --batch-mode --update-snapshots deploy
3030
env:
31-
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
32-
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
31+
MAVEN_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
32+
MAVEN_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
3333

3434
- name: Release under current tag
3535
uses: "marvinpinto/action-automatic-releases@latest"

COPYING

Lines changed: 0 additions & 1 deletion
This file was deleted.

COPYING

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

LICENSE

Lines changed: 0 additions & 1 deletion
This file was deleted.

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
JFunge - A standard-conforming Befunge-98 and Trefunge-98 interpreter
2+
Copyright (C) 2022-2023 FalsePattern
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <https://www.gnu.org/licenses/>.

README.MD

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ A standard-conforming Funge-98 interpreter.
44

55
### Usage
66
```
7-
usage: jfunge [-f <file> | --help | --license | --version] [-i <file>]
8-
[--maxiter <iterations>] [-o <file>] [--syscall] [-t] [--trefunge]
7+
usage: jfunge [--env] [-f <file> | --help | --license | --version] [-i <file>]
8+
[--maxiter <iterations>] [-o <file>] [--perl] [--syscall] [-t]
9+
[--trefunge]
910
JFunge, a Funge98 interpeter for java.
11+
--env Allows the interpreter to access the environment
12+
variables of the host system.
1013
-f,--file <file> The file to load into the interpreter at the origin
1114
on startup.
1215
--help Displays this help page
@@ -22,6 +25,10 @@ JFunge, a Funge98 interpeter for java.
2225
directory (o instruction). Specify / to allow write
2326
access to every file on the system (dangerous). Can
2427
specify multiple files/folders.
28+
--perl Enable the PERL fingerprint. This requires the
29+
working directory of the interpreter to be
30+
writable, and is also an arbitrary code execution
31+
risk.
2532
--syscall Enables the syscall feature (= instruction). This
2633
is a very dangerous permission to grant, it can
2734
call any arbitrary program on your system.
@@ -33,11 +40,14 @@ JFunge, a Funge98 interpeter for java.
3340
--version Prints the current program version, along with the
3441
handprint and version given by befunge's y
3542
instruction.
43+
44+
Process finished with exit code 0
45+
3646
```
3747

3848
### Compatibility
3949

40-
The interpreter's handprint is `0xfa15e9a7` (`-99227225` in decimal), which is a hexadecimal approximation of "`falsepat`" from FalsePattern.
50+
The interpreter's handprint is `0x74708578` ("JFUN")
4151

4252
The version number given to befunge is `major * 256 * 256 + minor * 256 + patch`, where major, minor, patch are the 3
4353
primary version numbers in the standard semver format.
@@ -51,18 +61,31 @@ The interpreter supports the following Funge-98 specification extensions:
5161
- Optional Trefunge mode (experimental)
5262

5363
Additionally, the following fingerprints are currently supported (more to come):
54-
- [3DSP](http://rcfunge98.com/rcsfingers.html#3DSP)
55-
- [FPSP](http://rcfunge98.com/rcsfingers.html#FPSP)
64+
- [3DSP](https://rcfunge98.com/rcsfingers.html#3DSP)
65+
- [BASE](https://rcfunge98.com/rcsfingers.html#BASE)
66+
- [CPLI](https://rcfunge98.com/rcsfingers.html#CPLI)
67+
- [DATE](https://rcfunge98.com/rcsfingers.html#DATE)
68+
- [DIRF](https://rcfunge98.com/rcsfingers.html#DIRF)
69+
- [EVAR](https://rcfunge98.com/rcsfingers.html#EVAR)
70+
- [FING](https://rcfunge98.com/rcsfingers.html#FING)
71+
- [FIXP](https://rcfunge98.com/rcsfingers.html#FIXP)
72+
- [FPDP](https://rcfunge98.com/rcsfingers.html#FPDP)
73+
- [FPSP](https://rcfunge98.com/rcsfingers.html#FPSP)
5674
- [HRTI](./docs/catseye/library/HRTI.markdown)
75+
- [INDV](https://rcfunge98.com/rcsfingers.html#INDV)
76+
- [JSTR](https://web.archive.org/web/20070525220700/http://www.jess2.net:80/code/funge/myexts.txt)
5777
- [MODE](./docs/catseye/library/MODE.markdown)
5878
- [MODU](./docs/catseye/library/MODU.markdown)
5979
- [NULL](./docs/catseye/library/NULL.markdown)
6080
- [ORTH](./docs/catseye/library/ORTH.markdown)
61-
- [PERL](./docs/catseye/library/PERL.markdown)
81+
- [PERL](./docs/catseye/library/PERL.markdown) (Disabled by default, needs command line flag)
6282
- [REFC](./docs/catseye/library/REFC.markdown)
6383
- [ROMA](./docs/catseye/library/ROMA.markdown)
84+
- [SOCK](https://rcfunge98.com/rcsfingers.html#SOCK)
85+
- [SCKE](https://www.rcfunge98.com/rcfunge2_manual.html#SCKE)
86+
- [STRN](https://rcfunge98.com/rcsfingers.html#STRN)
6487
- [TOYS](./docs/catseye/library/TOYS.markdown)
65-
- [TURT](./docs/catseye/library/TURT.markdown)
88+
- [TURT](./docs/catseye/library/TURT.markdown) (Broken, disabled in source code, will be fixed in the future)
6689

6790
### Version Release Checklist
6891
- Update the version number inside the [pom](./pom.xml)

pom.xml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66

77
<groupId>com.falsepattern</groupId>
88
<artifactId>jfunge</artifactId>
9-
<version>1.1.0</version>
9+
<version>1.2.0</version>
1010

1111
<properties>
12-
<java.version>8</java.version>
12+
<java.version>17</java.version>
1313
<lombok.version>1.18.24</lombok.version>
1414
<trove.version>3.0.3</trove.version>
1515
<joml.version>1.10.2</joml.version>
1616
<commons-cli.version>1.5.0</commons-cli.version>
17+
<asm.version>9.4</asm.version>
1718
<project.encoding>UTF-8</project.encoding>
1819
<project.distribution.name>mavenpattern</project.distribution.name>
1920
<project.distribution.url>https://mvn.falsepattern.com/releases/</project.distribution.url>
@@ -22,6 +23,9 @@
2223
<!--Test deps -->
2324
<commons-io.version>2.11.0</commons-io.version>
2425
<junit.version>5.8.2</junit.version>
26+
<junit-pioneer.version>2.0.0</junit-pioneer.version>
27+
<javassist.version>3.29.2-GA</javassist.version>
28+
2529
</properties>
2630

2731
<dependencies>
@@ -46,18 +50,52 @@
4650
<artifactId>commons-cli</artifactId>
4751
<version>${commons-cli.version}</version>
4852
</dependency>
53+
<dependency>
54+
<groupId>org.ow2.asm</groupId>
55+
<artifactId>asm</artifactId>
56+
<version>${asm.version}</version>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.ow2.asm</groupId>
60+
<artifactId>asm-tree</artifactId>
61+
<version>${asm.version}</version>
62+
</dependency>
63+
<dependency>
64+
<groupId>org.ow2.asm</groupId>
65+
<artifactId>asm-commons</artifactId>
66+
<version>${asm.version}</version>
67+
</dependency>
68+
<dependency>
69+
<groupId>org.ow2.asm</groupId>
70+
<artifactId>asm-util</artifactId>
71+
<version>${asm.version}</version>
72+
</dependency>
73+
74+
<!--Test dependencies-->
4975
<dependency>
5076
<groupId>org.junit.jupiter</groupId>
5177
<artifactId>junit-jupiter-engine</artifactId>
5278
<version>${junit.version}</version>
5379
<scope>test</scope>
5480
</dependency>
81+
<dependency>
82+
<groupId>org.junit-pioneer</groupId>
83+
<artifactId>junit-pioneer</artifactId>
84+
<version>${junit-pioneer.version}</version>
85+
<scope>test</scope>
86+
</dependency>
5587
<dependency>
5688
<groupId>commons-io</groupId>
5789
<artifactId>commons-io</artifactId>
5890
<version>${commons-io.version}</version>
5991
<scope>test</scope>
6092
</dependency>
93+
<dependency>
94+
<groupId>org.javassist</groupId>
95+
<artifactId>javassist</artifactId>
96+
<version>${javassist.version}</version>
97+
<scope>test</scope>
98+
</dependency>
6199
</dependencies>
62100

63101
<distributionManagement>
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package com.falsepattern.jfunge;
22

33
public class Globals {
4-
public static final String VERSION = "1.1.0";
5-
public static final int FUNGE_VERSION = 1 * 256 * 256 + 1 * 256 + 0;
4+
public static final int MAJOR_VERSION = 1;
5+
public static final int MINOR_VERSION = 2;
6+
public static final int PATCH_VERSION = 0;
67
public static final int HANDPRINT = 0x74_70_85_78; //"JFUN"
8+
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + PATCH_VERSION;
9+
public static final int FUNGE_VERSION = MAJOR_VERSION * 256 * 256 + MINOR_VERSION * 256 + PATCH_VERSION;
710
}

src/main/java/com/falsepattern/jfunge/Main.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.falsepattern.jfunge.interpreter.FeatureSet;
44
import com.falsepattern.jfunge.interpreter.Interpreter;
55
import lombok.val;
6-
import lombok.var;
76
import org.apache.commons.cli.DefaultParser;
87
import org.apache.commons.cli.HelpFormatter;
98
import org.apache.commons.cli.Option;
@@ -70,6 +69,10 @@ public static void main(String[] args) throws IOException, ParseException {
7069
.longOpt("perl")
7170
.desc("Enable the PERL fingerprint. This requires the working directory of the interpreter to be writable, and is also an arbitrary code execution risk.")
7271
.build());
72+
options.addOption(Option.builder()
73+
.longOpt("sock")
74+
.desc("Enable the SOCK and SCKE fingerprints. This allows the program to open a socket and listen for connections, as well as connect to external hosts. This is a very dangerous permission to grant, it can potentially allow remote code execution.")
75+
.build());
7376
val parser = new DefaultParser();
7477
val cmd = parser.parse(options, args);
7578
if (cmd.hasOption("help")) {

0 commit comments

Comments
 (0)