Counting with AHK, Letters

本秂侑毒 提交于 2019-12-23 07:09:05

问题


I have been doing some recent experimentation with AHK, an interpreted automation scripting language, that can do tasks such as window move, mouse move, save and log info for files and I have found it very useful. I wanted to make a script that could sort of count, but with characters and symbols, a password list generator. As I need one for my attempts as a white hat.

;list of characters here
send, aaaaa
;then
send, aaaab

using a method like this I would very much appreciate help on the matter, thank you!


回答1:


If you are looking for a brute force kind of function, you could try this one:

BruteForce(Chars, Min, Max, Prefix, Stage)
{
   Loop, Parse, Chars
   {
      If (Stage >= Min-1)
         FileAppend, % Prefix A_loopField "`n", BruteForce.txt ;you could replace the line with: Send % Prefix A_loopField
      If (Stage < Max-1)
         BruteForce(Chars, Min, Max, Prefix A_LoopField, Stage + 1)
   }
}

BruteForce("abc", 1, 2, "", 0) ;this would create every possible combination of the letters abc (min length 1, max length 2)

The result is stored in the file BruteForce.txt



来源:https://stackoverflow.com/questions/25707231/counting-with-ahk-letters

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!