Please note, this is a STATIC archive of website hashcat.net from 08 Oct 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.

hashcat Forum

Full Version: TXT4List app code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Guys and Gals....
Since I´m from another country and have Portuguese as my first language, I was looking for Portuguese wordlists and become A little frustrated with what I´ve found. I decided that a good way to make good word lists in Portuguese is to change some .txt books (in portuguese) to a wordlist... after much time seeking an app to do that I found some python scripts that didn´t work for me. Then since I know how to program a little in Lua language I made a short code that worked well for me. Of course the final lists have a lot of garbage and the code needs a lot of improvement in a way that we can have cleaner lists, but it helped me a lot and I believe it will also help people looking for the same thing that I was needing.
Give it a try...
Feel free to improve my code and suggest positive modifications.

Code:
--This program converts any text in txt format to a wordlist

local open = io.open
local function read_file(path)
   local file = open(path, "rb") -- r read mode and b binary mode
   if not file then return nil end
   local content = file:read "*a" -- *a or *all reads the whole file
   file:close()
   return content
end

local s = read_file("MyText.txt"); --Replace the name with your .txt file
for w in s:gmatch("%S+") do print(w)
file = io.open("List.txt", "a") --This will be the final list
file:write(w, "\n")
file:close()
end
--Written by Azimuth7 in Lua language
You can check out wlc from here https://sec.stanev.org/?download
This should work on Portuguese wikipedia dumps, maybe with small changes.
P.s. I'm the author, used that for wpa-sec dicts generation.

(02-06-2018, 03:16 AM)Azimuth7 Wrote: [ -> ]Guys and Gals....
Since I´m from another country and have Portuguese as my first language, I was looking for Portuguese wordlists and become A little frustrated with what I´ve found. I decided that a good way to make good word lists in Portuguese is to change some .txt books (in portuguese) to a wordlist... after much time seeking an app to do that I found some python scripts that didn´t work for me. Then since I know how to program a little in Lua language I made a short code that worked well for me. Of course the final lists have a lot of garbage and the code needs a lot of improvement in a way that we can have cleaner lists, but it helped me a lot and I believe it will also help people looking for the same thing that I was needing.
Give it a try...
Feel free to improve my code and suggest positive modifications.

Code:
--This program converts any text in txt format to a wordlist

local open = io.open
local function read_file(path)
   local file = open(path, "rb") -- r read mode and b binary mode
   if not file then return nil end
   local content = file:read "*a" -- *a or *all reads the whole file
   file:close()
   return content
end

local s = read_file("MyText.txt"); --Replace the name with your .txt file
for w in s:gmatch("%S+") do print(w)
file = io.open("List.txt", "a") --This will be the final list
file:write(w, "\n")
file:close()
end
--Written by Azimuth7 in Lua language
Thank you very much !!! I´ll use your file for sure!