Skip to content

Commit 948623b

Browse files
authored
Merge pull request #26 from replydev/major_improvements
Major improvements
2 parents 26b047a + 5453f0b commit 948623b

Some content is hidden

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

67 files changed

+734
-3463
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
push:
13+
branches: [ "main" ]
14+
pull_request:
15+
branches: [ "main" ]
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up JDK 19
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: '19'
28+
distribution: 'temurin'
29+
cache: maven
30+
- name: Build with Maven
31+
run: mvn -B package --file pom.xml
32+
- name: Run unit tests
33+
run: mvn test
34+
35+
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
36+
- name: Update dependency graph
37+
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release artifact with Maven
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up JDK 19
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: "19"
18+
distribution: "temurin"
19+
cache: maven
20+
- name: Build with Maven
21+
run: mvn -B package --file pom.xml
22+
23+
- name: Run unit tests
24+
run: mvn test
25+
26+
- name: Upload artifact to release
27+
uses: svenstaro/upload-release-action@v2
28+
with:
29+
repo_token: ${{ secrets.GITHUB_TOKEN }}
30+
file: target/quboscanner*.jar
31+
file_glob: true
32+
tag: ${{ github.ref }}
33+
overwrite: true

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ outputs/
66
.DS_Store
77
*.txt
88
*.json
9-
/src/test/

.prettierrc.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Prettier configuration
2+
overrides:
3+
- files:
4+
- "*.java"
5+
options:
6+
printWidth: 100
7+
tabWidth: 4
8+
useTabs: false

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Quboscanner
2+
Very simple toy Minecraft Server Scanner.
3+
It uses my library [mcping](https://github.com/replydev/mcping) to mass scan the servers.
24

35
## Download
46

@@ -7,27 +9,29 @@ Or alternatively you can [build from source](#building)
79

810
## Usage
911

10-
Java 8+ is required to run the scanner.
12+
Java 19+ is required to run the scanner.
1113
Linux VPS/Dedicated System is strongly recommended for the best results.
1214

13-
To run it in GUI mode just double click it or run the binary in a terminal with no arguments.
15+
To run it:
1416

15-
To run it in CLI mode:
16-
17-
`java -Dfile.encoding=UTF-8 -jar qubo.jar -range 164.132.200.* -ports 25565-25577 -th 500 -ti 1000`
17+
`java -Dfile.encoding=UTF-8 --enable-preview -jar <jarName>.jar -i 164.132.200.* -p 25565-25577 -t 1000`
1818

1919
## Building
20+
2021
To build the software clone this repository with Intellij IDEA
2122
and compile the binary using the integrated maven utility.
2223

23-
Alternatively you can manually install Maven and compile from commandline using these commands:
24+
Alternatively you can manually install Maven and compile from commandline.
25+
I advise using [SDKMAN](https://sdkman.io/) on *unix systems to install JDK 19 and Maven.
26+
2427
```
25-
sudo apt install maven
2628
git clone https://github.com/replydev/Quboscanner.git
2729
cd Quboscanner
2830
mvn clean compile assembly:single
2931
```
32+
3033
You will find the compiled jar in "target/" directory.
3134

3235
## Contribution
36+
3337
Feel free to fork and make changes, any pull request is welcome.

pom.xml

Lines changed: 57 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,83 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

77
<properties>
8-
<maven.compiler.target>11</maven.compiler.target>
9-
<maven.compiler.source>11</maven.compiler.source>
8+
<maven.compiler.target>19</maven.compiler.target>
9+
<maven.compiler.source>19</maven.compiler.source>
1010
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1111
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1212
</properties>
1313

14-
<groupId>me.reply.qubo</groupId>
14+
<groupId>me.replydev</groupId>
1515
<artifactId>quboscanner</artifactId>
16-
<version>0.4</version>
16+
<version>1.0.0</version>
17+
18+
<repositories>
19+
<repository>
20+
<id>jitpack.io</id>
21+
<url>https://jitpack.io</url>
22+
</repository>
23+
</repositories>
24+
25+
<dependencyManagement>
26+
<dependencies>
27+
<dependency>
28+
<groupId>org.junit</groupId>
29+
<artifactId>junit-bom</artifactId>
30+
<version>5.9.2</version>
31+
<type>pom</type>
32+
<scope>import</scope>
33+
</dependency>
34+
</dependencies>
35+
</dependencyManagement>
1736

1837
<dependencies>
1938
<dependency>
20-
<groupId>com.google.code.gson</groupId>
21-
<artifactId>gson</artifactId>
22-
<version>2.8.9</version>
39+
<groupId>commons-cli</groupId>
40+
<artifactId>commons-cli</artifactId>
41+
<version>1.5.0</version>
2342
</dependency>
2443
<dependency>
25-
<groupId>org.apache.commons</groupId>
26-
<artifactId>commons-lang3</artifactId>
27-
<version>3.12.0</version>
44+
<groupId>org.projectlombok</groupId>
45+
<artifactId>lombok</artifactId>
46+
<version>1.18.24</version>
47+
<scope>provided</scope>
2848
</dependency>
2949
<dependency>
30-
<groupId>net.java.dev.jna</groupId>
31-
<artifactId>jna-platform</artifactId>
32-
<version>5.6.0</version>
50+
<groupId>com.github.seancfoley</groupId>
51+
<artifactId>ipaddress</artifactId>
52+
<version>5.3.4</version>
3353
</dependency>
3454
<dependency>
35-
<groupId>com.formdev</groupId>
36-
<artifactId>flatlaf</artifactId>
37-
<version>0.45</version>
55+
<groupId>org.tinylog</groupId>
56+
<artifactId>slf4j-tinylog</artifactId>
57+
<version>2.6.0</version>
3858
</dependency>
3959
<dependency>
40-
<groupId>com.intellij</groupId>
41-
<artifactId>forms_rt</artifactId>
42-
<version>7.0.3</version>
60+
<groupId>org.tinylog</groupId>
61+
<artifactId>tinylog-impl</artifactId>
62+
<version>2.6.0</version>
4363
</dependency>
4464
<dependency>
45-
<groupId>commons-cli</groupId>
46-
<artifactId>commons-cli</artifactId>
47-
<version>1.4</version>
48-
</dependency>
49-
<dependency>
50-
<groupId>com.github.seancfoley</groupId>
51-
<artifactId>ipaddress</artifactId>
52-
<version>5.3.3</version>
53-
</dependency>
54-
<dependency>
55-
<groupId>org.apache.logging.log4j</groupId>
56-
<artifactId>log4j-core</artifactId>
57-
<version>2.17.1</version>
65+
<groupId>com.github.replydev</groupId>
66+
<artifactId>mcping</artifactId>
67+
<version>v1.0.2</version>
5868
</dependency>
69+
5970
<dependency>
60-
<groupId>org.apache.httpcomponents</groupId>
61-
<artifactId>httpclient</artifactId>
62-
<version>4.5.13</version>
71+
<groupId>org.junit.jupiter</groupId>
72+
<artifactId>junit-jupiter</artifactId>
73+
<scope>test</scope>
6374
</dependency>
6475
</dependencies>
6576
<build>
6677
<plugins>
6778
<plugin>
68-
<groupId>org.apache.maven.plugins</groupId>
69-
<artifactId>maven-dependency-plugin</artifactId>
70-
<version>3.0.1</version>
71-
<executions>
72-
<execution>
73-
<id>copy-dependencies</id>
74-
<phase>package</phase>
75-
<goals><goal>copy-dependencies</goal></goals>
76-
</execution>
77-
</executions>
79+
<artifactId>maven-surefire-plugin</artifactId>
80+
<version>3.0.0-M7</version>
7881
</plugin>
7982
<plugin>
8083
<artifactId>maven-assembly-plugin</artifactId>
@@ -92,6 +95,13 @@
9295
<plugin>
9396
<groupId>org.apache.maven.plugins</groupId>
9497
<artifactId>maven-compiler-plugin</artifactId>
98+
<version>3.10.1</version>
99+
<configuration>
100+
<release>19</release>
101+
<compilerArgs>--enable-preview</compilerArgs>
102+
<source>19</source>
103+
<target>19</target>
104+
</configuration>
95105
</plugin>
96106
</plugins>
97107
</build>

src/main/java/me/replydev/mcping/LegacyPinger.java

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)