Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
# Python12
pip install camera-service-api==1.1.0
# Python7
pip install camera-service-api==1.1.1
pip install grpcio grpcio-tools protobuf
create_camera_service_api
localhost
6000
# host
api = create_camera_service_api(host, port)
get_camera_metas
def get_camera_metas(self) -> List[CameraMeta]:
...
metas = api.get_camera_metas()
for meta in metas:
print(f"Camera modelName: {meta.modelName} - deviceVersion: {meta.deviceVersion}")
print("get camera image serialNumber ", meta.serialNumber)
print("get info ", meta.info)
GIGE
| u3v
input camera serial number and return live image (jpg), bytes.
and if return None
means the camera maybe offline.
and using try .. except
for catch exception
def get_image(self, sn: str) -> bytes:
...
Example:
...
body = api.get_image(meta.serialNumber)
print(" body : ", len(body) )
...
fopen = open('test.jpg', 'wb+')
fopen.write( body )
fopen.close()
...
import time
import grpc
from services.cameras.camera_service_api import create_camera_service_api
max_test = 100
def test_camera_api(host, port):
#
api = create_camera_service_api(host, port)
metas = api.get_camera_metas()
for meta in metas:
print(f"Camera modelName: {meta.modelName} - deviceVersion: {meta.deviceVersion}")
print("get camera image serialNumber ", meta.serialNumber)
print("get info ", meta.info)
t1 = time.time()
try:
for i in range( max_test ):
body = api.get_image(meta.serialNumber)
print(" body : ", i, len(body) )
except Exception as e:
print( e)
t2 = time.time()
tt = t2-t1
avg = tt / max_test
print( f" Try {max_test} times get image , using {tt} , avg {avg} ")
# fopen = open('body.jpg'.encode('utf-8'), 'wb+')
# fopen.write( body, )
# fopen.close()
# protect the entry point
if __name__ == '__main__':
print("GRPC Version : {} ".format(grpc.__version__))
test_camera_api("127.0.0.1", 6000)
FAQs
Camera service grpc api
We found that camera-service-api 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.