Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
pip install ntchat2
国内源安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ntchat2
有了ntchat,如果你想要给文件传输助手发一条信息,只需要这样
# -*- coding: utf-8 -*-
import sys
import ntchat2
wechat = ntchat2.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
# wechat.open(smart=False)
# 微信登录出现登录限制时,使用faked_wechat_version伪造版本号
wechat.open(smart=False, faked_wechat_version="3.9.10.19")
# 等待登录
wechat.wait_login()
# 向文件助手发送一条消息
wechat.send_text(to_wxid="filehelper", content="hello, filehelper")
try:
while True:
pass
except KeyboardInterrupt:
ntchat2.exit_()
sys.exit()
# -*- coding: utf-8 -*-
import sys
import ntchat2
wechat = ntchat2.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
# wechat.open(smart=False)
# 微信登录出现登录限制时,使用faked_wechat_version伪造版本号
wechat.open(smart=False, faked_wechat_version="3.9.10.19")
# 等待登录
wechat.wait_login()
# 获取联系人列表并输出
contacts = wechat.get_contacts()
print("联系人列表: ")
print(contacts)
rooms = wechat.get_rooms()
print("群列表: ")
print(rooms)
try:
while True:
pass
except KeyboardInterrupt:
ntchat2.exit_()
sys.exit()
# -*- coding: utf-8 -*-
import sys
import ntchat2
wechat = ntchat2.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
# wechat.open(smart=False)
# 微信登录出现登录限制时,使用faked_wechat_version伪造版本号
wechat.open(smart=False, faked_wechat_version="3.9.10.19")
# 注册消息回调
@wechat.msg_register(ntchat2.MT_RECV_TEXT_MSG)
def on_recv_text_msg(wechat_instance: ntchat2.WeChat, message):
data = message["data"]
from_wxid = data["from_wxid"]
self_wxid = wechat_instance.get_login_info()["wxid"]
# 判断消息不是自己发的,并回复对方
if from_wxid != self_wxid:
wechat_instance.send_text(to_wxid=from_wxid, content=f"你发送的消息是: {data['msg']}")
try:
while True:
pass
except KeyboardInterrupt:
ntchat2.exit_()
sys.exit()
FAQs
wechat robot framework.
We found that ntchat2 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.