Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
artefact-server
Advanced tools
const ArtefactServer = require('artefact-server')
ArtefactServer({ storage: '/tmp/artefact-example' })
.then(server => {
console.log('artefact server running!')
console.log(server)
//
server.close()
.then(() => console.log('shutdown!')
})
This server can be started in modes: normal/pataka
In pataka mode, the server will do full replication of drives it adds, and will not offer http based file posting or serving. (only http based registration of drives to replicate)
ArtefactServer(opts) => Promise
Starts a local drive (if not in pataka mode), and spins up a web server.
opts
Object optional startup configuration with properties:
pataka
Boolean whether this is starting in pataka mode (default false
)dev
Boolean whether to start in dev mode. This auto-sets opts.storage
to a tmp folder (default :false
)host
String host for the file server (default: 'localhost'
)port
Number the port for the file server (default: 1234
)storage
String absolute path to where you want to store blobs (default: ~/.artefact-store
)storeOpts
Object options you want internal artefact-store to be started with. (see artefact-store docs)Promise
return resolves with a an object:
{
pataka, // boolean
host,
port,
store, // artefact-store instance (inspect for more detail)
close // function which close server and internal store. returns Promise
}
/drive
connect to a driveAddress, and if in pataka mode, fully replicate the drive
Body:
driveAddress
- the address of a remote drive (32 bytes, hex)responds with:
{ "ok": "true" }
or
{ "error": "error message" }
/blob
add a file to your drive (not available in pataka mode)
Body:
localFilePath
: the path to a local file to addreadKey
: key to use for encrypting the file (32 bytes, hex) - optional. If not given, will create one.blobId
: the id/ path to give the file on the drive - optional. If not given, will be derived from localFilePath
responds with:
{
"driveAddress": "...",
"readKey": "...",
"blobId": "...",
"fileName": "..." // original fileName
}
/drive/:driveAddress/blob/:blobId
retrieve a file (not available in pataka mode)
Params:
driveAddress
- address of drive where blob is stored (hex)blobId
- id of blob within that storeQuery:
readKey
String (hex)
start
Number (optional)
0
end
Number (optional)
EOF
fileName
String (optional)
responds with a binary stream (for use with render-media
) - can also be viewed directly in the browser (but seeking not available)
/
- send front-end to browser (not yet merged)to install, npm link artefact-store and artefact-render
to run:
./bin.js <options>
Options can be:
--help
display usage information--host <hostname>
set hostname (defaults to localhost)--port <port>
set port number (defaults to 1234)--storage <path>
set local storage directory (defaults to ~/.artefact-store)--pataka
start in pataka modeFAQs
Makes artefact-store available over http
The npm package artefact-server receives a total of 0 weekly downloads. As such, artefact-server popularity was classified as not popular.
We found that artefact-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.