implemented the sybil attack script
This commit is contained in:
parent
9f1f1435ce
commit
8d54519771
2 changed files with 23 additions and 7 deletions
|
@ -40,7 +40,9 @@ class PublicAPISecurity:
|
|||
|
||||
if request.host not in transports:
|
||||
# Abort conn if wrong HTTP hostname, to prevent DNS rebinding
|
||||
abort(403)
|
||||
if not public_api.config.get(
|
||||
'general.allow_public_api_dns_rebinding', False):
|
||||
abort(403)
|
||||
public_api.hitCount += 1 # raise hit count for valid requests
|
||||
try:
|
||||
if 'onionr' in request.headers['User-Agent'].lower():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue