Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Use this code to read .adicht (Labchart) files into Python. Interfacing with the ADIstruments DLL is done via cffi.
pip install adi-reader
import adi
f = adi.read_file(r'C:\Users\RNEL\Desktop\test\test_file.adicht')
# All id numbering is 1 based, first channel, first block
# When indexing in Python we need to shift by 1 for 0 based indexing
# Functions however respect the 1 based notation ...
# These may vary for your file ...
channel_id = 2
record_id = 1
data = f.channels[channel_id-1].get_data(record_id)
import matplotlib.pyplot as plt
plt.plot(data)
plt.show()
For upgrading to 3.8, I installed Python 3.8. Within the interpreter I ran the following:
C:\Users\RNEL\AppData\Local\Programs\Python\Python39-32\python
import subprocess
import sys
#https://stackoverflow.com/questions/12332975/installing-python-module-within-code
def install(package):
subprocess.call([sys.executable, "-m", "pip", "install", package])
install("setuptools")
install("cffi")
import os
#This would need to be changed based on where you keep the code
os.chdir('E:/repos/python/adinstruments_sdk_python/adi')
# For 64 bit windows
exec(open("cffi_build.py").read())
#------------------------- ONLY IF 32 BIT WINDOWS -------------------
# For 32 bit windows
exec(open("cffi_build_win32.py").read())
pip install twine
. Then I changed my drive e:
changes to the E drive and then cd'd to the directory to run:
python setup.py sdist bdist_wheel
twine upload dist/*
This was written extremely quickly and is missing some features. Feel free to open pull requests or to open issues.
FAQs
Reading LabChart recorded data
We found that adi-reader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.