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.
Generate test data, company with tb-schema.
The base class.
console.log(mocker.constructors)
// [ 'Activity',
// 'Apprelation',
// 'Collection',
// 'Consumer',
// 'Customfield',
// 'Devicetoken',
// 'Entry',
// 'Event',
// 'Feedback',
// 'Integration',
// 'Member',
// 'Notice',
// 'Organization',
// 'Post',
// 'Project',
// 'Projecttemplate',
// 'Stage',
// 'Subscriber',
// 'Subtask',
// 'Smartgroup',
// 'Tag',
// 'Task',
// 'Tasklist',
// 'Team',
// 'Token',
// 'User',
// 'View',
// 'Work' ]
A example for User
:
mocker.user(): Return simple mocker user.
console.log(mocker.user())
// User {
// name: 'name0',
// email: 'email0@mocker.org',
// emails: [ { email: 'email0@mocker.org', state: 0 } ],
// password: 'sha1$303cee$d4b5b28cf8c06200000d890bd401a85a8b6556ed',
// authUpdated: 1458818469463 }
mocker.user(obj): Return simple mocker user with custom data.
console.log(mocker.user({name: 'tester', email: 'tester@tb.com'}))
// User {
// name: 'tester',
// email: 'tester@tb.com',
// emails: [ { email: 'tester@tb.com', state: 0 } ],
// password: 'sha1$303cee$d4b5b28cf8c06200000d890bd401a85a8b6556ed',
// authUpdated: 1458818487941 }
new mocker.User(): Same as mocker.user().
new mocker.UserModel(mocker.user()): Return mongoose user model.
console.log(new mocker.UserModel(mocker.user()))
// { emails:
// [ { _id: 56f25241d4d16b31888c0e80,
// state: 0,
// email: 'email0@mocker.org' } ],
// title: '',
// location: '',
// website: '',
// created: Wed Mar 23 2016 16:22:25 GMT+0800 (CST),
// updated: Wed Mar 23 2016 16:22:25 GMT+0800 (CST),
// isActive: false,
// isAdmin: false,
// isBlock: false,
// isPay: false,
// latestActived: null,
// hasLoginToday: false,
// hasLoginTalk: false,
// googleTwoFactor: null,
// signUpIP: null,
// signUpCity: null,
// lastEntered: {},
// _id: 56f25241d4d16b31888c0e7f,
// authUpdated: 1458721345492,
// password: 'sha1$303cee$d4b5b28cf8c06200000d890bd401a85a8b6556ed',
// email: 'email0@mocker.org',
// name: 'name0' }
FAQs
Generate test data, company with tb-schema.
The npm package tb-mocker receives a total of 0 weekly downloads. As such, tb-mocker popularity was classified as not popular.
We found that tb-mocker 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.