-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit refs #64301: Initial commit
- Loading branch information
0 parents
commit 5a95381
Showing
5 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
_notes | ||
Thumbs.db | ||
.DS_Store | ||
.idea | ||
.phpstorm.meta.php | ||
node_modules | ||
PATCHES.txt | ||
mysqldumper | ||
phpMyAdmin-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Kussin | eCommerce und Online-Marketing GmbH | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Kussin | OXID eShop Banned IPs (DDoS Protection) | ||
|
||
This module allows you to ban IP addresses from accessing your OXID eShop.<br> | ||
The module is designed to protect your shop from DDoS attacks. | ||
|
||
## Requirement | ||
|
||
1. OXID eShop Version CE/PE/EE v4.x or newer | ||
2. PHP 7.4 or newer | ||
|
||
## Installation | ||
|
||
1. Download the latest release from [Github](https://github.com/kussin/OxidBannedIps/releases) | ||
2. Unzip the archive | ||
3. Copy the content of the folder `src` to the root of your OXID eShop installation | ||
4. Add the following line to the top of your `/path/to/oxid/source/index.php` file: | ||
``` | ||
include_once dirname(__FILE__) . "/banned_ips.php"; | ||
``` | ||
## Bugtracker and Feature Requests | ||
Please use the [Github Issues](https://github.com/kussin/OxidBannedIps/issues) for bug reports and feature requests. | ||
## Support | ||
Kussin | eCommerce und Online-Marketing GmbH<br> | ||
Fahltskamp 3<br> | ||
25462 Rellingen<br> | ||
Germany | ||
Fon: +49 (4101) 85868 - 0<br> | ||
Email: info@kussin.de | ||
## Licence | ||
[End-User Software License Agreement](LICENSE) | ||
## Copyright | ||
(c) 2006-2024 Kussin | eCommerce und Online-Marketing GmbH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
$aBannedIps = array( | ||
'111.230.204.202', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
// BANNED IPS | ||
include_once dirname(__FILE__) . "/banned_ips.inc.php"; | ||
|
||
// GET REMOTE IP | ||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) { | ||
$sRemoteIp = $_SERVER['HTTP_CLIENT_IP']; | ||
|
||
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { | ||
$sRemoteIp = $_SERVER['HTTP_X_FORWARDED_FOR']; | ||
|
||
} else { | ||
$sRemoteIp = $_SERVER['REMOTE_ADDR']; | ||
} | ||
|
||
// CHECK REMOTE IP | ||
if (in_array($sRemoteIp, $aBannedIps)) { | ||
// BLOCK IP | ||
header('HTTP/1.0 403 Forbidden'); | ||
exit('You are not allowed to access this page.'); | ||
} |