承接 seanhayes-com/laravel5-probe-detection 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

seanhayes-com/laravel5-probe-detection

Composer 安装命令:

composer require seanhayes-com/laravel5-probe-detection

包简介

A Laravel 5 package to log known website probing attacks.

README 文档

README

Log and ban known website probing attacks and eliminate wasted site resources

Minimum Requirements

Laravel 5.1 and PHP 5.5.9

Installation

You can install the package via composer:

composer require seanhayes-com/laravel5-probe-detection

Step 2: Configuration

Add the following to your config/app.php in the providers array:

SeanHayes\Probe\ProbeServiceProvider::class,
Torann\GeoIP\GeoIPServiceProvider::class,

You should also add the following to the aliases array:

'Probe'     => SeanHayes\Probe\ProbeFacade::class,
'GeoIP'     => Torann\GeoIP\GeoIPFacade::class,

You can then publish the migration with:

php artisan vendor:publish --provider="SeanHayes\Probe\ProbeServiceProvider" --tag="migrations"

After the migration has been published you can create the prob_log table by running the migrations:

php artisan migrate

You can optionally publish the config file with:

php artisan vendor:publish --provider="SeanHayes\Probe\ProbeServiceProvider" --tag="config"

Configuration

Change settings in config/probe.php

Add routes to handle certain common attack vectors or URIs added to watch_uris in config/probe.php

Route::get('/wp-login.php', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::get('/{name}/wp-login.php', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::get('/wp-admin/', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::get('/wp-content/', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::get('/{name}/wp-admin/', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::get('/xmlrpc.php', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::get('/wp-cron.php', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::post('/wp-login.php', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::post('/{name}/wp-login.php', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::post('/wp-admin/', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::post('/{name}/wp-admin/', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::post('/xmlrpc.php', function () {
	\SeanHayes\Probe\Probe::logRequest();
});
Route::post('/wp-cron.php', function () {
	\SeanHayes\Probe\Probe::logRequest();
});

Usage

Include the path in your Controller or AppServiceProvider

use SeanHayes\Probe\Probe;

And the call to process the request in your method

Probe::logRequest();

Troubleshooting

If you experience file cache errors, you can change your CACHE_DRIVER to array in your .env file.

CACHE_DRIVER=array

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固