Kqzz / MCsniperGO

MCsniperGO, a fast, efficient, and feature-packed minecraft name sniper.
https://mcsniperpy.com
192 stars 37 forks source link

"failed to grab name change info" when trying to prename snipe #11

Closed LoganDark closed 2 years ago

LoganDark commented 3 years ago

Bug Report

Description

Snipe failed, presumably because the program doesn't support prename and that's not specified anywhere.

Steps to reproduce

Try to snipe using an account that hasn't claimed its first username yet

Expected result

Either snipe succeeded or someone actually claims the name before me

Actual result

[info] » Sniping g51 at 2021/10/18 08:42:31

[info] » authenticating <censored> through ms auth
[success] » successfully authenticated <censored>
[err] » failed to verify that <censored> can snipe: failed to grab name change info
[err] » <censored> not ready to snipe
[fatal err] » no accounts successfully authenticated!

Complete output

(already above)


PS, do you know how annoying this issue form is? I have to spread the information out across many sections when it would be much more natural to explain it in a single paragraph with output below.

Kqzz commented 3 years ago

what are the contents of accounts.txt? make sure to censor email + pass.

Kqzz commented 3 years ago

when i’m home i’ll fix the issue format

LoganDark commented 3 years ago

what are the contents of accounts.txt? make sure to censor email + pass.

0 logandark /m/c/U/L/D/mcsniper cat accounts.txt
<email>:<pass>:ms

the password does not have any : in it, and the file has a trailing newline. censored hexdump:

0 logandark /m/c/U/L/D/mcsniper xxd accounts.txt
00000000: 0000 0000 0000 0000 0000 0000 0000 0000                  
00000010: 0000 003a 0000 0000 0000 0000 0000 003a     :           :
00000020: 6d73 0a                                  ms.
LoganDark commented 3 years ago

Just to be completely and perfectly clear I'm trying to snipe here

image

my account has no name change history because it does not yet exist.

Kqzz commented 3 years ago

ok, so the issue is you used the ms “flag” and not “prename”

Kqzz commented 3 years ago

i’ll write a more descriptive error message

LoganDark commented 3 years ago

i’ll write a more descriptive error message

By the time that error shows up, it's already too late, so please do some validation of the account on startup

LoganDark commented 3 years ago

ok, so the issue is you used the ms “flag” and not “prename”

I have no idea what that means, I didn't put "flag" anywhere

do you mean I should have used ms:prename instead of just ms? I did a search and just found that out

Kqzz commented 3 years ago

i’ll write a more descriptive error message

By the time that error shows up, it's already too late, so please do some validation of the account on startup

riiiight… i changed that recently, it used to be8 hrs before. i might change that later.

Kqzz commented 3 years ago

ok, so the issue is you used the ms “flag” and not “prename”

I have no idea what that means, I didn't put "flag" anywhere

do you mean I should have used ms:prename instead of just ms? I did a search and just found that out

nope, you’d just do :prename. no :ms.

LoganDark commented 3 years ago

it used to be8 hrs before. i might change that later.

I can't wait 8 hours between attempts because there are other bots competing at the same time. I'll probably have to try at least 50 different names over the course of a few days to get anything, especially since I only have 1 account

nope, you’d just do :prename. no :ms.

would be great if this was mentioned somewhere

Kqzz commented 3 years ago

it used to be8 hrs before. i might change that later.

I can't wait 8 hours between attempts because there are other bots competing at the same time. I'll probably have to try at least 50 different names over the course of a few days to get anything, especially since I only have 1 account

nope, you’d just do :prename. no :ms.

would be great if this was mentioned somewhere

It is mentioned. It's shown as the format for prename sniping in the accounts format document.

Kqzz commented 3 years ago

TODO: more useful error message

LoganDark commented 3 years ago

It's probably possible to detect if the account hasn't been named yet. Right now absolutely no checks are performed until like 20 seconds before the snipe, so it's completely impossible to fix things and you just get to watch as you don't even get a chance at that name.

Is it possible to check all of the accounts at startup as well instead of only right before the name becomes available?

Kqzz commented 3 years ago

ok, so, for doing the checks at the start: It authenticates at the end because if you start a sniper and then, before the snipe is run, start another sniper, the first sniper started will return 401s because the first bearer token becomes invalid by the second token being created.

It is possible to check if an account hasn't been named, and that's exactly what happens if the account is marked as prename in accounts.txt. I see where you're coming from for automatically inferring if it's prename or not, so maybe I'll make an issue for that and implement it at some point. If I implement that, I'd feel like checking if it's Microsoft or Mojang and authing based off of that could be a good idea... But that's a bit more complicated and will include even more requests which could potentially cause ratelimiting problems.

Kqzz commented 3 years ago

also, it shouldn't be 20 seconds before the snipe, the default is 15 minutes.

LoganDark commented 3 years ago

also, it shouldn't be 20 seconds before the snipe, the default is 15 minutes.

oh my bad, it said sniping in 20s so I assumed the login messages right before it also happened 20 seconds before

It authenticates at the end because if you start a sniper and then, before the snipe is run, start another sniper, the first sniper started will return 401s because the first bearer token becomes invalid by the second token being created.

you can just verify at the start and use it for detecting things about the account - whether the password is valid, whether it's mojang or m$, whether it's prename or not, etc. then you can tell the user if their snipe is going to fail before the snipe actually happens, so they can work on fixing up the issues and then trying again.

you could either re-use the tokens or just generate new ones a short period before like you do now

chrommie commented 3 years ago

honestly not that bad of an idea, you could implement a simple password check at the start, but you could also just test the password

Kqzz commented 3 years ago

also, it shouldn't be 20 seconds before the snipe, the default is 15 minutes.

oh my bad, it said sniping in 20s so I assumed the login messages right before it also happened 20 seconds before

It authenticates at the end because if you start a sniper and then, before the snipe is run, start another sniper, the first sniper started will return 401s because the first bearer token becomes invalid by the second token being created.

you can just verify at the start and use it for detecting things about the account - whether the password is valid, whether it's mojang or m$, whether it's prename or not, etc. then you can tell the user if their snipe is going to fail before the snipe actually happens, so they can work on fixing up the issues and then trying again.

you could either re-use the tokens or just generate new ones a short period before like you do now

good idea, I'll think about doing all of that.