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.
Simple library for working with CouchDB
Create a database object to work with. Will create the DB if it doesn't exist
@db = Smeg2::Database.new('http://localhost:5984/smeg2-test')
@db = Smeg2::Database.new('http://localhost:5984/smeg2-test', false)
Save a new document
id = @db.save({:document_title => 'New Document', :documents => 'are just a hash')
id_of_document_saved = id
revision_of_document_saved = revision
Get a document
doc = @db.get(document_id)
# with revision
doc = @db.get(document_id, revision)
Save an existing document
id = @db.save(existing_document_loaded_from_db)
new_revision = id.revision
Delete a document
@db.delete(document_id_or_document_object)
Run a design document
@db.design('DesignDoc/_view/viewname')
=> An array of documents
# with parameters
@db.design('DD/_list/listname/viewname', :key => ab..fg, :xyz => 7)
=> An array of documents
# Iterator Method
@db.design('DesignDoc/_view/viewname') do |doc|
#invoked for each document
p doc
end
Delete the database
@db.delete_database
Create the database
@db.create_database
== Copyright
Copyright (c) 2009 Lincoln Stoll. See LICENSE for details.
FAQs
Unknown package
We found that smeg2 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.