Detection of the wordlist charset
This commit is contained in:
@@ -70,3 +70,12 @@ def puts(o = '')
|
||||
end
|
||||
super(o)
|
||||
end
|
||||
|
||||
class File
|
||||
# @param [ String ] file_path
|
||||
#
|
||||
# @return [ String ] The charset of the file
|
||||
def self.charset(file_path)
|
||||
%x{file -i #{file_path}}[%r{charset=([^\n]+)\n}, 1]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user