当前位置:网站首页>How to prevent malicious crawling of information by one-to-one live broadcast source server
How to prevent malicious crawling of information by one-to-one live broadcast source server
2022-07-03 23:06:00 【Cloudleopard network technology】
In the process of running the one-to-one live broadcast source code , The generated data will be stored on the server , For any platform , Data security is the problem that needs to be solved most in data storage . Except for malicious access 、 Domain name hijacking and other data problems , Some crawlers will crawl website information maliciously , At this time, it is necessary to intercept , Prevent data leakage .
The one-to-one live broadcast source code can be configured on demand nignx The environment and Apache Environmental Science , Achieve interception , The specific operation steps are as follows :
One 、Nginx Environment :
1. create profile
For example, enter nginx Install under directory conf Catalog , establish : test…conf
The contents are as follows :
# prohibit Scrapy Wait for the tool to grab if ($http_user_agent ~* (Scrapy|Curl|HttpClient)) {
return 403;
}
# Prohibit designation UA And UA Empty visit
if ($http_user_agent ~ "WinHttp|WebZIP|FetchURL|node-superagent|java/|
FeedDemon|Jullo|JikeSpider|Indy Library|Alexa Toolbar|AskTbFXTV|AhrefsBot|
CrawlDaddy|Java|Feedly|Apache-HttpAsyncClient|UniversalFeedParser|ApacheBench|
Microsoft URL Control|Swiftbot|ZmEu|oBot|jaunty|Python-urllib|
lightDeckReports Bot|YYSpider|DigExt|HttpClient|MJ12bot|heritrix|EasouSpider|Ezooms|BOT/0.1|
YandexBot|FlightDeckReports|Linguee Bot|^$" ) {
return 403;
}
2. Import the configuration file created above into the website configuration file
Include test.conf;

3. restart nginx Services take effect
systemctl restart nginx
Two 、apache Environment
1、 modify httpd.conf The configuration file
Add the following code , restart Apache take effect
Shell
DocumentRoot /home/wwwroot/xxx
SetEnvIfNoCase User–Agent “.*(FeedDemon|Indy Library|Alexa Toolbar|AskTbFXTV|AhrefsBot|CrawlDaddy|CoolpadWebkit|Java|Feedly|UniversalFeedParser|ApacheBench|Microsoft URL Control|Swiftbot|ZmEu|oBot|jaunty|Python-urllib|lightDeckReports Bot|YYSpider|DigExt|HttpClient|MJ12bot|heritrix|EasouSpider|Ezooms)” BADBOT
Orderallow,deny
Allow fromall
deny fromenv=BADBOT
3、 ... and 、 test
1、 Use curl -A Simulate grabbing , such as :
curl -I -A 'Spider' www.test888.cn
give the result as follows :
[[email protected]]# curl -I -A 'Spider' www.test888.cn
HTTP/1.1 403 Forbidden
Server: nginx/1.12.0
Date: Wed, 24 Apr 2021 11:35:21 GMT
Content-Type: text/html
Content-Length: 169
Connection: keep-alive
above , It is the one-to-one live source code that intercepts the content of information crawled by crawlers , Preventing malicious crawling is just one of the security strategies to ensure data security , To learn more about security policies , You can pay attention to the following content .
Statement : The above content is original by cloudleopard technology , Without the author's consent , Prohibited reproduced , Otherwise, relevant legal liability will be investigated .
边栏推荐
- Overview of Yunxi database executor
- What are the common computer problems and solutions
- Loop compensation - explanation and calculation of first-order, second-order and op amp compensation
- 2022.02.13
- Weekly leetcode - nc9/nc56/nc89/nc126/nc69/nc120
- [flax high frequency question] leetcode 426 Convert binary search tree to sorted double linked list
- 2 spark environment setup local
- Hcip day 15 notes
- Fashion cloud interview questions series - JS high-frequency handwritten code questions
- [Android reverse] use the DB browser to view and modify the SQLite database (copy the database file from the Android application data directory | use the DB browser tool to view the data block file)
猜你喜欢

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

Wisdom tooth technology announced that it had completed the round D financing of US $100million and had not obtained a valid patent yet

Schematic diagram of crystal oscillator clock and PCB Design Guide

Unique in China! Alibaba cloud container service enters the Forrester leader quadrant

Shiftvit uses the precision of swing transformer to outperform the speed of RESNET, and discusses that the success of Vit does not lie in attention!

Apple released a supplementary update to MacOS Catalina 10.15.5, which mainly fixes security vulnerabilities

Hcip day 14 notes

Unsafe and CAS principle

Buuctf, misc: sniffed traffic

Can you draw with turtle?
随机推荐
Gorilla/mux framework (RK boot): add tracing Middleware
[sg function] lightoj Partitioning Game
Druids connect to mysql8.0.11
finalize finalization finally final
[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)
Buuctf, web:[geek challenge 2019] buyflag
Ansible common usage scenarios
Quick one click batch adding video text watermark and modifying video size simple tutorial
Buuctf, misc: sniffed traffic
The overseas listing of Shangmei group received feedback, and brands such as Han Shu and Yiye have been notified for many times and received attention
Wisdom tooth technology announced that it had completed the round D financing of US $100million and had not obtained a valid patent yet
Introduction to the gtid mode of MySQL master-slave replication
Apple released a supplementary update to MacOS Catalina 10.15.5, which mainly fixes security vulnerabilities
Hcip 13th day notes
Yyds dry goods inventory hands-on teach you to create a jigsaw puzzle using the canvasapi
How to solve the problem of computer networking but showing no Internet connection
Data consistency between redis and database
How about agricultural futures?
How to solve win10 black screen with only mouse arrow
Is the controller a single instance or multiple instances? How to ensure the safety of concurrency