
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
libarchive-ruby-gvalmon
Advanced tools
= libarchive-ruby
This is libarchive-ruby, your preferred archiving toolkit in Ruby! libarchive-ruby is a Ruby binding to the famous {libarchive library}[http://code.google.com/p/libarchive/] and supports nearly all features the library exposes through it's C++ interface.
librarchive-ruby focuses on a clean and ruby-like syntax that makes it trivial to create, read, write and extract archive files of various formats. Want to know more? Keep reading!
== Prerequesites
In order to successfully install libarchive-ruby, you need the following:
== How to install?
=== RubyGems
This is the easiest and preferred way. Ensure you have a proper built environment for C++ code, and then do
=== Building from source
If you want to be on the bleeding etch, clone the our {git repository at GitHub}[https://github.com/Hanmac/libarchive-ruby]:
$ git clone https://github.com/Hanmac/libarchive-ruby.git $ cd libarchive-ruby
Then you can either choose to use the library from that directory by running
$ rake compile
or to make a gem and install that one.
$ rake gem
== How to use?
First, you have to require the library:
require "archive" #Note this is NOT "libarchive-ruby"
Then you can use the beautiful rubyish API:
=== Read an archive
Assuming, you have "myarchive.tar.bz2" in the current directory.
a = Archive.new("myarchive.tar.bz2") puts "This archive contains:" a.each{|entry| puts entry}
#Archive includes the Enumerable module, making available all that #nice enumerating functionality: puts All entries in uppercase are: puts a.map{|entry| entry.path.upcase}.join("\n")
#Furthermore, you can even read from the files contained in the #archive without actually extracting it: a.each{|entry, data| puts "Content of #{entry} is: #{data}"}
=== Extract an archive
Assuming you have "myarchive.tar.bz2" in the current directory.
a = Archive.new("myarchive.tar.bz2")
#Extract all files to the current directory a.extract
#Extract a specific file a.extract("mydir/myfile")
#Restrict what file attributes are extracted: a.extract(:extract => Archive::EXTRACT_OWNER | Archive::EXTRACT_TIME)
#Extract only files whose path is longer than 5 characters a.extract_if{|entry| entry.path.size > 5}
=== Create an archive
Assuming you have three files "a.rb", "b.cpp" and "README.rdoc" in your current directory:
a = Archive.new("myarchive.tar.gz") a << "a.rb" << "b.cpp" << "README.rdoc"
If you have more than one file to add you can use an Array:
a = Archive.new("myarchive.tar.gz") a << ["a.rb", "b.cpp", "README.rdoc"]
You can manipulate the entry witch is added to the file:
a = Archive.new("myarchive.tar.gz") a.add("a.rb") {|entry| entry.mtime = Time.now }
#Note how libarchive-ruby automatically picked up the archive format #you wanted by examining the file extension: a = Archive.new("myarchive.tar.gz") puts a.format_name #=> POSIX ustar format
== Further reading
Have a look at the documentation for the Archive and Archive::Entry classes for more information.
== Contributors
The following people have worked on libarchive-ruby beside me:
== License
libarchive-ruby is a Ruby binding for the C library libarchive.
Copyright © 2011 Hans Mackowiak
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=== Contact
You can read me via the email address hanmac ÄT gmx DÖT de.
FAQs
Unknown package
We found that libarchive-ruby-gvalmon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.