# cendertron

> Renders webpages using headless Chrome for usage by bots

Latest version **0.0.4** (published 2019-05-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install cendertron
pnpm add cendertron
yarn add cendertron
bun add cendertron
```

Provides the command `cendertron`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2019-05-20 |
| First published | 2019-05-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=7 |
| Dependencies | 14 |
| Unpacked size | 169.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 205 |
| Maintainers | wxyyxc1992 |

## Links

- npm: https://www.npmjs.com/package/cendertron
- Repository: https://github.com/wxyyxc1992/Chaos-Scanner/blob/master/crawlers/cendertron/README.md
- npm.io page: https://npm.io/package/cendertron

## Dependencies (14)

- [koa](https://npm.io/package/koa.md) ^2.5.2
- [semver](https://npm.io/package/semver.md) ^5.5.1
- [winston](https://npm.io/package/winston.md) ^3.1.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^7.0.0
- [koa-send](https://npm.io/package/koa-send.md) ^5.0.0
- [koa-route](https://npm.io/package/koa-route.md) ^3.2.0
- [puppeteer](https://npm.io/package/puppeteer.md) ^1.7.0
- [url-parse](https://npm.io/package/url-parse.md) ^1.4.4
- [koa-static](https://npm.io/package/koa-static.md) ^5.0.0
- [node-cache](https://npm.io/package/node-cache.md) ^4.2.0
- [koa-compress](https://npm.io/package/koa-compress.md) ^3.0.0
- [koa-bodyparser](https://npm.io/package/koa-bodyparser.md) ^4.2.1
- [chrome-launcher](https://npm.io/package/chrome-launcher.md) ^0.10.2
- [chrome-remote-interface](https://npm.io/package/chrome-remote-interface.md) ^0.26.1

## Recent versions

- 0.0.4 (latest) — 2019-05-20
- 0.0.3 — 2019-05-19
- 0.0.2 — 2019-05-17
- 0.0.1 — 2019-05-17

## README

# Cendertron

> Cendertron = Crawler + cendertron

Crawl AJAX-heavy client-side Single Page Applications (SPAs), deploying with docker, focusing on scraping requests(page urls, apis, etc.), followed by pentest tools(Sqlmap, etc.).

Cendertron can be used for extracting requests(page urls, apis, etc.) from your Web 2.0 page, view in [demo](http://47.99.50.115:5000/) page, or [result](http://47.99.50.115:5000/apis/http://testphp.vulnweb.com/AJAX/) page.

# Deploy

- Run locally

```sh
$ git clone ...
$ yarn install
$ npm run dev
```

- Deploy in Docker

```sh
# build image
$ docker build -t cendertron .

# run as contaner
$ docker run -it --rm -p 3000:3000 --name cendertron-instance cendertron

# run as container, fix with Jessie Frazelle seccomp profile for Chrome.
$ wget https://raw.githubusercontent.com/jfrazelle/dotfiles/master/etc/docker/seccomp/chrome.json -O ~/chrome.json
$ docker run -it -p 3000:3000 --security-opt seccomp=$HOME/chrome.json --name cendertron-instance cendertron

# or
$ docker run -it -p 3000:3000 --cap-add=SYS_ADMIN --name cendertron-instance cendertron

# use network and mapping logs
$ docker run -d -p 5000:3000 --cap-add=SYS_ADMIN --name cendertron-instance --network wsat-network cendertron
```

## Test Urls

- http://testphp.vulnweb.com/AJAX/#
- http://demo.aisec.cn/demo/
- https://jsonplaceholder.typicode.com/

# Use as Libs

Install cendertron from NPM:

```sh
# set not downloading chromium
$ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

$ yarn add cendertron
# or
$ npm install cendertron -S
```

Import `Crawler` and use in your code:

```js
```

# About

## Roadmap

- [x] 将自定义参数的爬虫全部划归到 POST 中，POST 请求会进行 Body 存储与匹配
- [x] 引入自定义的 BrowserEventEmitter，全局仅注册单个 Browser 监听器
- [x] add https://github.com/winstonjs/winston as logger
- https://123.125.98.210/essframe
- [ ] 分别添加调度器级别与爬虫级别的监控

## Motivation & Credits

- [gremlins.js](https://github.com/marmelab/gremlins.js/): Monkey testing library for web apps and Node.js

---
_Source: https://npm.io/package/cendertron · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
