TXT4List app code
#1
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


Messages In This Thread
TXT4List app code - by Azimuth7 - 02-06-2018, 03:16 AM
RE: TXT4List app code - by RealEnder - 02-06-2018, 09:21 AM
RE: TXT4List app code - by Azimuth7 - 02-07-2018, 08:32 PM