Quantcast
Channel: hashcat Forum - All Forums
Viewing all articles
Browse latest Browse all 7675

TXT4List app code

$
0
0
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

Viewing all articles
Browse latest Browse all 7675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>