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.
rss-to-facebook
Advanced tools
This is the module that you need to send rss news to a facebook page.
This is the module that you need to send rss news to a facebook page.
support for:
npm i rss-to-facebook
const rssToFacebook = require("rss-to-facebook");
const {
FACEBOOK_APP_ID, FACEBOOK_APP_SECRET, FACEBOOK_PAGE_ACCES_TOKEN, FACEBOOK_PAGE_ID,
} = process.env;
rssToFacebook({
facebookAppID: FACEBOOK_APP_ID,
facebookAppSecret: FACEBOOK_APP_SECRET,
facebookPageAccesToken: FACEBOOK_PAGE_ACCES_TOKEN,
facebookPageID: FACEBOOK_PAGE_ID,
cron: "*/15 * * * * *", // publish every 15 seconds, cron sintaxis
timezone: "America/Havana", // your defined timezone
// rss source
source: "https://feed.informer.com/digests/ZO8A5LZCGA/feeder.rss", // can be an async function or and array of objects
// source: async () => {
// return db.get({ limit: 10 }); // your custom db
// },
// source: [{colo:"red"}],
// add new fields to show in the message
preprocess: async (item) => {
item.color = "green";
return item;
},
// define you own message template
template:
'Color is {{color}}, <a href="{{image}}"> </a> <b><a href="{{link}}">{{title}}</a></b>\n @{{channel}}',
// filter news of the day, use this function to filter already published posts
filter: async ({ date }) => { // async functtion
// must be async
const d = new Date();
return (
date.getDate() === d.getDate() &&
date.getMonth() === d.getMonth() &&
date.getFullYear() === d.getFullYear()
);
},
// add extra common fields to all items,
extraFields: { colo: "red", line: "stroke" }, // add line field to all items and overwrite color field
});
# ┌────────────── second (optional)
# │ ┌──────────── minute
# │ │ ┌────────── hour
# │ │ │ ┌──────── day of month
# │ │ │ │ ┌────── month
# │ │ │ │ │ ┌──── day of week
# │ │ │ │ │ │
# │ │ │ │ │ │
# * * * * * *
0 */5 * * * *
0 */15 * * * *
0 30 * * * *
0 0,5,10 * * * *
0 */30 * * * *
More example https://crontab.guru/examples.html
https://github.com/moment/moment-timezone/blob/develop/data/packed/latest.json
use the preprocess function to add fields, then modify the template to show the new fields in the message
rssToTelegram({
...
preprocess: async (item) => {
item.color = "green";
return item;
},
template: 'Color is {{color}}, Link is {{link}}, Title is {{title}} \n @{{channel}}',
...
})
Donate Bitcoin:
bitcoin:3GqQcxFk5y7onUyoTKqZHwoWXvLusqJSVG
3GqQcxFk5y7onUyoTKqZHwoWXvLusqJSVG
Contact: fabiel.leon.oliva@gmail.com
FAQs
This is the module that you need to send rss news to a facebook page.
We found that rss-to-facebook 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.