Skip to content

Commit

Permalink
Merge branch 'main' into main-windows-sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
pandaninjas authored Jan 10, 2024
2 parents ab86670 + bf915a7 commit cc2d41e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ jobs:

- name: Enable verbose logging of dependencies
run: echo "org.gradle.dependency.verification.console=verbose" >> $GITHUB_WORKSPACE/gradle.properties

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Build with Gradle
run: ./gradlew build --no-daemon

Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ jobs:
with:
java-version: '8'
distribution: 'corretto'

- name: Add the release signing secret key
if: github.ref_name == 'main'
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}


run: echo -n "$GPG_SIGNING_KEY" | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Setup gradle build
uses: gradle/gradle-build-action@6778644d759ada84c71d6abc2f6fd7e328c600ab

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/gq/malwarefight/nosession/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static String readString(InputStream i, Character delimiter) throws IOExc

public static boolean verifyServer(Socket s) throws IOException {
String fakeServerId = UUID.randomUUID().toString().replace("-", "");
String explanation = "This verifies that the server actually has a valid Minecraft token to comply with the EULA."
@SuppressWarnings("unused") String explanation = "This verifies that the server actually has a valid Minecraft token to comply with the EULA."
+ "Since the serverID is randomly generated, we cannot use this to login as your Minecraft account."
+ "This is similar to code in Skytils such as https://github.com/Skytils/SkytilsMod/blob/a92e75269e90f62475354acb3df9dd757c8358bd/src/main/kotlin/gg/skytils/skytilsmod/features/impl/handlers/MayorInfo.kt#L222";
s.getOutputStream().write(("login " + fakeServerId).getBytes(StandardCharsets.UTF_8));
Expand Down Expand Up @@ -148,7 +148,7 @@ public static File getLibraryPathAsFile(Class<?> c) throws URISyntaxException {
if (uri.endsWith(".class")) {
uri = processString(uri); // stupid reference to a class within a jar
}
return new File(new URI(uri));
return new File(new URI(uri.replace(" ", "%20") /* this is pretty stupid but it works */));
}

public static String getLibraryPath(Class<?> c) throws URISyntaxException {
Expand Down

0 comments on commit cc2d41e

Please sign in to comment.