且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

需要建立有效的穷举搜索算法帮助

更新时间:2023-11-24 08:31:28

要优化一个锁蛮力攻击,你可以使用的德布鲁因序列的。

To optimize a brute-force attack on a lock, you can use De Bruijn sequences.

该序列可用于缩短蛮力攻击一个针状code锁,没有一个ENTER键,并接受最后n个数字输入。例如,一个数字门锁与一个4位数code将具有B(10,4)的解决方案,具有长度万。因此,仅需要至多万+ 3 = 10003(作为解决方案是环状的)presses打开锁。尝试C $ CS所有$分别需要4×10,000 = 40000 presses。

The sequence can be used to shorten a brute-force attack on a PIN-like code lock that does not have an "enter" key and accepts the last n digits entered. For example, a digital door lock with a 4-digit code would have B(10, 4) solutions, with length 10,000. Therefore, only at most 10,000 + 3 = 10,003 (as the solutions are cyclic) presses are needed to open the lock. Trying all codes separately would require 4 × 10,000 = 40,000 presses.