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.
better-jsonp
Advanced tools
A minimal JSONP implementation which is used to be a kind of cross domain solution.
import JSONP from 'jsonp'
const jsonp = new JSONP({
url: 'http://localhost',
prefix: 'customName',
timeout: 5000
callbackParams: 'customCallbackParams',
urlParams: {
key0: 1,
key2: 2
// ...
},
callback: data => console.log(data)
})
options parameter | type | required | description |
---|---|---|---|
url | String | true | request url |
timeout | Number | false, default : 6000 | how long after timeout error is emitted. 0 to disable |
prefix | String | false, default: callback | prefix of global callback function name which is used to handle JSONP response |
callbackName | String | false, default : prefix + Date.now() | global callback function name which is used to handle JSONP response |
callbackParams | String | false, default: jsonpCallback | name of query parameter to specify the callback name |
urlParams | Object | false, default: {} | other parameters in query string parameters |
callback | Function | true | This callback which is in global callback function will be invoked when JSONP response |
FAQs
A simple JSONP implementation
The npm package better-jsonp receives a total of 17 weekly downloads. As such, better-jsonp popularity was classified as not popular.
We found that better-jsonp 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.