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.
patiencediff ############
This package contains the implementation of the patiencediff
algorithm, as
first described <https://bramcohen.livejournal.com/73318.html>
_ by Bram Cohen.
Like Python's difflib
, this module provides both a convenience unified_diff
function for the generation of unified diffs of text files
as well as a SequenceMatcher that can be used on arbitrary lists.
Patiencediff provides a good balance of performance, nice output for humans, and implementation simplicity.
The code in this package was extracted from the Bazaar <https://www.bazaar-vcs.org/>
_
code base.
The package comes with two implementations:
A Python implementation (_patiencediff_py.py); this implementation only requires a Python interpreter and is the more readable version of the two
A C implementation implementation (_patiencediff_c.c); this implementation is faster, but requires a C compiler and is less readable
To invoke patiencediff from the command-line::
python -m patiencediff file_a file_b
Or from Python::
>>> import patiencediff
>>> print(''.join(patiencediff.unified_diff(
... ['a\n', 'b\n', 'b\n', 'c\n'],
... ['a\n', 'c\n', 'b\n'])))
---
+++
@@ -1,4 +1,3 @@
a
+c
b
-b
-c
FAQs
Python implementation of the patiencediff algorithm
We found that patiencediff demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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.