Open yantongggg opened 3 months ago
Hm.. I looks like a bug in async-http
@postmodern ?
What arguments did you pass to ronin-recon run
@yantongggg ?
@yantongggg nice find. This does appear to be a async-http
bug. I'll report it upstream.
@yantongggg also what version of Ruby are using? I'm trying to reproduce this bug locally.
@AI-Mozi i running this command ronin-recon run youtube.com but run for example.com also coming out this error
@postmodern ruby version: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]
@yantongggg confirmed that this occurs on ruby-3.1.2, but not 3.1.6.
$ gem install async-http
$ irb -r async/http
/home/postmodern/.gem/ruby/3.1.2/gems/async-http-0.72.0/lib/async/http/endpoint.rb:25:in `<class:Endpoint>': uninitialized constant URI::WSS (NameError)
'wss' => URI::WSS,
^^^^^
from /home/postmodern/.gem/ruby/3.1.2/gems/async-http-0.72.0/lib/async/http/endpoint.rb:20:in `<module:HTTP>'
from /home/postmodern/.gem/ruby/3.1.2/gems/async-http-0.72.0/lib/async/http/endpoint.rb:18:in `<module:Async>'
from /home/postmodern/.gem/ruby/3.1.2/gems/async-http-0.72.0/lib/async/http/endpoint.rb:17:in `<top (required)>'
from /home/postmodern/.gem/ruby/3.1.2/gems/async-http-0.72.0/lib/async/http/internet.rb:8:in `require_relative'
from /home/postmodern/.gem/ruby/3.1.2/gems/async-http-0.72.0/lib/async/http/internet.rb:8:in `<top (required)>'
from /home/postmodern/.gem/ruby/3.1.2/gems/async-http-0.72.0/lib/async/http.rb:11:in `require_relative'
from /home/postmodern/.gem/ruby/3.1.2/gems/async-http-0.72.0/lib/async/http.rb:11:in `<top (required)>'
from <internal:/home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
from <internal:/home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
from <internal:/home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb/init.rb:395:in `block in load_modules'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb/init.rb:393:in `each'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb/init.rb:393:in `load_modules'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb/init.rb:21:in `setup'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb.rb:412:in `start'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>'
from /home/postmodern/.rubies/ruby-3.1.2/bin/irb:25:in `load'
from /home/postmodern/.rubies/ruby-3.1.2/bin/irb:25:in `<main>'
<internal:/home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- async/http (LoadError)
from <internal:/home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb/init.rb:395:in `block in load_modules'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb/init.rb:393:in `each'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb/init.rb:393:in `load_modules'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb/init.rb:21:in `setup'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/3.1.0/irb.rb:412:in `start'
from /home/postmodern/.rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>'
from /home/postmodern/.rubies/ruby-3.1.2/bin/irb:25:in `load'
from /home/postmodern/.rubies/ruby-3.1.2/bin/irb:25:in `<main>'
$ irb -r uri/wss -r async/http
irb(main):001:0>
Apparently in uri/wss
isn't required by default. However, there's a quick fix for this. Running gem update uri
will install a newer version of the uri
gem.
$ gem update uri
$ irb -r async/http
irb(main):001:0>
You may want to run sudo gem update uri
since you're using the system's ruby.