Domain Name detection and email domain name Detection
Background: Recently, the company's public account domain name was blocked because the company's website was hacked and uploaded to an invalid webpage. So... The domain name unblocking process is started.
Baidu domain name unblocking found many domain name detection websites and APIS; but when I made a public number, I did not find the public number has this Api, strange, how do these cool people implement it? As a technical otaku, the fire of gossip is really burning gas.
Step 1: Re-check the API of the service number. As you can see,Fruitless.
Some people on the Internet say that the domain name has been blocked and accessed. But I am not familiar with Android.
Think about it. Can I detect the right computer?
Well, the following thing is to use the packet capture tool.
1. Use fiddler
2. wireshark https packet capture
Of course, all the packets captured are garbled. Because https is used for communication, we have wireshark, A Packet Capturing tool.
The following describes how to configure https packet capture.
1) configure the environment variable SSLKEYLOGFILE
How to configure environment variables: system> advanced system Settings> advanced> environment variables> New.
Variable name: SSLKEYLOGFILE
The variable value is set to D: \ sslkeylog. log.
2) Wireshark Configuration
My Wireshark version is 2.4.3 Chinese Version
The configuration path is: Edit-> preference-> protocol (Protocols)-> ssl
Set (Pre)-Master-Serect Log File as the value of the environment variable SSLKEYLOGFILE.
Restart and Wireshark (I don't know if the restart is effective. I restarted it anyway .)
Once Wireshark is re-opened, a tag "Decrypted SSL Data" is added. After you click it, you can see the Decrypted TLS packet information, as shown in.
Then everyone knows that you can get what you need. View
6. coding implementation
Code:
Effect:
Domain Name blocked:
The domain name is not blocked:
Function complete.
The code will not be shared, and it is too ugly to write.
Summary: In fact, the implementation of this function is not as simple as I thought in the article. There are still many twists and turns in the middle. I have been taken over by spring and autumn, and the final function is successfully implemented, when we do things, we should not be flustered. If we find that the problem is more than Baidu's information, we should also ask whether there is a way for others to think differently. For example, if Android development doesn't understand me, can I use a computer.