Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Zinzout
is a naïve wrapper that uses Zlib::Gzip[Reader/Writer] to make
dealing with gzipped files a little easier.
Basically:
# The following code should work no matter which filename is used
# filename = nil # STDIN/STDOUT
# filename = 'textfile.txt'
filename = 'textfile.txt.gz'
outfilename = 'results_' + filename unless filename.nil?
infile = Zinzout.zin(filename, encoding: "utf-8")
outfile = Zinzout.zout(outfilename) # "utf-8" is the default
infile.each {|line| blah.blah }
outfile.puts "All done!"
# Much like using `File#open`, Zinzout will automatically close files
# (but not STDIN/STDOUT!) if given a block
Zinzout.zout(outfilename) do |outfile|
Zinzout.zin(filename) do |infile|
infile.each do |line|
outfile.puts(line)
end
end
end
Zinzout
isn't smart. It's just convenient.
Zinzout::zin
Zlib::GzipReader
or a File
Zinzout::zout
Zlib::GzipWriter
File
In particular, note that there's no attempt to sniff STDIN to see if it's gzipped, or to force compression before writing to STDOUT.
Bug reports and pull requests are welcome on GitHub at https://github.com/billdueber/zinzout.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that zinzout 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.