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.
libfaketime-tz-wrapper
Advanced tools
A wrapper around python-libfaketime that introduces timezone-awareness.
A wrapper around python-libfaketime <https://github.com/simon-weber/python-libfaketime>
__
that introduces awareness for (django) timezones.
Install with pip:
.. code-block:: sh
$ pip install libfaketime-tz-wrapper
libfaketime needs the LD_PRELOAD variable to be set.
If you run your tests in PyCharm, add it to the environment variables of your test configuration in PyCharm:
.. code-block::
name: LD_PRELOAD
value: /home/foo/<snip>/vendor/libfaketime/src/libfaketime.so.1
If you run tests in the command line, export this environment variable when running the test command:
.. code-block:: sh
$ LD_PRELOAD=/home/foo/<snip>/vendor/libfaketime/src/libfaketime.so.1 <run test command>
In both cases, replace the part with the correct path to where the libfaketime package was installed.
.. code-block:: python
import datetime
from libfaketime import fake_time
def get_tomorrow():
return datetime.date.today() + datetime.timedelta(days=1)
@fake_time('2014-01-01 00:00:00')
def test_get_tomorrow():
assert get_tomorrow() == datetime.date(2014, 1, 2)
FAQs
A wrapper around python-libfaketime that introduces timezone-awareness.
We found that libfaketime-tz-wrapper 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.