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.
Package that allows easy generation of progress bars. Originally on my NameGenerator project.
Run the command pip install libprogress
. If you want to specify a specific Python version to use for pip, use a command such as pip3
or pip3.8
.
The following is an example that utilizes a progress bar with default length.
import libprogress
for i in range(20): # example loop
do(something) # put the code to do what you are tracking the progress of
print(libprogress.genbar(curprg=i+1, maxprg=20), end="\r") # print progress
print(libprogress.genfullbar(prg=20)) # print the last bar
Final output:
[####################] 100% [20/20]...done
If you don't put end="\r"
, then each progress bar won't overwrite the last. The output will look like the following:
[#-------------------] 5% [1/20]
[##------------------] 10% [2/20]
[###-----------------] 15% [3/20]
[####----------------] 20% [4/20]
[#####---------------] 25% [5/20]
[######--------------] 30% [6/20]
[#######-------------] 35% [7/20]
[########------------] 40% [8/20]
[#########-----------] 45% [9/20]
[##########----------] 50% [10/20]
[###########---------] 55% [11/20]
[############--------] 60% [12/20]
[#############-------] 65% [13/20]
[##############------] 70% [14/20]
[###############-----] 75% [15/20]
[################----] 80% [16/20]
[#################---] 85% [17/20]
[##################--] 90% [18/20]
[###################-] 95% [19/20]
[####################] 100% [20/20]
[####################] 100% [20/20]...done
libprogress is licensed under the GPLv3 license. For more information, please refer to LICENSE
.
FAQs
Library containing progress bar generator
We found that libprogress demonstrated a healthy version release cadence and project activity because the last version was released less than 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.