Replies: 1 comment 1 reply
-
Wow, very nice analysis you started here, I'm curious about the result 😄 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I became curious on what they're actually doing to create the IDs. It's being done server side in somewhat real time as the web server when requesting a Username+Discriminator URL takes a second then responds with a 302 redirect.
I'll update this as I go.
Warning
I'm writing bad JavaScript to try to just work with the data. I do not recommend running this yourself.
I'm also not throttling requests and don't know if Blizzard would temporarily IP ban me for spamming search requests. I should probably add throttling
Update 1
I did some research before this so I'm going to just braindump it out here at once.
Part 1
I wanted to start with a generic name, SneakyTurtle.
the "Break it out" portion was done after I saw this: https://gist.github.com/MatthewSH/8926b10b7735476ef1046032ba45eb47#file-update-1-part-1-before-breaking-it-out
Once I noticed a pattern visually, I broke it up: https://gist.github.com/MatthewSH/8926b10b7735476ef1046032ba45eb47#file-update-1-part-1-breaking-it-out
That's when I noticed how the pattern of 2 distinct portions. The first portion is the name (case sensitive, length sensitive) the second is the discriminator (length sensitive).
Part 2
I wanted to see how this works against multiple names. So I got some generic and streamer names together and ran a new script:
Warning
Again, would not advise running it yourself.
This spit out the following: https://gist.github.com/MatthewSH/8926b10b7735476ef1046032ba45eb47#file-update-1-part-2-multiple-names
Genuinely not sure on some of them..but I just used VSCode text highlighting to manually find the "length" of the name portion on each because I discovered the different lengths.
Here's what I have thus far:
You'll notice that it seems every ID is almost calculated like this:
The only outlier is
SneakyTurtle
where it seems to have the same as an 11 character name. So I pulled up a couple more 12 character names and noticed something:It appears as there's some limit to the ID of the name being 26. I want to do more looking at this, but for now we move on.
That's what I have thus far.
Update 2
I wanted to create a dump of all the IDs to confirm my suspicion. This is the output: https://gist.github.com/MatthewSH/8926b10b7735476ef1046032ba45eb47#file-update-2
I added 4 characters after the "ID" of the name just as a self-check to make sure I wasn't wrong.
Here's the code that does it:
I saved the previous JSON output to a file so I don't get flagged by Blizzard or IP banned.
Now I have this I can start looking into the numbers.
Here's the output of names and their IDs:
Looking through this JSON I'm noticing something...let's isolate the JSON to variations of the same name:
The 3 characters at the end...they're always the same. Always. which means...something is appended that's then hashed and whatever it is...it's always the same.
The ID
I'm noticing something with the IDs. Let's isolate the above list even more...
I'm seeing repetition. Let's chop off the last 3 as we know it's all repeated.
This leaves us with a 4 letter word and an 8 character ID.
Even more, it looks like there's 2 characters per letter (omitting repeating, organized by right side):
Let's organize by casing:
I'm seeing no patterns yet, gonna keep going.
Update 3
I can't get the appearance of a mapping out of my head. I need to explore this. For this I'll need to write a new script.
This outputs: https://gist.github.com/MatthewSH/8926b10b7735476ef1046032ba45eb47#file-update-3
I think I'm on the wrong path here. I think I need to look at the word as a whole again. but this is a later issue.
Update 4
I'm going to go back into the discriminator numbers. I Since there's a finite set of numbers, it may be easier to decode.
I modified the previous script to output the discriminator portion instead: https://gist.github.com/MatthewSH/8926b10b7735476ef1046032ba45eb47#file-update-4
Ω
Beta Was this translation helpful? Give feedback.
All reactions