Samyak2 / toipe

yet another typing test, but crab flavoured
MIT License
596 stars 31 forks source link

I'm missing OS wordlist from install #58

Closed umop3plsdn closed 9 months ago

umop3plsdn commented 11 months ago

Firstly I tried typing 'toipe -w' as suggested to get a list of default wordlists, however, I only got an error instead 'error: The argument '--wordlist ' requires a value but none was supplied' which isn't a big deal since you can get them with --help. Anyways, I tried using 'toipe -w os' seeing it in the list of defaults but it gives me error: Error: ToipeError: No such file or directory (os error 2). Anyone know how to fix this and get the OS list?

doomed-neko commented 10 months ago

yeah the code seems to depend on a wordlist located in /usr/share/dict/words which I don't seem to have on my device but since I have the wordlists package installed on my arch machine, setting the os wordlist path to something like

# src/wordlists.rs:77
pub const OS_WORDLIST_PATH: &str = "/usr/share/wordlists/seclists/Passwords/Leaked-Databases/rockyou.txt";

this change sets the os wordlist to the rockyou password list which of course is not something good to train on but that means you can just change the path in src/wordlists.rs to any wordlist of your choice and that should solve it. this is not an issue with the package but we just don't have the files it searches for.

Samyak2 commented 9 months ago

@umop3plsdn could you provide some more details on the OS/distro you're on? Toipe looks for the /usr/share/dict/words file when you choose -w os. See this wiki article for more information on that - including which package provides the list on various distros.

Currently, I don't intend to support searching for other word lists when /usr/share/dict/words is missing. Perhaps the error message could be better.

Samyak2 commented 9 months ago

Also @n30mrx, you don't need to make a code change to use a custom wordlist. You can make use of the -f/--file flag instead. For example: toipe -f /usr/share/wordlists/seclists/Passwords/Leaked-Databases/rockyou.txt.