deCloudflare/tool/api_for_ismm_isat/README.md

51 lines
1.6 KiB
Markdown
Raw Normal View History

2022-08-20 19:54:32 -04:00
## Simple API files for IsMM/IsAT Add-ons
2021-10-14 07:09:40 -04:00
### Requirements
2022-08-20 19:56:44 -04:00
- Web server (or somethig like [builtin server](https://www.php.net/manual/en/features.commandline.webserver.php))
2021-10-14 07:09:40 -04:00
- PHP 7 or later
2022-08-20 19:56:44 -04:00
2021-10-14 07:09:40 -04:00
2021-10-14 07:11:11 -04:00
2022-08-20 19:54:32 -04:00
### 1a. Set up API for `Are links vulnerable to MITM attack?`(isMM)
2021-10-14 07:09:40 -04:00
2023-12-05 20:12:40 -05:00
Pick A or B.
> Type A: download JSON files and use them locally
1. Copy [ismm.php](ismm.php) to your website directory.<br>
2023-12-05 20:12:40 -05:00
e.g. `/api/ismm.php` (you can rename it)
2. Create `listdata` directory.<br>
e.g. `/api/listdata/`
3. Download JSON files (*.json) from [/cloudflare_users/domains](../../cloudflare_users/domains) and save them to dir above.<br>
2023-02-23 22:16:47 -05:00
e.g. `/api/listdata/cloudflare_e.json`<br>
(you can use [cfdomains --dl](../cfdomains/README.md) to download JSON)
4. Open your API. It should say `OK`.<br>
e.g. `http://localhost/api/ismm.php`
2021-10-14 07:09:40 -04:00
2023-12-05 20:12:40 -05:00
> Type B: Use KarmaAPI online service
1. Copy [ismm_online.php](ismm_online.php) to your website directory.<br>
e.g. `/api/ismm_online.php` (you can rename it)
2. Open your API. It should say `OK`.<br>
e.g. `http://localhost/api/ismm_online.php`
2021-10-14 07:11:11 -04:00
2022-08-20 19:54:32 -04:00
### 1b. Set up API for `Will these links block Tor user?`(isAT)
2021-10-14 07:09:40 -04:00
1. Copy [isat.php](isat.php) to your website directory.<br>
e.g. `/api/isat.php`
2022-08-20 19:54:32 -04:00
2. Create `listdata` directory.<br>
e.g. `/api/listdata/`
3. Download JSON files (*.json) from [/anti-tor_users/domains](../../anti-tor_users/domains) and save them to dir above.<br>
2023-02-23 22:16:47 -05:00
e.g. `/api/listdata/antitor_e.json`
2022-08-20 19:54:32 -04:00
4. Open your API. It should say `OK`.<br>
e.g. `http://localhost/api/isat.php`
2021-10-14 07:09:40 -04:00
2021-10-14 07:17:53 -04:00
### 2. Use your API
1. Open Add-on's `Options` page.
2. Select `API URL`.
3. Input your API URL into right box.
4. Done!