我怎样才能生成这个哈希值?

发布于 2024-07-24 08:36:15 字数 425 浏览 3 评论 0原文

我是编程新手(刚刚开始!),最近遇到了困难。 我正在为《魔兽世界》创建一个粉丝网站,并且我想链接到一个热门网站 (wowhead.com)。 以下页面显示了我想要弄清楚的内容: http://www.wowhead.com/ ?talent#ozxZ0xfcRMhuVurhstVhc0c

据我了解,链接的“ozxZ0xfcRMhuVurhstVhc0c”部分是一个哈希。 它包含页面上有关特定天赋规格的所有信息,并且每当我在天赋中添加或删除点时都会发生变化。 我希望能够重新创建这部分,这样我就可以将我的用户直接链接到 wowhead 以查看他们的天赋树,但我不知道如何做到这一点。 有人可以提供一些指导吗?

I'm new to programming (just started!) and have hit a wall recently. I am making a fansite for World of Warcraft, and I want to link to a popular site (wowhead.com). The following page shows what I'm trying to figure out: http://www.wowhead.com/?talent#ozxZ0xfcRMhuVurhstVhc0c

From what I understand, the "ozxZ0xfcRMhuVurhstVhc0c" part of the link is a hash. It contains all the information about that particular talent spec on the page, and changes whenever I add or remove points into a talent. I want to be able to recreate this part, so that I can then link my users directly to wowhead to view their talent trees, but I havn't the foggiest idea how to do that. Can anyone provide some guidance?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

梦与时光遇 2024-07-31 08:36:15

第一个字符表示类别:

0 Druid
c Hunter
o Mage
s Paladin
b Priest
f Rogue
h Shaman
I Warlock
L Warrior
j Death Knight

其余字符表示每个树点的分配位置。 每棵树都是独立的,由“Z”分隔。 因此,如果例如所有点都在第三棵树中,则第二个和第三个字符将是“ZZ”,表示“第一棵树的末尾”和“第二棵树的末尾”。

要生成给定树的代码,请将人才分成对,从左到右、从上到下。 每对天赋都由一个角色代表。 例如,在DK的血树部分中,第一个字符将表示分配给屠宰和颠覆的点数,第二个字符将代表刀片屏障和刀片装甲。

什么字符代表该对中的每个分配? 我确信有一个算法,可能基于 ASCII 字符集,但到目前为止我所解决的只是这个查找表。 求顶部第一个天赋的点数,以及左侧第二个天赋的点数。 编码字符位于交叉点处。

  0 1 2 3 4 5
0 0 o b h L x
1 z k d u p t
2 M R r G T g
3 c s f I j e
4 m a w N n v
5 V q i A y E

因此,如果我们的死亡骑士在屠宰中拥有 1 点,在颠覆中拥有 2 点,则第一个角色是“R”。 相反,如果我们在 Blade Barrier 中的这两个和五个中没有放置任何点,则前两个字符将为“0x”。 尾随“0”(树中没有分配点的所有其他对)可以省略,尾随“Z”分隔符也可以省略(当后续树中没有点时)。 最后一个例子,只有一个韧性点的 DK 的完整代码将是“jZ0o”:“死亡骑士”,“第一棵树的尽头”,“第一对天赋中没有点”,“一个点在第二对的第一个天赋中”。

谁能弄清楚什么函数生成上面的查找表? 类的代码中可能有一条线索:按照字母顺序(除了DK,它是在其他类之后添加到游戏中的),它们对应于查找表中的一系列(0,0),(0,3 )、(1,0)、(1,3)、(2,0) 等

The first character indicates the class:

0 Druid
c Hunter
o Mage
s Paladin
b Priest
f Rogue
h Shaman
I Warlock
L Warrior
j Death Knight

The remaining characters indicate where in each tree points have been allocated. Each tree is separate, delimited by 'Z'. So if e.g. all the points are in the third tree, then the 2nd and 3rd characters will be "ZZ" indicating "end of first tree" and "end of second tree".

To generate the code for a given tree, split the talents up into pairs, going left-to-right and top-to-bottom. Each pair of talents is represented by a single character. So for example, in the DK's Blood tree segment, the first character will indicate the number of points allocated to Butchery and Subversion, and the second character will stand for Blade Barrier and Bladed Armor.

What character represents each allocation among the pair? I'm sure there's an algorithm, probably based on the ASCII character set, but all I've worked out so far is this lookup table. Find the number of points in the first talent along the top, and the number of points in the second talent along the left side. The encoded character is at the intersection.

  0 1 2 3 4 5
0 0 o b h L x
1 z k d u p t
2 M R r G T g
3 c s f I j e
4 m a w N n v
5 V q i A y E

So if our Death Knight has one point in Butchery and two points in Subversion, the first character is 'R'. If instead we put no points in those two and five in Blade Barrier, the first two characters will be "0x". Trailing '0's (all the other pairs in the tree with no points allocated) can be omitted, as can trailing 'Z' delimiters (when there are no points in the subsequent trees). For one final example, the entire code for a DK with just a single point in Toughness would be "jZ0o": "Death Knight", "End of the first tree", "No points in the first pair of talents", "one point in the first talent of the second pair".

Can anyone work out what function generates the lookup table above? There's probably a clue in the codes for the classes: in alphabetical order (except for the DK which was added to the game after the others), they correspond to a series in the lookup table of (0,0), (0,3), (1,0), (1,3), (2,0), etc.

寻找一个思念的角度 2024-07-31 08:36:15

如果您访问 http://www.wowhead.com/?talent 并开始使用该天赋当您单击各个框时,您可以在地址栏中看到正在构建的神秘代码。 所以它绝对不是哈希,而是某种编码的结构数据。

当您单击时,代码就会构建起来,构建代码的逻辑将位于该页面上的 JavaScript 中。

所以我的建议是在页面上查看源代码,下载 JavaScript 文件并查看它们。

If you go to http://www.wowhead.com/?talent and start using the talent tree you can see the mysterious code being built up in the address bar as you click on the various boxes. So it's definitely not a hash but some kind of encoded structure data.

As the code is built up as you click the logic for building the code will be in the JavaScript on that page.

So my advice is do a view source on the page, download the JavaScript files and have a look at them.

东走西顾 2024-07-31 08:36:15

我认为它不是哈希值,因为哈希值通常是单向值。 这意味着您无法(轻松)恢复生成哈希码的原始信息。

最好的办法是联系 wowhead.com 的人员并询问他们如何解释此信息。 我相信他们会帮助您了解有关参数使用的编码类型的一些信息。 但如果没有 wowhead.com 开发人员的任何帮助,几乎不可能弄清楚该参数中编码了哪些信息。

我什至不确定你提到的参数是否包含你角色的天赋。 也许它只是一个会话 ID 或类似的东西。 查看浏览器发送到服务器的发布数据,它可能包含一个隐藏字段,其中包含您正在搜索的值(您可以使用 篡改数据 Firefox 插件)。

I think it isn't a hash value, because hash values are normally one-ways values. This means you cannot (easily) restore the original information from which the hash code was generated.

Best thing would be to contact someone from wowhead.com and ask them how to interpret this information. I am sure they will help you out with some information about what type of encoding they use for the parameters. But without any help of the developers from wowhead.com it is almost impossible to figure out what information is encoded into this parameter.

I am not even sure the parameter you mentioned contains the talents of your character. Maybe it's just a session id or something like that. Take a look into the post data your browser sends to the server, it may contain a hidden field with the value you are searching for (you can use Tamper Data Firefox Addon).

悲歌长辞 2024-07-31 08:36:15

我不认为 ozxZ0xfcRMhuVurhstVhc0c 是哈希值。 我认为这是一个密钥(可能以某种方式加密/编码)。 服务器使用此密钥从数据库中检索信息。 由于您无权访问数据库,因此您不知道需要哪个密钥,更不用说如何对其进行编码了。

I don't think ozxZ0xfcRMhuVurhstVhc0c is a hash value. I think it is a key (probably encrypted/encoded in some way). The server uses this key to retrieve information from it database. Since you don't have access to the database you don't know which key is needed, let alone how to encode it.

聚集的泪 2024-07-31 08:36:15

您需要生成哈希的原始函数。
我不认为这是公开的:(

看看这个:哈希维基百科

祝你好运学习如何来编程!

You need the original function that generates the hash.
I don't think that's public though :(

Check this out: hash wikipedia

Good luck learning how to program!

梦断已成空 2024-07-31 08:36:15

这些哈希值很难进行“逆向工程”,除非您知道它是如何生成的。

例如,它可能是:

   s1 = "random_string-" + score;
   hash = encrypt(s1) 
   ...etc

因此很难从哈希中获取原始数据(无论如何,这就是重点)。

你最好的选择是链接到具有最新分数的个人资料..等

These hashes are hard to 'reverse engineer' unless you know how it was generated.

For example, it could be:

   s1 = "random_string-" + score;
   hash = encrypt(s1) 
   ...etc

so it is hard to get the original data back from the hash (that is the whole point anyway).

your best bet would be link to the profile that would have the latest score ..etc

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文