Skip to content

mirko-pagliai/cakephp-link-scanner

Repository files navigation

LinkScanner plugin

Software License CI codecov Codacy Badge CodeFactor

LinkScanner is a CakePHP plugin for recursively scanning links: starting from a full base url, it performs GET requests, checks the status codes, inspects the response bodies and, if it finds other links, it continues recursively scanning.

gif of terminal

Did you like this plugin? Its development requires a lot of time for me. Please consider the possibility of making a donation: even a coffee is enough! Thank you.

Make a donation


Installation

You can install the plugin via composer:

$ composer require --prefer-dist mirko-pagliai/cakephp-link-scanner

Then you have to load the plugin. For more information on how to load the plugin, please refer to the Cookbook.

Simply, you can execute the shell command to enable the plugin:

bin/cake plugin load LinkScanner

This would update your application's bootstrap method.

Installation on older CakePHP and PHP versions

Recent packages and the master branch require at least CakePHP 5.0 and PHP 8.1 and the current development of the code is based on these and later versions of CakePHP and PHP. However, there are still some branches compatible with previous versions of CakePHP and PHP.

For PHP 7.4 and CakePHP 4.3 or later

The php7.4 branch requires at least PHP >=7.4 and CakePHP ^4.3.

In this case, you can install the package as well:

$ composer require --prefer-dist mirko-pagliai/cakephp-link-scanner:dev-php7.4

Note that the php7.4 branch will no longer be updated as of January 7, 2024, except for security patches, and it matches the 1.1.18 version.

For PHP 7.2 or later

The php7.2 branch requires at least PHP 7.2.

In this case, you can install the package as well:

$ composer require --prefer-dist mirko-pagliai/cakephp-link-scanner:dev-php7.2

Note that the php7.2 branch will no longer be updated as of May 3, 2022, except for security patches, and it matches the 1.1.11 version.

For PHP 5.6 and CakePHP 3 or later

The cakephp3 branch requires at least PHP 5.6 and CakePHP 3.

In this case, you can install the package as well:

$ composer require --prefer-dist mirko-pagliai/cakephp-link-scanner:dev-cakephp3

Note that the cakephp3 branch will no longer be updated as of May 7, 2021, except for security patches, and it matches the 1.1.6 version.

Configuration

It's not essential, but it may be useful to set the App.fullBaseUrl value correctly refer to the Cookbook, especially if you plan to use the plugin mainly on your app, so as not to have to indicate the full base url which to start the scan every time.

How to use

Please, refer to the wiki:

In addition, you can refer to our API.

To do list

  • allow the use of a configuration file for the shell;
  • allow to export results as html and/or xml.

Versioning

For transparency and insight into our release cycle and to maintain backward compatibility, Assets will be maintained under the Semantic Versioning guidelines.

About

A CakePHP plugin for recursively scanning links

Resources

License

Stars

Watchers

Forks

Packages

No packages published