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

Ruby "rex-text" dependency missing ? #332

Closed
Bigyls opened this issue Apr 13, 2024 · 3 comments · Fixed by #337
Closed

Ruby "rex-text" dependency missing ? #332

Bigyls opened this issue Apr 13, 2024 · 3 comments · Fixed by #337
Labels
bug Something isn't working

Comments

@Bigyls
Copy link

Bigyls commented Apr 13, 2024

Describe the bug

When I start a new exegol container and I want to use /opt/tools/metasploit-framework/tools/exploit/pattern_create.rb (installed by default), I get an error with a missing dependency (rex-text). After gem install rex-text everything is good.

Because pattern_create.rb is installed by default on exegol, shouldn't the rex-text dependency be installed too?

[Apr 13, 2024 - 21:16:48 (UTC)] exegol /workspace # /opt/tools/metasploit-framework/tools/exploit/pattern_create.rb -l 133
/usr/local/rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/dependency.rb:314:in `to_specs': Could not find 'rex-text' (>= 0) among 91 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-3.2.2:/usr/local/rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0' , execute `gem env` for more information
        from /usr/local/rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/dependency.rb:326:in `to_spec'
        from /usr/local/rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_gem.rb:57:in `gem'
        from /opt/tools/metasploit-framework/tools/exploit/pattern_create.rb:16:in `<main>'
[Apr 13, 2024 - 21:17:30 (UTC)] exegol /workspace # gem install rex-text
Fetching rex-text-0.2.57.gem
Successfully installed rex-text-0.2.57
Parsing documentation for rex-text-0.2.57
Installing ri documentation for rex-text-0.2.57
Done installing documentation for rex-text after 0 seconds
1 gem installed

A new release of RubyGems is available: 3.4.10 → 3.5.9!
Run `gem update --system 3.5.9` to update your installation.

[Apr 13, 2024 - 21:17:54 (UTC)] exegol /workspace # /opt/tools/metasploit-framework/tools/exploit/pattern_create.rb -l 133
Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae3A

Steps To Reproduce

gem install rex-text

Exegol Wrapper Version

v4.3.1

Host OS

None

Configuration of the concerned container

No response

Execution logs in debug mode

/dev/null

Exception

No response

Anything else?

No response

@Bigyls Bigyls added the bug Something isn't working label Apr 13, 2024
@ShutdownRepo ShutdownRepo transferred this issue from ThePorgs/Exegol Apr 14, 2024
@QU35T-code QU35T-code added the under review Time to think about the need / implementation label Apr 15, 2024
@QU35T-code
Copy link
Member

Hey @Bigyls,

Nice catch !
The missing dependency will be added to the build.

Temp fix :

rvm use 3.2.2@metasploit
gem install rex-text
rvm use 3.2.2@default

Solution 1 :

root@exegol metasploit-framework # /usr/local/rvm/gems/ruby-3.2.2@metasploit/wrappers/ruby /opt/tools/metasploit-framework/tools/exploit/pattern_create.rb -l 10
Aa0Aa1Aa2A

Solution 2 :

root@exegol metasploit-framework # rvm use 3.2.2@metasploit
Using /usr/local/rvm/gems/ruby-3.2.2 with gemset metasploit

root@exegol metasploit-framework # /opt/tools/metasploit-framework/tools/exploit/pattern_create.rb -l 10
Aa0Aa1Aa2A

@Bigyls
Copy link
Author

Bigyls commented Apr 15, 2024

Good to know, I think the issue can be done ?

@QU35T-code
Copy link
Member

Don't worry, I'll close when I push the fix :)

@QU35T-code QU35T-code added waiting for fix Waiting for the fix to be added on exegol and removed under review Time to think about the need / implementation labels Apr 15, 2024
@QU35T-code QU35T-code linked a pull request Apr 17, 2024 that will close this issue
@QU35T-code QU35T-code removed the waiting for fix Waiting for the fix to be added on exegol label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants