Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
livesqrd-sdk
Advanced tools
===
start with setup with a require and your domain with the token
var LSQ = require('./lib')
,lsq= new LSQ("your-url.lsq.io","yourToken");
Just specify the collection your calling then the data your passing
lsq.create(collection,model,options,function(err,result){
console.log(err,result)
})
lsq.read(collection,query,options,function(err,result){
console.log(err,result)
})
lsq.update(collection,query,options,model,function(err,result){
console.log(err,result)
})
lsq.delete(collection,query,options,function(err,result){
console.log(err,result)
})
Data that will be saved or updated The data being updated can be saved with deep model meaning if you have an object
{ name : {
first :"john"
,last :"smith"
}
}
you can update just the first name with :
{ 'name.first':'jane'}
or with arrays you can :
{ toys : ['car','truck','drums'] }
you can update just truck with :
{ 'toys.1':'bus'}
where 1 is the index
Mongo Basic Queries Mongo Adv Queries just {} will return all and with the addition of just
{ _id : ''}
{
"touch": false,
"date": "2013-07-12T20:11:13.598Z",
"os": "Mac OS X",
"osVersion": "10.8.4",
"browser": "Chrome",
"version": "27.0.1453.116",
"device": "Desktop",
"deviceType": "pc",
"client": "51def86fe7ae632a2b0000b8",
"profile": "41aef86fa4ae62fa2b0000a8",
"page": "projects",
"_id": "51e062e1178e53e46500000e",
"height": 1079,
"width": 1049
}
"states": {
"type": "Schema.Types.Mixed"
}
"states": {
"click_counter": 1,
"noresults": 11
}
##Client
Session based storage and identification, used for user login, credentials, and other pertaining parameters
Session based entails anonymous and profile attached logins. Unlike Instances they have a long life span: 30 days (subject to change)
Output
{
"_id": "51e06df7a3cd97400c000001",
"a": "uebkjvhg9uwdBBdBflJ1zvej",
"date": "2013-07-12T20:58:31.585Z",
"email": "user@example.com",
"gender": "m",
"page": "login",
"path": "uebkjvhg9uwdbbdbflj1zvej",
"profile": "41aef86fa4ae62fa2b0000a8",
"photo": "",
"states": {},
"timezone": 0,
"event": [],
"ver": false,
"lang": "en",
"v": [],
"login": [],
"ip": [
"165.254.85.1"
]
}
"states": {
"type": "Schema.Types.Mixed"
}
"states": {
"page_counter":1,
"errors":11
}
##Profile *Used for user profiles, levels (groups, collaborations, companies, teams)
{
"states": {
"type": "Schema.Types.Mixed",
"hidden": true
},
"body": {
"type": "Schema.Types.Mixed",
"hidden": true
},
"title": {
"type": "String",
"required": true
},
"path": {
"type": "String",
"required": true,
"unique":true
},
"photo": {
"type": "String"
},
"gender": {
"type": "String",
"lowercase": true,
"trim": true
},
"info": {
"type": "String",
"editor": true
},
"email": {
"type": "String",
"lowercase": true,
"trim": true
},
"group": {
"type": "String",
"default": "",
"lowercase": true,
"trim": true
},
"lang": {
"type": "String"
},
"link":{"type": "Schema.Types.Mixed"},
"contact":{"type": "Schema.Types.Mixed"},
"birthday": {
"type": "Date"
},
"timezone":{
"type":"Number"
},
"profile": [
{
"id": {
"type": "Schema.Types.ObjectId",
"ref": "profile"
},
"title": {
"type": "String"
},
"start": {
"type": "Date"
},
"end": {
"type": "Date"
}
}
]
}
{
"__v": 0,
"_id": "51cf7a5894831db810000009",
"email": "user@example.com",
"gender": "m",
"lang": "en",
"link": {
"facebook": "https://www.facebook.com/zuck",
"twitter": "https://www.twitter.com/mark",
"linkedin": "http://www.linkedin.com/pub/mark-zuckerberg/46/895/358"
},
"path": "yj5iluktq5rlhgqcgvdaxdrq",
"photo": "",
"timezone": -4,
"title": "First Last",
"profile": [],
"group": "client",
"body":{
"firstname": "Mark",
"lastname": "Zuckerberg"
}
"states":{
"rating": 20
}
}
##Role
"role": {
"states": {
"type": "Schema.Types.Mixed"
},
"path": {
"type": "String",
"required": true,
"lowercase": true,
"trim": true,
"unique": true
},
"title": {
"type": "String",
"required": true
},
"create": {
"type": "Number",
"default": 0
},
"delete": {
"type": "Number",
"default": 0
},
"update": {
"type": "Number",
"default": 0
},
"read": {
"type": "Number",
"default": 0
},
"add": {
"type": "Number",
"default": 0
},
"remove": {
"type": "Number",
"default": 0
},
"edit": {
"type": "Number",
"default": 0
},
"destroy": {
"type": "Number",
"default": 0
},
"master": {
"type": "Number",
"default": 0
},
"custom": {
"type": "Schema.Types.Mixed"
}
}
{
"data":{
"token":"123456",
"model": {
"title":"owner",
"path":"owner",
"master": 1
},
"query":{},
"request":"create"
}
}
{
"data":{
"token":"123456",
"model": {
"title":"private",
"path":"private"
},
"query":{},
"request":"create"
}
}
{
"data":{
"token":"123456",
"model": {
"title":"public",
"path":"public",
"read": 1
},
"query":{},
"request":"create"
}
}
##Loader
"loader": {
"states": {
"type": "Schema.Types.Mixed",
"hidden": true
},
"path": {
"type": "String",
"lowercase": true,
"trim": true
},
"title": {
"type": "String",
"required": true
},
"photo": {
"type": "String"
},
"level": {
"type": "Schema.Types.ObjectId",
"ref": "level",
"required": true
},
"publish": {
"type": "Boolean",
"default": true
},
"date": {
"type": "Date",
"required": true
},
"body":{
"type": "Schema.Types.Mixed"
},
"module": [{
"item":{
"type": "Schema.Types.ObjectId",
"ref": "item"
}
,"extra":{
"type": "Schema.Types.Mixed"
}
,"group":{
"type": "String"
}
}],
"time": {
"now": {
"type": "Number",
"default": 0
},
"jump": {
"type": "Number",
"default": 0
},
"nextTime": {
"type": "Number",
"default": 1
},
"gotoTime": {
"type": "Number",
"default": -2
},
"cutTime": [
{
"time": {
"type": "Number"
},
"duration": {
"type": "Number"
}
}
],
"tags":{"type":"[String]"}
},
"loader": {
"type": "Schema.Types.ObjectId",
"ref": "loader"
},
"role": {
"type": "Schema.Types.ObjectId"
},
"group": {
"type": "String",
"lowercase": true,
"trim": true
},
"permisson": [
{
"id": {
"type": "Schema.Types.ObjectId",
"ref": "profile"
},
"role": {
"type": "Schema.Types.ObjectId",
"ref": "role"
}
}
]
}
##Item
"item": {
"states": {
"type": "Schema.Types.Mixed",
"hidden": true
},
"path": {
"type": "String",
"lowercase": true,
"trim": true
},
"title": {
"type": "String",
"default": ""
},
"photo": {
"type": "String"
},
"body": {
"type": "Schema.Types.Mixed"
},
"group": {
"type": "String",
"default": "",
"lowercase": true,
"trim": true
},
"x": {
"type": "Number"
},
"y": {
"type": "Number"
},
"z": {
"type": "Number"
},
"width": {
"type": "Number"
},
"height": {
"type": "Number"
},
"color": {
"type": "String"
},
"role":{
"type": "Schema.Types.ObjectId",
"ref": "role"
},
"permisson": [
{
"id": {
"type": "Schema.Types.ObjectId",
"ref": "profile"
},
"role": {
"type": "Schema.Types.ObjectId",
"ref": "role"
}
}
],
"item": {
"type": "Schema.Types.ObjectId",
"ref": "item"
},
"lock": {
"type": "Schema.Types.Mixed"
},
"date": {
"type": "Date"
},
"geo": {
"type": "[Number]",
"index": "2dsphere",
"sparse": true
},
"box":{
"type": "[Number]",
"index": "2d",
"sparse": true
},
"due": {
"date": {
"type": "Date"
},
"period": {
"type": "Number"
},
"freq": {
"type": "Number"
}
},
"tags":{"type":"[String]"}
}
FAQs
Live Sqrd Node sdk
The npm package livesqrd-sdk receives a total of 1 weekly downloads. As such, livesqrd-sdk popularity was classified as not popular.
We found that livesqrd-sdk 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.