![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
A Python implementation of the Winnowing (local algorithms for document fingerprinting)
Readme
A Python implementation of the Winnowing (local algorithms for document fingerprinting)
The original research paper can be found at http://dl.acm.org/citation.cfm?id=872770.
You may install winnowing
package via pip
as follows:
::
pip install winnowing
Alternatively, you may also install the package by cloning this repository.
::
git clone https://github.com/suminb/winnowing.git
cd winnowing && python setup.py install
.. code:: python
>>> from winnowing import winnow
>>> winnow('A do run run run, a do run run')
set([(5, 23942), (14, 2887), (2, 1966), (9, 23942), (20, 1966)])
>>> winnow('run run')
set([(0, 23942)]) # match found!
Default Hash Function
Quite honestly, I did not know what hash function to use. The paper did
not talk about it. So I decided to use a part of SHA-1; more precisely,
the last 16 bits of the digest.
Custom Hash Function
~~~~~~~~~~~~~~~~~~~~
You may use your own hash function as demonstrated below.
.. code:: python
def hash_md5(text):
import hashlib
hs = hashlib.md5(text)
hs = hs.hexdigest()
hs = int(hs, 16)
return hs
# Override the hash function
winnow.hash_function = hash_md5
winnow('The cake was a lie')
Lower Bound of Fingerprint Density
(TODO: Write this section)
FAQs
A Python implementation of the Winnowing (local algorithms for document fingerprinting)
We found that winnowing 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
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.