Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Unofficial wrapper for the TransIP STACK API, written in Python 3
Unfortunately due to a decision over at TransIP going forward STACK will no longer be free and all free accounts will be removed by February 12th 2021. As a result, I have decided to officially end support of this library as I personally believe there are far better quality cloud storage providers for the same price.
To install the library, simply install it using pip:
$ pip install transip-stack-api
For development installations
$ pip install -e .[dev]
To use the project, simply import the library into your project like so:
from transip_stack import Stack, StackException
with Stack(username="foo", password="bar", hostname="stack.example.com") as stack:
try:
url = stack.upload("local-foo.txt", remote="remote-foo.txt").share()
print("[+] You can download remote-foo.txt at: {}".format(url))
except StackException as e:
print("[!] Error: {}".format(e))
The package also ships with a command line interface to easily upload files in your current working directory to stack. Configuration is done via environment variables:
$ export STACK_USERNAME=...
$ export STACK_PASSWORD=...
$ export STACK_HOSTNAME=...
$ export STACK_DIRECTORY=...
Then simply use the tool:
$ stack upload .
Note that the command line interface is a work in progress
from io import BytesIO
from transip_stack import Stack, StackException
with Stack(username="foo", password="bar", hostname="stack.example.com") as stack:
for file in stack.files:
print(file.name)
for file in stack.ls("foo"):
print(file.name)
stack.cd("/foo")
for file in stack.files:
if not file.is_shared:
file.share()
print(file.share_url)
user = stack.user("admin")
user.name = "John Doe"
user.save()
user = stack.user_or_create_new(
name="Someone Else",
username="someone",
password="Pa$$w0rd!",
disk_quota=5 * 1000 * 1000)
print(user.is_admin) # -> False
with Stack(username="someone", password="Pa$$w0rd!", hostname="stack.example.com") as stack:
stack.upload("foo.txt")
stack.download("foo.txt", "example.txt")
buff = BytesIO()
stack.download_into("foo.txt", buffer=buff)
print(buff.getvalue().decode())
try:
user = stack.user('admin')
except StackException as e:
print(e) # -> "Access denied .."
Without context managers:
from transip_stack import Stack
stack = Stack(username="foo", password="bar", hostname="stack.example.com")
stack.login()
stack.cd("/foo")
for file in stack.files:
file.unshare()
stack.logout() # Important
/login
/logout
/api/files
/api/files/update
/api/files/update
/api/pathinfo
/api/files/update
/api/users
/api/users/update
GET /api/users
/api/users/update
/files
in a meta tag with the name csrf-token
Node (Dict)
User (Dict)
FAQs
Unofficial wrapper for the TransIP STACK API
We found that transip-stack-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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.