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.
Simple customisable progress bar for downloading remote files in Ruby.
In your shell:
gem install progress_download
or, form source
git clone https://github.com/Demonstrandum/progress_download.git
cd progress_download/
Then install it:
gem build progress_download.gemspec
gem install progress_download-*
or use it directly:
ruby -Ilib bin/* [OPTIONS] ... [URL]
# or just copy the lib direcotry to where you need it
You may test it out in your terminal by doing:
progress-download [STYLE] [URI]
# For example
progress-download --style pump http://ipv4.download.thinkbroadband.com/10MB.zip
Output should look something like:
‘10MB.zip’ — 8.44 / 10.0 MiB at 1.76 MiB/s in 4.78s
⠴ [ █████████████████████████████████████████████▒▒▒▒▒▒▒▒▒ ] 84%
# ...
‘10MB.zip’ — 10.00 / 10.0 MiB at 1.85 MiB/s in 5.41s
⠶ [ ██████████████████████████████████████████████████████ ] 100%
where the bar fills the entier width of the terminal
# Basic usage
url = 'http://ipv4.download.thinkbroadband.com/10MB.zip'
ProgressBar.download url
# More advanced options include:
ProgressBar.download url, :location => '~/Downloads', :style => :classic, :speed => 0.1, :refresh => 0.5
By default:
:location
is the current working directory (Dir.getwd
):style
is :dots
:speed
is 1
and:refresh
is 0.125
:refresh
is the amount of time between each 'frame' in seconds, by this, :speed
is how many times the spinner updates per frame drawn, meaning thusly that :speed
must be 1 or less, 1 meaning that the spinner advances one step for every 'frame' drawn, and 0.5 would be every second frame, etc.
FAQs
Unknown package
We found that progress_download 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.