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.
@tabcat/orbit-db-fsstore
Advanced tools
an orbit-db store representing a file system
IMPORTANT: The fsstore creates a root directory named '/r' and every path must be built ontop/contained inside of this!
npm install @tabcat/orbit-db-fsstore
check out ./test for more info
returns a new path by combining path and name
const newPath = fsstore.joinPath('/r/this/is/a', 'path')
// '/r/this/is/a/path'
returns a bool, true if path exists and false if not
const exists = fsstore.exists('/r/file1')
// true
returns the content type at path or undefined if path doesn't exist
const json = fsstore.content('/r')
// 'dir'
const json = fsstore.content('/r/file1')
// 'file'
returns the json data written at path or undefined if path doesn't exist
const json = fsstore.read('/r/file1')
// { hello: 'ipfs cid' }
return an array of all paths located under the path in the store state
const pathTree = fsstore.tree('/r/dir1')
// ['/r/dir1/file2', '/r/dir1/dir2', '/r/dir1/dir2/file2']
return an array of only paths located inside the path in the store state
const pathLs = fsstore.ls('/r/dir1')
// ['/r/dir1/file2', '/r/dir1/dir2']
makes a new directory at joinPath(path, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.mkdir('/r', 'dir1')
removes an existing directory at path returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.rmdir('/r/dir1')
moves an existing directory at path to joinPath(dest, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.mvdir('/r/dir1', '/r', 'dir2')
copies an existing directory at path to joinPath(dest, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.cpdir('/r/dir1', '/r', 'dir1')
make a new file at joinPath(path, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.mk('/r', 'file1')
map json (any JSON-serializable value) to a file path (!!! do not store blob data in orbitdb, ONLY REFERENCES) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.write('/r/file1', { hello: 'ipfs cid' })
remove an existing file at path returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.rm('/r/file1')
move an existing file at path to joinPath(dest, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.mv('/r/file1', '/r', 'file2')
copy an existing file at path to joinPath(dest, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.cp('/r/file1', '/r', 'file2')
FAQs
a custom orbit-db store representing a file system
The npm package @tabcat/orbit-db-fsstore receives a total of 0 weekly downloads. As such, @tabcat/orbit-db-fsstore popularity was classified as not popular.
We found that @tabcat/orbit-db-fsstore demonstrated a not healthy version release cadence and project activity because the last version was released 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.