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.
Gulel is an express based application server that manages Twitch Webhooks with minimal setup
Gulel is an express based application server that manages Twitch Webhooks with minimal setup. It uses ngrok to make the local server reachable by Twitch servers.
It handles most of the stuff automatically for you.
Note: As of April 30, 2020, all Helix endpoints require OAuth and matching client IDs. See this announcement for more details. Gulel is already compatible with the changes announced.
npm install gulel
Gulel is an express based application server with additional methods for handling Twitch Webhooks.
const gulel = require('gulel')
gulel.subscribe('/users/follows?first=1&to_id=1337', (data) => {
// data passed from Twitch is available as an argument
console.log(data)
/*{
"data": [
{
"from_id": "1336",
"from_name": "ebi",
"to_id": "1337",
"to_name": "oliver0823nagy",
"followed_at": "2017-08-22T22:55:24Z"
}
]
}*/
})
This creates a new route for the subscription on the express server. It starts listening for both GET
& POST
calls. GET
method is needed by Twitch to confirm the subscription. POST
method is to receive data from Twitch.
Each subscription is automatically subscribed when the server starts and renewed around 1 minute before they expire. The default expiry is set at 1 hour.
/users/follows?first=1&to_id=1337
is the topic to subscribe to. More topics are documented at dev.twitch.tv.
gulel.start({
twitch: {
accessToken: '<access token>',
clientId: '<client id>'
},
server: {
port: 3000
}, () => console.log('Gulel is listening for Twitch calls'))
// Output
// Gulel is listening at https://39697b582cd8.ngrok.io -> http://localhost:3000
This starts the express server on a port configured with routes for the subscriptions mounted. The express server is also available on the internet as a subdomain for ngrok.io
and therefore, the local server is reachable for Twitch servers to send data.
Type quit
in the terminal where the server is running and press enter
. This will also unsubscribe from any active subscriptions.
Gulel is shutting down
Unsubscribing from active subscriptions
Few examples are available in the examples directory.
twitch.secret
This secret will be used as hub.secret
while creating subscriptions. If not configured, the application will generate one.
twitch.accessToken
User's Access Token for authenticating Twitch APIs.
twitch.clientId
Client ID for the Twitch application.
Tip! If you want to try out the server without creating a Twitch application, you can use an online token generator to get an access token and client id. This will also help you to get an access token with the scopes needed by some subscriptions.
server.port
Local port number where the server will listen on. Should be a number.
server.tunnel
If true
, ngrok service will be used. The default value is true
Head over to the issues tab at github.com to report a bug or suggest an improvement. Feel free to contribute to the code or documentation by creating a pull request.
FAQs
Gulel is an express based application server that manages Twitch Webhooks with minimal setup
The npm package gulel receives a total of 0 weekly downloads. As such, gulel popularity was classified as not popular.
We found that gulel 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.