spatie/mixed-content-scanner-cli
Composer 安装命令:
composer require spatie/mixed-content-scanner-cli
包简介
A tool to scan sites for mixed content
README 文档
README
This repo contains a tool called mixed-content-scanner that can help you find pieces of mixed content on your site. This is how you can use it:
mixed-content-scanner scan https://spatie.be
And of course our company site reports no mixed content.
Here's an example of a local test server that does contain some mixed content:
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
You can install the package via composer:
composer global require spatie/mixed-content-scanner-cli
How it works under the hood
When scanning a site, the tool will crawl every page. On all html retrieved, these elements and attributes will be checked:
audio:srcembed:srcform:actionlink:hrefiframe:srcimg:src,srcsetobject:dataparam:valuescript:srcsource:src,srcsetvideo:src
If any of those attributes start with http:// the element will be regarded as mixed content.
The tool does not scan linked .css or .js files. Inline <script> or <style> are not taken into consideration.
Usage
You can scan a site by using the scan command followed by the url
mixed-content-scanner scan https://example.com
Options
SSL verification
You might want to check your site for mixed content before actually launching it. It's quite common your site doesn't have an ssl certificate installed yet at that point. That's why by default the tool will not verify ssl certificates.
If you want to turn on ssl verification just use the verify-ssl option
mixed-content-scanner scan https://self-signed.badssl.com/ --verify-ssl
That examples will result in non responding urls because the host does not have a valid ssl certificate
Filtering and ignoring urls
You can filter which urls are going to be crawled by passing regex to the filter and ignore options.
In this example we are only going to crawl pages starting with /en.
mixed-content-scanner scan https://spatie.be --filter="^\/en"
You can use multiple filters:
mixed-content-scanner scan https://spatie.be --filter="^\/en" --filter="^\/nl"
You can also ignore certain urls. Here we are going to ignore all url's that contain the word opensource.
mixed-content-scanner scan https://spatie.be --ignore="opensource"
Of course you can also combine filters and ignores:
mixed-content-scanner scan https://spatie.be --filter="^\/en" --ignore="opensource"
Ignoring robots
By default, the crawler will respect robots data. You can ignore them though with the --ignore-robots option.
mixed-content-scanner scan https://example.com --ignore-robots
Custom User agent
By default, the crawler uses the underlying guzzle client for the user agent. You can override this value with the --user-agent option.
mixed-content-scanner scan https://example.com --user-agent='MyCustomCrawler'
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker.
Postcardware
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.
We publish all received postcards on our company website.
Credits
The scanner is inspired by mixed-content-scan by Bram Van Damme. Parts of his readme and code were used.
License
The MIT License (MIT). Please see License File for more information.
spatie/mixed-content-scanner-cli 适用场景与选型建议
spatie/mixed-content-scanner-cli 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.49k 次下载、GitHub Stars 达 92, 最近一次更新时间为 2017 年 07 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「https」 「tool」 「spatie」 「mixed-content-scanner-cli」 「mixed-content」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 spatie/mixed-content-scanner-cli 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 spatie/mixed-content-scanner-cli 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 spatie/mixed-content-scanner-cli 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Backend Google Sign On for Magento 2
An app setting manager tool for laravel nova
A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.
URL routing framework and requests/responses handler for PHP
Library implement an Online Certificate Status Protocol (OCSP) responder
The Message Submission Agent Diagnostics tool (msadiag) facilitates testing the compatibility of third party message submission agents.
统计信息
- 总下载量: 2.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 92
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2017-07-30