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.
Interact with Microsoft's OneDrive service using the Graph API.
The Graph-OneDrive package facilitates the creation of OneDrive class instances which are objects that you can use to interact with OneDrive sessions. Thus multiple OneDrives can be connected to in parallel.
Functions include:
For the package to connect to the Graph API, you need to have an app registered in the Microsoft Azure Portal. The documentation provides basic guidance on how to register an app.
Note that some Microsoft work and school accounts will not allow apps to connect with them without admin consent.
The package currently requires Python 3.7 or greater.
Install and update using pip which will use the releases hosted on PyPI. Further options in the docs.
pip install -U graph-onedrive
Documentation and examples are provided on GitHub in the docs folder.
This is a simple example using a config file. Refer to the documentation for other instance constructors including inline options.
Run this command in the terminal after installation which will create a config file in the current working directory.
graph-onedrive --configure --authenticate -f "config.json" -k "onedrive"
Save the following in a .py file in the same folder.
from graph_onedrive import OneDriveManager
# Use a context manager to manage the session
with OneDriveManager(config_path="config.json", config_key="onedrive") as my_drive:
# Print the OneDrive usage
my_drive.get_usage(verbose=True)
# Upload a file to the root directory
new_file_id = my_drive.upload_file("my-photo.jpg", verbose=True)
This project itself is subject to BSD 3-Clause License detailed in LICENSE.
The Graph API is provided by Microsoft Corporation and subject to their terms of use.
FAQs
Perform simple tasks on OneDrive through the Graph API.
We found that graph-onedrive 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.