Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid byte sequence in US-ASCII (ArgumentError) #9

Open
altjx opened this issue Oct 25, 2021 · 2 comments
Open

invalid byte sequence in US-ASCII (ArgumentError) #9

altjx opened this issue Oct 25, 2021 · 2 comments

Comments

@altjx
Copy link

altjx commented Oct 25, 2021

Fresh install of the latest version of Kali's docker container, ran apt install urlcrazy -y and tried to run it. The following error appeared:

Traceback (most recent call last):
        6: from ./urlcrazy:57:in `<main>'
        5: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
        4: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
        3: from /usr/share/urlcrazy/common-misspellings.rb:3:in `<top (required)>'
        2: from /usr/share/urlcrazy/common-misspellings.rb:17:in `<class:CommonMisspellings>'
        1: from /usr/share/urlcrazy/common-misspellings.rb:17:in `delete_if'
/usr/share/urlcrazy/common-misspellings.rb:17:in `block in <class:CommonMisspellings>': invalid byte sequence in US-ASCII (ArgumentError)
@saberpanamira
Copy link

same problem......any solutions???

@altjx
Copy link
Author

altjx commented Jan 15, 2022

invalid byte sequence in US-ASCII

In common-misspellings.rb, change line 17 from:

@@file_contents=File.readlines($LOAD_PATH.first + "/common-misspellings.txt").delete_if { |line| line =~ /^#/ or line =~ /^[ ]*$/ }.join

to

@@file_contents=File.readlines($LOAD_PATH.first + "/common-misspellings.txt", :encoding => 'UTF-8').delete_if { |line| line =~ /^#/ or line =~ /^[ ]*$/ }.join

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants