
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
命令行参数简易工具.
# bash
pip install xy_argparse
# main.py
from argparse import Namespace
from xy_argparse.ArgParse import ArgParse
class Runner(ArgParse):
@property
def version(self):
return "0.0.1"
def __init__(self):
self.prog = "xy_conda"
self.description = "conda相关工具"
def main(self):
self.default_parser()
self.add_arguments()
self.parse_arguments()
if self.work:
self.run_arguments()
else:
self.parser.print_help()
def add_arguments(self):
self.add_argument(
flag="-w",
name="--work",
help_text="""
工作方式:
"backup",
"install",
"install_pack",
"load",
""",
)
def on_arguments(
self,
name,
value,
arguments=None,
):
if name == "work":
if value == "backup":
self.backup()
return False
elif value == "load":
self.load()
return False
elif value == "install":
self.install()
return False
elif value == "install_pack":
self.install_pack()
return False
return True
def backup(self):
print("output backup")
def load(self):
print("output load")
def install(self):
print("output install")
def install_pack(self):
print("output install_pack")
@property
def work(self):
arguments = self.arguments()
if isinstance(arguments, Namespace):
return arguments.work
return None
if __name__ == "__main__":
runner = Runner()
runner.main()
# bash
python main.py -w backup
# output backup
xy_argparse 根据 <木兰宽松许可证, 第2版> 获得许可。有关详细信息,请参阅 LICENSE 文件。
如果小伙伴们觉得这些工具还不错的话,能否请咱喝一杯咖啡呢?
微信: yuyangiit
邮箱: yuyangit.0515@qq.com
FAQs
xy_argparse 模块
We found that xy-argparse 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
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.