
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Helps import Python extensions from memory, e.g. extensions from Zip files or Web.
memimport
is a part of py2exe
, which helps import Python extensions from
memory, e.g. extensions from Zip files or Web.
This repo via CI to build it as Python extensions, beacause the original has been built into the py2exe runstubs, only run with script, no REPL.
Development of memimport
is hosted here: https://github.com/SeaHOH/memimport.
Development of py2exe
is hosted here: https://github.com/py2exe/py2exe.
pip install memimport
import zipextimporter
import sys
sys.path.insert(0, 'path/to/libs.zip')
then
zipextimporter.install() # default, prefer `hook=False`, `hook=True` as fallback
or
zipextimporter.install(hook=False) # better compatibility, monkey patch `zipimport.zipimporter`
# equal to empty argument, `hook=True` as fallback
or
zipextimporter.install(hook=True) # not recommend, install to `sys.path_hooks`
then
import ext_mod_in_zip # now, support __init__.pyd in packages
ext_mod_in_zip # <module 'ext_mod_in_zip' from 'path\\to\\libs.zip\\ext_mod_in_zip\\__init__.pyd'>
ext_mod_in_zip.__file__ # 'path\\to\\libs.zip\\ext_mod_in_zip\\__init__.pyd'>
ext_mod_in_zip.__loader__ # <ZipExtensionImporter object 'path\to\libs.zip\'>
import py_mod_in_zip
py_mod_in_zip # <module 'py_mod_in_zip' from 'path\\to\\libs.zip\\py_mod_in_zip\\__init__.py'>
py_mod_in_zip.__file__ # 'path\\to\\libs.zip\\py_mod_in_zip\\__init__.py'>
py_mod_in_zip.__loader__ # <zipimporter object 'path\to\libs.zip\'>
More usage see source or use help function.
FAQs
Helps import Python extensions from memory, e.g. extensions from Zip files or Web.
We found that memimport 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.