Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Welcome to pysol
Copyright (C) 2013/2017 Laurent Labatut / Laurent Champagnac
pysolbase is a set of python helpers to ease development.
It is gevent (co-routines) based.
Engage gevent monkey patching and setup default logger configuration:
SolBase.voodoo_init()
Initialize logging system (without engaging gevent) with default configuration (ie console logs - there is support for syslog and file logs).
SolBase.logging_init("INFO")
Re-initialize logging system (without engaging gevent):
SolBase.logging_init("DEBUG", True)
Millis helpers:
ms = SolBase.mscurrent()
do_something()
ms_elapsed = SolBase.msdiff(ms)
Date helpers
dt = SolBase.datecurrent()
do_something()
ms_elapsed = SolBase.datediff(dt)
Binary helpers
bin_buf = SolBase.unicode_to_binary('This is my text buffer', encoding='utf-8')
unicode_string = SolBase.binary_to_unicode(bin_buf, encoding='utf-8')
File helpers
FileUtility.append_text_to_file('/tmp/test.txt', 'This is my text buffer', 'utf-8')
bin_buf = FileUtility.file_to_binary('/tmp/test.txt')
unicode_string = FileUtility.file_to_text('/tmp/test.txt', 'utf-8')
Exception helper
try:
a = None
b = a + 1
except Exception as e:
logger.warn("Ex=%s", SolBase.extostr(e))
test_
or Test
, should implement setUp and tearDown methodsTo run unittests, you will need:
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
FAQs
Set of python helpers to ease development
We found that pysolbase 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.