Sliim / pentest-env

Pentest environment deployer (kali linux + targets) using vagrant and chef.
http://sliim.github.io/pentest-env/
GNU General Public License v3.0
628 stars 169 forks source link

ArgumentError "\x80\x00\x00\x00\e\xA3V\xC0" is not an octal string #49

Closed jcmoreno closed 5 years ago

jcmoreno commented 5 years ago

Hi,

I'm installing this on the very latest version of Kali 2018.4, and I'm having issues doing the "bundle exec berks vendor -d"

I get the following argument error: ArgumentError "\x80\x00\x00\x00\e\xA3V\xC0" is not an octal string

...
I, [2018-11-06T01:14:26.396480 #900]  INFO -- : Installing selinux_policy (2.1.0)
D, [2018-11-06T01:14:26.399569 #900] DEBUG -- :   Already installed - skipping install
Using pentester (1.6.1)
D, [2018-11-06T01:14:26.400041 #900] DEBUG -- :   Already installed - skipping install
Using selinux_policy (2.1.0)
ArgumentError "\x80\x00\x00\x00\e\xA3V\xC0" is not an octal string
    /usr/lib/ruby/2.5.0/rubygems/package/tar_header.rb:128:in `strict_oct'
    /usr/lib/ruby/2.5.0/rubygems/package/tar_header.rb:108:in `from'
    /usr/lib/ruby/2.5.0/rubygems/package/tar_reader.rb:59:in `each'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/mixlib-archive-0.4.18/lib/mixlib/archive/tar.rb:28:in `block in extract'
    /usr/lib/ruby/2.5.0/rubygems/package/tar_reader.rb:29:in `new'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/mixlib-archive-0.4.18/lib/mixlib/archive/tar.rb:145:in `reader'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/mixlib-archive-0.4.18/lib/mixlib/archive/tar.rb:26:in `extract'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/mixlib-archive-0.4.18/lib/mixlib/archive.rb:47:in `extract'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.6/lib/berkshelf/community_rest.rb:15:in `unpack'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.6/lib/berkshelf/community_rest.rb:94:in `download'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.6/lib/berkshelf/downloader.rb:71:in `try_download'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.6/lib/berkshelf/downloader.rb:41:in `block in download'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.6/lib/berkshelf/downloader.rb:40:in `each'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.6/lib/berkshelf/downloader.rb:40:in `download'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.6/lib/berkshelf/installer.rb:108:in `install'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/berkshelf-7.0.6/lib/berkshelf/installer.rb:181:in `block (2 levels) in install_from_universe'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `block in synchronize'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/executor/safe_task_executor.rb:19:in `execute'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/ivar.rb:169:in `safe_execute'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/future.rb:55:in `block in execute'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch'
    /opt/pentest-env/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `block in create_worker'
jcmoreno commented 5 years ago

The following post helped me:

eyespies commented on this issue 1 month ago. I ran into this error with this cookbook when running Berkshelf in my CI/CD process using bundler and a Rakefile. It worked fine when I installed ChefDK and use the CLI berks command, but always failed when I ran bundle exec rake lint spec. I finally tracked down that I had to apt-get install libarchive13 and include in my Gemfile gem ffi-libarchive, otherwise the mixlib-archive Gem falls back to using Tar module instead of libarchive and Tar on Linux doesn't work well with archives built on a Mac without special options on the Mac side.

https://www.bountysource.com/issues/58523239-when-installing-the-cookbook-i-get-error-argumenterror-x80-x00-x00-x00d-x9e-xd3-xd9-is-not-an-octal-string

Good luck top anyone else!