
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
rest-but-less
Advanced tools
rest-but-less is a lightweight and easy-to-use Node.js module designed to simplify the creation of RESTful APIs. With rest-but-less, you can quickly define endpoints for various HTTP request methods such as GET
, POST
, PATCH
, PUT
, DELETE
, OPTIONS
, and HEAD
. It automatically handles injecting dependencies from POST data, URL parameters, or a service list, making API development a breeze. Easily switch between NodeJS & AWS Lambda!
npm i rest-but-less
get
, post
, patch
, put
, Delete
, options
, and head
.Import the rest-but-less module into your Node.js application:
import { useNode, get, post, patch, Delete, put, head, options, ResponseResult } from 'rest-but-less'
Define your endpoints using the provided functions:
// Define a GET endpoint
get('/users/:id', (id:number, db:unknown): Promise<ResponseResult> => {
// Retrieve user data from the database using the provided id
});
// Define a POST endpoint
// userData is equivalent to POST.userData (or $_POST['userData'] for you PHP fans)
post('/users', (userData:Record<string,any>, db:unknown): Promise<ResponseResult> => {
// Create a new user in the database using the provided userData
});
Inject dependencies into your endpoints using the service list:
import { addService } from 'rest-but-less';
// Add a service to the service list (e.g., a MySQL database connection)
addService('db', dbInstance);
// Access the service within endpoint functions
get('/users', (db) => {
// Access the database connection (db) to retrieve user data
});
Starting a server is fairly easy.
import { useLambda } from 'rest-but-less'
export const handler = async (event, context) => {
// load in routes prior....
return await useLambda(event)
};
import { useNode } from 'rest-but-less'
useNode({
httpPort: 8080
})
import { useNode } from 'rest-but-less'
useNode({
httpPort: 8080,
httpsPort: 443,
httpsCertPath: 'path/to/cert.pem',
httpsKeyPath: 'path/to/key.pem'
})
rest-but-less is licensed under the MIT License. Feel free to use, modify, and distribute it as needed.
FAQs
Rest API, less code
The npm package rest-but-less receives a total of 0 weekly downloads. As such, rest-but-less popularity was classified as not popular.
We found that rest-but-less 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.