Tips: When you see this prompt, it means that the current article has been migrated from the original emlog blog system. The publication time of the article is too long ago, and the formatting and content may not be complete. Please understand.
Code Error Caused by Network Hijacking
Date: 2017-4-21 Ajue Talks and Chats Views: 2018 times Comments: 0
Last night, the network went down for some reason. After it was restored this morning, I continued with my work.
I was working on a waterfall layout for an HTML page, but when I opened it this morning, what? The waterfall effect that was working fine yesterday is gone [confused].
When Hijacked
Damn, what disgusting ads.
The probability of the popup window appearing in the lower right corner is about 1/10. Through Chrome Developer Tools, you can see that: the original webpage is placed in an iframe and injected with a flash ad.
Checking the browser's address bar, the domain name is correct and not redirected, which means that the content returned by the domain name is not from the website's page, but a processed page.
Afterwards, I tested the code on a VPS, and there was no problem.
At this point, it can be confirmed that the ISP is hijacking the DNS and inserting ads, causing the returned content to be placed in an iframe. The risks this may bring include: cross-domain attacks, keylogging, HTTPS certificate forgery, etc., making it more dangerous than ordinary phishing websites.
Helplessly, I had to modify the DNS.
Finally, it's back to normal.
Lastly, as for why my local HTML code was also hijacked, it's because I called Baidu's static resource library, which caused the returned JavaScript to be incorrect.
Note: Since the article was published a year ago, the images are missing.