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.
obfupy is a Python 3 library that can obfuscate whole Python 3 projects, transform the source code to obfuscated and hard to understand code. obfupy aims to produce correct and functional code.
obfupy is a Python 3 library that can obfuscate entire Python 3 projects, transforming source code into obfuscated and difficult-to-understand code. obfupy aims to produce correct and functional code. Several non-trivial real-world projects were tested using obfupy, such as Flask, Nodezator, Algorithms collection, and Django (not all features are enabled for Django).
for
and while
.Apache License, Version 2.0
https://github.com/wqking/obfupy
obfupy requires Python 3.9 or later, it doesn't have any other dependencies.
Install from pip package
pip install obfupy
Install from source code
Clone obfupy repository, change directory to the root of obfupy, then,
pip install -e .
Use from source code without installation
Clone obfupy repository, add following lines in the beginning of your script,
import sys
sys.path.append(PATH_TO_OBFUPY)
A typical Python script using obfupy looks like,
import obfupy.documentmanager as documentmanager
import obfupy.util as util
import obfupy.transformers.rewriter as rewriter
import obfupy.transformers.formatter as formatter
inputPath = PATH_TO_THE_SOURCE_CODE
outputPath = PATH_TO_OUTPUT
# Prepare source code files as DocumentManager
fileList = util.findFiles(inputPath)
documentManager = documentmanager.DocumentManager()
documentManager.addDocument(util.loadDocumentsFromFiles(fileList))
# Transform the source code with various transformers
# Transformer Rewriter
rewriter.Rewriter().transform(documentManager)
# Transformer Formatter
formatter.Formatter().transform(documentManager)
# There are other transformers
# Write the obfuscated code to outputPath
util.writeOutputFiles(documentManager, inputPath, outputPath)
FAQs
obfupy is a Python 3 library that can obfuscate whole Python 3 projects, transform the source code to obfuscated and hard to understand code. obfupy aims to produce correct and functional code.
We found that obfupy 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.