Skip to content

Commit 25a1c9f

Browse files
committed
Update infos for v1.0.2
1 parent da86b22 commit 25a1c9f

File tree

2 files changed

+45
-11
lines changed

2 files changed

+45
-11
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@
22

33
All notable changes to `AntiScanScanClub` will be documented in this file.
44

5+
## Version 1.0.2-dev
6+
7+
### Added
8+
9+
- filterFile() method, to prevent client if they're try to access credentials and/ important files/path.
10+
11+
## Version 1.0.1
12+
13+
### Fixed
14+
15+
- filterInput() method
16+
517
## Version 1.0
618

719
### Added
8-
- Everything
20+
21+
- Everything

README.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![LICENSE](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)
77
[![GitHub issues](https://img.shields.io/github/issues/noobsec/AntiScanScanClub-laravel.svg)](https://github.com/noobsec/AntiScanScanClub-laravel/issues)
88
[![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/noobsec/AntiScanScanClub-laravel.svg)](../../pulls?q=is%3Apr+is%3Aclosed)
9-
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/noobsec/AntiScanScanClub-laravel/issues)
9+
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](https://github.com/noobsec/AntiScanScanClub-laravel/issues)
1010

1111
A Laravel Package to Block Automated Scanners from Scanning your Site.
1212

@@ -78,15 +78,22 @@ class AntiScanScanMiddleware
7878
public function handle($request, Closure $next)
7979
{
8080
$ASSC = new AntiScanScanClub();
81+
$blocker = TRUE;
82+
$ASSC->checkIp($request->ip());
83+
8184
$ASSC->checkIp($request->ip());
8285

8386
if ($request->isMethod('GET') && $request->getQueryString() === NULL) {
84-
$data = ['path' => $request->getPathInfo()];
87+
/**
88+
* Prevention of access to credentials and/ important files/path
89+
* (e.g: wp-admin.php, .git/, backups.tar.gz, www.sql)
90+
*/
91+
92+
$ASSC->filterFile($request->getPathInfo(), $blocker, $request->ip());
8593
} else {
86-
$data = $request->all();
94+
$ASSC->filterInput($request->all(), $blocker, $request->ip());
8795
}
8896

89-
$ASSC->filterInput($data, TRUE, $request->ip());
9097
return $next($request);
9198
}
9299
}
@@ -96,7 +103,7 @@ class AntiScanScanMiddleware
96103

97104
```php
98105
protected $middleware = [
99-
...
106+
...
100107
\App\Http\Middleware\AntiScanScanMiddleware::class,
101108
];
102109
```
@@ -130,19 +137,31 @@ var_dump($ASSC->addToBlacklisted($clientIp, $attack)); // @return bool
130137

131138
- **Prevention of illegal input based on filter rules**
132139

133-
**_NOTE: If you call `filterInput()`, you no longer need to call `addToBlacklisted()` method._**
140+
**_NOTE: If you call this, you no longer need to call `addToBlacklisted()` method._**
134141

135142
```php
136143
$data = [
137-
"input" => "Test payload",
138-
"textarea" => "<object/onerror=write`1`//"
144+
"input" => "Test payload",
145+
"textarea" => "<object/onerror=write`1`//"
139146
];
140147
$blocker = TRUE;
141148
$clientIp = '127.0.0.1';
142149
143150
$ASSC->filterInput($data, $blocker, $clientIp); // @return void/bool
144151
```
145152
153+
- **Prevention of access to credentials and/ important files/path**
154+
155+
**e.g: `wp-admin.php`, `.git/`, `backups.tar.gz`, `www.sql`** _(see many more at [filter_files.txt](src/filter_files.txt))_
156+
157+
```php
158+
$url = "/wp-admin.php";
159+
$blocker = TRUE;
160+
$clientIp = '127.0.0.1';
161+
162+
$ASSC->filterFile($url, $blocker, $clientIp); // @return void/bool
163+
```
164+
146165
- **Remove client IP from blacklists file**
147166
148167
```php
@@ -172,7 +191,9 @@ If you discover any security related issues, please email root@noobsec.org inste
172191
## Credits
173192
174193
- [noobSecurity](https://github.com/noobsec)
175-
- [enygma](https://github.com/enygma) _(for filter rules)_
194+
- [dwisiswant0](https://github.com/dwisiswant0)
195+
- [enygma](https://github.com/enygma)
196+
- [maurosoria](https://github.com/maurosoria)
176197
- [All Contributors](../../contributors)
177198
178199
## License
@@ -181,4 +202,4 @@ license. Please see the [LICENSE file](LICENSE) for more information.
181202
182203
## Version
183204
184-
**Current version is 1.0.1** and still development.
205+
**Current version is 1.0.2** and still development.

0 commit comments

Comments
 (0)