Code Monkey home page Code Monkey logo

Comments (22)

lukleh avatar lukleh commented on July 30, 2024

Thanks :)

The bot is running by default in offline mode, so you need to use --onlinemode argument. this implies --use_encryption so you can use it instead of it.

I need to rewrite the readme to make things more clear. if you have an idea what can be written better I would be happy for pull request (or at least suggestion)

from twistedbot.

scottie avatar scottie commented on July 30, 2024

sorry to leave that out of the command i posted, i also did try that, to verify i just did try again.

"14:14:18.403985 [CORE EVENT] Server kicked me out with message: Failed to verify username!"

Honestly it was clear in the readme, i just forgot to mention in initial post i did try it with that :(

command i just tried:
python bot.py --botemail [email protected] --botpass PASSWORD --log2file --serverhost localhost --serverport 1338 --botname consolecowboy --onlinemode

response:
14:16:58.462782 [CORE EVENT] USE_ENCRYPTION is True, doing encryption.
14:16:58.465519 [PROTOCOL] doing online authentication
14:16:59.204151 [PROTOCOL] responce from http://session.minecraft.net: OK
14:16:59.818661 [CORE EVENT] Server kicked me out with message: Failed to verify username!
14:16:59.833410 [WORLD] Shutdown

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

Ok, I think I got it. One has to also specify --botname, which is the name associated with your online account.
That is confusing, because in official client you just use you email.

Long story short, I've change the code to take the username from login.minecraft response so one does not need to use --botname in online mode.

commit soon

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

fix commited

from twistedbot.

scottie avatar scottie commented on July 30, 2024

I will clone new code thanks kindly, i did use --botname in my startup command that was what my username is (consolecowboy), so im still confused maybe i was using what i thought my username was but maybe my username is something different on mojang. Sounds like a good code change anyway to be honest.

from twistedbot.

scottie avatar scottie commented on July 30, 2024

hmm no im getting the exact same problem,
still confused i didnt think i was doing anything wrong in the original post, but still that code change you did recently was probably for the best in the long run anyway, but i still seem to be getting the same problem.

:(

Client:
18:33:49.749931 [PROTOCOL] doing online authentication
18:33:50.656667 [PROTOCOL] responce from http://session.minecraft.net: OK
18:33:57.941630 [CORE EVENT] Server kicked me out with message: Failed to verify username!
18:33:57.942027 [WORLD] Shutdown

Proxy:
18:36:06.553754 [CLIENT] id 205 client statuses
status: 0
18:36:09.719521 [SERVER] id 255 disconnect/kick
message: Failed to verify username!
18:36:09.757598 [CLIENT] Lost connection from client: Connection was closed cleanly.

command used:
python bot.py --botemail EMAIL --botpass PASSWORD --log2file --serverhost localhost --serverport 6969 --onlinemode

I have proxy running also, this command points to the mc proxy, and proxy points to the server i want to connect to.
(i removed --botname as per your update)

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

true...

i tested it with online server and python bot.py --onlinemode --botemail EMAIL --botpass PASS
and it works, so hard to say what is going wrong

try to post the whole log

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

get the latest code (4701ab6) , run it and post the log please

from twistedbot.

scottie avatar scottie commented on July 30, 2024

No worrys,

here are the logs.
running with latest snapshot

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

and one question that I did not (and should) ask, does the bot run on the server without the proxy? and what proxy are you using?

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

you are using my proxy! :D

well that explains.... I did not implemented proxy for online mode and from what I know it is not even possible (or at least hard).
I intended the proxy just for debugging packet sequences and other developer stuff

from twistedbot.

scottie avatar scottie commented on July 30, 2024

ok it works without the proxy, i was using the proxy that came with the bot.
LOL, so sorry to waist your time, i intended to write a plugin or at least play with the pathing see if i can get it do do something usefull like farm, etc, i code in python so was hoping to use the proxy to see the packet dumps but i can just use that on offline mode to get the information i need.

Thanks again,
Hopefully i can help out :)

from twistedbot.

wtfaremyinitials avatar wtfaremyinitials commented on July 30, 2024

If you still want to know, I know why you can't connect to an onlinemode server with a proxy.

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

sure, post it!

from twistedbot.

SnoFox avatar SnoFox commented on July 30, 2024

And now we all wait on @wtfaremyinitials's post ... I was about to start using the proxy on an online, production mode server to look for oddities in our plugins, but if it doesn't work on online mode, that's ... Unfortunate.

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

If there is demand on that I can try to investigate further.

from twistedbot.

wtfaremyinitials avatar wtfaremyinitials commented on July 30, 2024

First off sorry it took me so long to get back to you.... I have bene extremely busy. Anyway the reason the proxy doesn't work is that when a minecraft client wants to connect to an online mode server it sends the servers address along with a few other things up to the minecraft session servers. The issue is that if you are connecting to "localhost:25566" you send that to mojang instead of whatever the proxy is sending your connection to. As a result of that when the end server makes a request to the minecraft session servers asking if the user trying to connect is a vaild user, they don't get anything because your client never tells the minecraft session servers what the end server is. If that didn't make any sense, I'd be happy to try to re-word it.

from twistedbot.

SnoFox avatar SnoFox commented on July 30, 2024

It looks like the solution (that doesn't involve client mods) is to login, then fire up the proxy and have the proxy login to Mojang again. On connect, the proxy should send to Mojang "I'm SnoFox and I'm connecting to mc.example.com:25565" (even though the real client is connecting to localhost:25565).

from twistedbot.

wtfaremyinitials avatar wtfaremyinitials commented on July 30, 2024

Exactly.

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

Ok, so do we have a reproducible and tested solution? Even partial for now....

from twistedbot.

wtfaremyinitials avatar wtfaremyinitials commented on July 30, 2024

Not written, no. But I can throw a beta version together later if needed.

from twistedbot.

lukleh avatar lukleh commented on July 30, 2024

Sure, anything that helps.

from twistedbot.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.