Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support spoofing forge #38

Open
matthewfcarlson opened this issue Apr 5, 2020 · 5 comments
Open

Support spoofing forge #38

matthewfcarlson opened this issue Apr 5, 2020 · 5 comments

Comments

@matthewfcarlson
Copy link

When trying to sign into a forge server, this error presents itself.

java.net.SocketException: Software caused connection abort: recv failed
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.socketRead(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.FilterInputStream.read(Unknown Source)
        at systems.kinau.fishingbot.network.protocol.Packet.readVarInt(Packet.java:108)
        at systems.kinau.fishingbot.network.protocol.NetworkHandler.readUncompressed(NetworkHandler.java:425)
        at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:419)
        at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:210)
        at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:143)
        at systems.kinau.fishingbot.Main.main(Main.java:12)
[2020-04-05 12:09:44] [WARNING] Could not receive packet! Shutting down!
[2020-04-05 12:09:44] [INFO   ] Module "ClientDefaultsModule" disabled!
[2020-04-05 12:09:44] [INFO   ] Module "FishingModule" disabled!
[2020-04-05 12:09:44] [INFO   ] FishingBot restarts in 3 seconds...
[2020-04-05 12:09:47] [INFO   ] Module "FishingModule" enabled!
[2020-04-05 12:09:47] [INFO   ] Module "HandshakeModule" enabled!
[2020-04-05 12:09:47] [INFO   ] Module "LoginModule" enabled!
[2020-04-05 12:09:47] [INFO   ] Module "ChatCommandModule" enabled!
[2020-04-05 12:09:47] [INFO   ] Module "ClientDefaultsModule" enabled!
[2020-04-05 12:09:47] [SEVERE ] Login failed: {"text":"This server has mods that require Forge to be installed on the client. Contact your server admin for more details."}
[2020-04-05 12:09:47] [INFO   ] Module "ClientDefaultsModule" disabled!
[2020-04-05 12:09:47] [INFO   ] Module "FishingModule" disabled!
[2020-04-05 12:09:47] [INFO   ] FishingBot restarts in 3 seconds...
Exception in thread "Thread-5" Exception in thread "Thread-3" java.lang.NullPointerException
        at systems.kinau.fishingbot.FishingBot.lambda$connect$0(FishingBot.java:202)
        at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
        at systems.kinau.fishingbot.FishingBot.lambda$connect$0(FishingBot.java:202)
        at java.lang.Thread.run(Unknown Source)

https://wiki.vg/Minecraft_Forge_Handshake#Pre-1.13

https://github.com/PrismarineJS/node-minecraft-protocol-forge this is an offering for node-protocol (which doesn't support 1.15 grumble grumble).

I might take a look into implementing this, but we'll see

@seupedro
Copy link

Hi, I'm facing the same issue. How could I contribute to fix this?
And why did the update was postponed to 1.16 version? Couldn't implement that as a new feature in 1.15.2 ?

@MrKinau
Copy link
Owner

MrKinau commented Apr 28, 2020

I am not.sure if this is fixable at all (skipping all mod handshakes may cause issues), if you want to write this Forge spoofing bypass you are welcome to create a Pull Request :)
It's under the 1.16 milestone, because this is the next time I will touch the code. If someone else will create a PR for it, it could be earlier.

@seupedro
Copy link

seupedro commented May 4, 2020

Good. Do you know how does the mod handshake works?
If I knew I could work on it and create a pull request.

@MrKinau
Copy link
Owner

MrKinau commented May 4, 2020

They are described at the wiki.vg article (I think) above. Atm I dont have much time to really check this. I will work on it after the 1.16 release or someone else (Maybe you) have to figure it out and create a PR

@MrKinau
Copy link
Owner

MrKinau commented Jun 7, 2020

Tried it out today.
After adding the "\0FML\0" to the Handshake packet I'll get a 0x1b packet (which normally is not valid in the login procedure) which disconnects the client with {"translate":"disconnect.genericReason","with":["Internal Exception: java.lang.NumberFormatException: For input string: \"\""]} . I am not quite sure why this happens or what I am doing wrong, but I won't receive any forge handshakes :( trying it out later on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants