如何从给定的 GUID 预测下一个 GUID? [英] How to predict the next GUID from a given GUID?

查看:18
本文介绍了如何从给定的 GUID 预测下一个 GUID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经向我们的客户发送了 10000 封邮件,每封邮件都有一个格式的链接

I have sent 10000 mails to our customers and each mail had a link of the format

http://example.com/LogIn?key={guid}

不幸的是,我发送的 guid 是随机 guid(由 Guid.NewGuid() 生成的测试数据),所以客户都收到了无效链接...

Unfortunately the guid I sent were random guids (test data generated by Guid.NewGuid()) so the customers have all received invalid links...

根据我从网络服务器收到的 404,我有一些我发送的 guid.我读过 Windows 中的 guid 生成器很弱,​​因此您可以从已有的 guid 预测下一个 guid.有谁知道怎么做?如果我能做到这一点,我可以使我发送的 guid 有效,这样链接就会再次起作用.

Based on the 404s i receive from the webserver I have a few guids that I sent out. I have read that the guid generator in windows is weak so you can predict the next guid from one you already have. Does anyone know how? If i could do that I could make the guids I sent out valid so the links would work again.

推荐答案

Windows 生成 GUID 的方式已经改变了好几次,网上很多看似可靠的建议是完全错误的(也许只是过时了,也许总是完全错了).

The way Windows has generated GUIDs has changed several times, and lots of seemingly reliable advice on the internet is completely wrong (maybe just out of date, maybe always completely wrong).

我最后一次研究这个(几年前,可能是 XP SP2)时,我直接进入操作系统代码以查看实际发生的情况,它正在生成一个带有 安全随机数生成器.

The last time I looked into this (a few years ago, probably XP SP2), I stepped right down into the OS code to see what was actually happening, and it was generating a random number with the secure random number generator.

如果您以默认方式生成 GUID,我怀疑您会很幸运地从另一个 GUID 中预测它们.

I doubt you'll have much luck predicting one GUID from another if you generated them in the default way.

这篇关于如何从给定的 GUID 预测下一个 GUID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆