Before writing a script, write a requirement analysis
Will write more scripts later, will pay attention to this aspect of
Prohibit HTTP requests? Requirements analysis
Core Features:
By modifying the Hosts file, users are forbidden to visit Baidu and other search engines
Implementation method:
Overwrite the Hosts file requirements with the cmd console command copy:
- Server and Client
- Process detection and alerting
- Gui
- Countdown
- Version update
(i) Server and client
By calling Python in the Socketserver module, the server-side function is quickly implemented, outside of the tournament time, access to the server, the prompt is not in the race time. Access to the server is forbidden during the race.
(ii) Process testing and reminders
The client sends a request through the CMD Console ping command or Python to see if the webpage responds, and then send an alert message to the server.
Ping Pass Result: (Baidu in order to prevent being attacked, add the shell, www.a.shifen.com)
Ping does not pass the result: (Baidu's URL map to the native address 127.0.0.1)
Three Gui
Draw the GUI as follows
When the actual programming is implemented, changes are made
(d) Countdown
Live Canvas update with Tkinter module
(v) Version update
Send version update information when you start the software
Python--denyhttp Project (2)--ACM Proctor Client beta? Requirements Analysis