
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
puppet-bot
Advanced tools
Build a bot using puppeteer extra. Support multiple tab, single tab and easy multi-process integration with queue. Built-in reddit bot and more Easyly customize your bot with API
Install globally as root:
# npm install -g puppet-bot
On Ubuntu or Mac OS X systems install using sudo:
$ sudo npm install -g puppet-bot
For access to the API just add package puppet-bot to your package.json devDependencies:
{
...
"devDependencies": {
"puppet-bot": "*"
},
...
}
Should be used at least with Node.js v10 or later:
puppet-bot allows you to build your bot using puppeteer extra, or you can use build-in bot (eg: reddit bot)
Using reddit bot or another (use help command to research):
$ reddit -h OR $ reddit auto -h
puppet-bot You can be controlled using an API
const { Page, Browser, Reddit } = require('puppet-bot');
const {StealthPlugin} = require('puppeteer-extra-plugin-stealth');
var queue = require('queue');
(async () => {
var loginReddit = new Reddit();
await loginReddit.init('https://www.reddit.com/login', [StealthPlugin()]);
if (await loginReddit.validate()) {
await loginReddit.open();
await loginReddit.signIn('your-reddit-user', 'your-reddit-pass);
var browser = loginReddit.browser;
var searchReddit = new Reddit(browser);
await searchReddit.init('https://www.reddit.com/search/?q=comics', [StealthPlugin()]);
await searchReddit.open();
await searchReddit.scroll();
var links = await searchReddit.getPostUrls();
var q = queue({ results: [], concurrency: 10, autostart: false });
for (let i in links) {
q.push(async function (cb) {
let p = new Reddit(browser);
await p.init(links[i], [StealthPlugin()]);
await p.open();
await p.comment("+1 vote");
await p.vote();
await p.close();
cb(null, true);
});
}
q.start(async function (err) {
if (err) console.log(err);
await searchReddit.close();
await browser.close();
})
}
})();
Using to build a bot class
const { Page } = require('puppet-bot');
export class YourBot extends Page {
}
Udating...
...The file examples/index.mjs shows a complete example.
Copyright (c) 2022 Hưng Lê hunglsxx@gmail.com and contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Build your bot with puppeteer extra. Using build-in reddit bot and more
We found that puppet-bot 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.