日志系统,数据库添加角色

lzh
Kenneth 4 weeks ago
parent c496465c4a
commit cd209ff913

@ -0,0 +1,2 @@
python app.py
登陆 127.0.0.1:8000/login

@ -0,0 +1,446 @@
2024-10-28 22:29:57,445 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://10.128.54.153:8000
2024-10-28 22:29:57,445 - INFO - Press CTRL+C to quit
2024-10-28 22:29:57,490 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:29:59,616 - WARNING - * Debugger is active!
2024-10-28 22:29:59,635 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:30:26,650 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://10.128.54.153:8000
2024-10-28 22:30:26,650 - INFO - Press CTRL+C to quit
2024-10-28 22:30:26,684 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:30:28,432 - WARNING - * Debugger is active!
2024-10-28 22:30:28,443 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:30:43,459 - INFO - 127.0.0.1 - - [28/Oct/2024 22:30:43] "GET /commander HTTP/1.1" 302 -
2024-10-28 22:30:43,479 - INFO - Handling login request
2024-10-28 22:30:43,483 - INFO - 127.0.0.1 - - [28/Oct/2024 22:30:43] "GET /login?next=/commander HTTP/1.1" 200 -
2024-10-28 22:30:49,231 - INFO - Handling login request
2024-10-28 22:30:49,238 - INFO - 127.0.0.1 - - [28/Oct/2024 22:30:49] "GET /login HTTP/1.1" 200 -
2024-10-28 22:30:52,028 - INFO - Handling login request
2024-10-28 22:30:52,032 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:30:52,035 - INFO - 127.0.0.1 - - [28/Oct/2024 22:30:52] "POST /login HTTP/1.1" 302 -
2024-10-28 22:30:52,064 - INFO - Accessing commander page
2024-10-28 22:30:52,274 - INFO - 127.0.0.1 - - [28/Oct/2024 22:30:52] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:30:52,274 - INFO - * Detected change in 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\\Lib\\encodings\\unicode_escape.py', reloading
2024-10-28 22:30:52,388 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:30:52,394 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:30:52,464 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:30:52,953 - INFO - 127.0.0.1 - - [28/Oct/2024 22:30:52] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:30:53,004 - INFO - 127.0.0.1 - - [28/Oct/2024 22:30:53] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:30:53,262 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:30:55,220 - WARNING - * Debugger is active!
2024-10-28 22:30:55,232 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:30:55,370 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:30:55,664 - INFO - 127.0.0.1 - - [28/Oct/2024 22:30:55] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:31:01,288 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:31:01,288 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:01] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:31:05,044 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:05] "GET /commander HTTP/1.1" 302 -
2024-10-28 22:31:05,066 - INFO - Handling login request
2024-10-28 22:31:05,069 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:05] "GET /login?next=/commander HTTP/1.1" 200 -
2024-10-28 22:31:08,675 - INFO - Handling login request
2024-10-28 22:31:08,675 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:31:08,675 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:08] "POST /login?next=/commander HTTP/1.1" 302 -
2024-10-28 22:31:08,703 - INFO - Accessing commander page
2024-10-28 22:31:08,888 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:08] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:31:09,054 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:31:09,054 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:09] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:31:09,083 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:31:09,086 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:09] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:31:09,108 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:31:09,113 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:09] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:31:12,697 - INFO - Handling login request
2024-10-28 22:31:12,697 - INFO - User admin logged in with role ¹¥»÷Õß
2024-10-28 22:31:12,700 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:12] "POST /login?next=/commander HTTP/1.1" 302 -
2024-10-28 22:31:12,721 - INFO - Accessing attacker page
2024-10-28 22:31:12,721 - WARNING - Unauthorized access to attacker page
2024-10-28 22:31:12,721 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:12] "GET /attacker HTTP/1.1" 302 -
2024-10-28 22:31:12,749 - INFO - Handling login request
2024-10-28 22:31:12,752 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:12] "GET /login HTTP/1.1" 200 -
2024-10-28 22:31:15,441 - INFO - Handling login request
2024-10-28 22:31:15,441 - INFO - User admin logged in with role ¹¥»÷Õß
2024-10-28 22:31:15,441 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:15] "POST /login HTTP/1.1" 302 -
2024-10-28 22:31:15,466 - INFO - Accessing attacker page
2024-10-28 22:31:15,466 - WARNING - Unauthorized access to attacker page
2024-10-28 22:31:15,469 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:15] "GET /attacker HTTP/1.1" 302 -
2024-10-28 22:31:15,480 - INFO - Handling login request
2024-10-28 22:31:15,480 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:15] "GET /login HTTP/1.1" 200 -
2024-10-28 22:31:18,808 - INFO - Handling login request
2024-10-28 22:31:18,810 - INFO - User admin logged in with role ¹¥»÷Õß
2024-10-28 22:31:18,811 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:18] "POST /login HTTP/1.1" 302 -
2024-10-28 22:31:18,835 - INFO - Accessing attacker page
2024-10-28 22:31:18,835 - WARNING - Unauthorized access to attacker page
2024-10-28 22:31:18,835 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:18] "GET /attacker HTTP/1.1" 302 -
2024-10-28 22:31:18,861 - INFO - Handling login request
2024-10-28 22:31:18,861 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:18] "GET /login HTTP/1.1" 200 -
2024-10-28 22:31:20,984 - INFO - Handling login request
2024-10-28 22:31:20,984 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:31:20,984 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:20] "POST /login HTTP/1.1" 302 -
2024-10-28 22:31:21,015 - INFO - Accessing commander page
2024-10-28 22:31:21,030 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:21] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:31:21,141 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:31:21,141 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:21] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:31:21,165 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:31:21,165 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:21] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:31:21,256 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:31:21,256 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:21] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:31:27,023 - INFO - Handling login request
2024-10-28 22:31:27,024 - INFO - User admin logged in with role ¹¥»÷Õß
2024-10-28 22:31:27,024 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:27] "POST /login HTTP/1.1" 302 -
2024-10-28 22:31:27,044 - INFO - Accessing attacker page
2024-10-28 22:31:27,044 - WARNING - Unauthorized access to attacker page
2024-10-28 22:31:27,044 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:27] "GET /attacker HTTP/1.1" 302 -
2024-10-28 22:31:27,061 - INFO - Handling login request
2024-10-28 22:31:27,061 - INFO - 127.0.0.1 - - [28/Oct/2024 22:31:27] "GET /login HTTP/1.1" 200 -
2024-10-28 22:32:07,524 - INFO - * Detected change in 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\\Lib\\io.py', reloading
2024-10-28 22:32:07,784 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:32:09,683 - WARNING - * Debugger is active!
2024-10-28 22:32:09,695 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:32:42,797 - INFO - Handling login request
2024-10-28 22:32:42,801 - INFO - User admin logged in with role ¹¥»÷Õß
2024-10-28 22:32:42,802 - INFO - 127.0.0.1 - - [28/Oct/2024 22:32:42] "POST /login HTTP/1.1" 302 -
2024-10-28 22:32:42,823 - INFO - Accessing attacker page
2024-10-28 22:32:42,823 - WARNING - Unauthorized access to attacker page
2024-10-28 22:32:42,823 - INFO - 127.0.0.1 - - [28/Oct/2024 22:32:42] "GET /attacker HTTP/1.1" 302 -
2024-10-28 22:32:42,844 - INFO - Handling login request
2024-10-28 22:32:42,853 - INFO - 127.0.0.1 - - [28/Oct/2024 22:32:42] "GET /login HTTP/1.1" 200 -
2024-10-28 22:32:52,759 - INFO - Accessing attacker page
2024-10-28 22:32:52,759 - WARNING - Unauthorized access to attacker page
2024-10-28 22:32:52,760 - INFO - 127.0.0.1 - - [28/Oct/2024 22:32:52] "GET /attacker HTTP/1.1" 302 -
2024-10-28 22:32:52,766 - INFO - Handling login request
2024-10-28 22:32:52,766 - INFO - 127.0.0.1 - - [28/Oct/2024 22:32:52] "GET /login HTTP/1.1" 200 -
2024-10-28 22:33:36,686 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://10.128.54.153:8000
2024-10-28 22:33:36,686 - INFO - Press CTRL+C to quit
2024-10-28 22:33:36,715 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:33:38,615 - WARNING - * Debugger is active!
2024-10-28 22:33:38,622 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:33:40,011 - INFO - Handling login request
2024-10-28 22:33:40,019 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:40] "GET /login HTTP/1.1" 200 -
2024-10-28 22:33:43,183 - INFO - Handling login request
2024-10-28 22:33:43,188 - INFO - User admin logged in with role ¹¥»÷Õß
2024-10-28 22:33:43,188 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:43] "POST /login HTTP/1.1" 302 -
2024-10-28 22:33:43,218 - INFO - Accessing attacker page
2024-10-28 22:33:43,218 - WARNING - Unauthorized access to attacker page
2024-10-28 22:33:43,224 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:43] "GET /attacker HTTP/1.1" 302 -
2024-10-28 22:33:43,238 - INFO - Handling login request
2024-10-28 22:33:43,241 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:43] "GET /login HTTP/1.1" 200 -
2024-10-28 22:33:45,607 - INFO - Handling login request
2024-10-28 22:33:45,607 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:33:45,607 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:45] "POST /login HTTP/1.1" 302 -
2024-10-28 22:33:45,633 - INFO - Accessing commander page
2024-10-28 22:33:45,807 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:45] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:33:45,926 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:33:45,942 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:33:46,059 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:33:46,423 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:46] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:33:46,547 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:46] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:33:46,669 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:46] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:33:50,789 - INFO - Handling login request
2024-10-28 22:33:50,789 - INFO - User admin logged in with role Õì²éÕß
2024-10-28 22:33:50,789 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:50] "POST /login HTTP/1.1" 302 -
2024-10-28 22:33:50,818 - INFO - Accessing scout page
2024-10-28 22:33:50,818 - WARNING - Unauthorized access to scout page
2024-10-28 22:33:50,818 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:50] "GET /scout HTTP/1.1" 302 -
2024-10-28 22:33:50,841 - INFO - Handling login request
2024-10-28 22:33:50,844 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:50] "GET /login HTTP/1.1" 200 -
2024-10-28 22:33:52,358 - INFO - Handling login request
2024-10-28 22:33:52,358 - INFO - User admin logged in with role Õì²éÕß
2024-10-28 22:33:52,358 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:52] "POST /login HTTP/1.1" 302 -
2024-10-28 22:33:52,385 - INFO - Accessing scout page
2024-10-28 22:33:52,385 - WARNING - Unauthorized access to scout page
2024-10-28 22:33:52,387 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:52] "GET /scout HTTP/1.1" 302 -
2024-10-28 22:33:52,406 - INFO - Handling login request
2024-10-28 22:33:52,407 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:52] "GET /login HTTP/1.1" 200 -
2024-10-28 22:33:53,153 - INFO - Handling login request
2024-10-28 22:33:53,153 - INFO - User admin logged in with role Õì²éÕß
2024-10-28 22:33:53,154 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:53] "POST /login HTTP/1.1" 302 -
2024-10-28 22:33:53,191 - INFO - Accessing scout page
2024-10-28 22:33:53,191 - WARNING - Unauthorized access to scout page
2024-10-28 22:33:53,191 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:53] "GET /scout HTTP/1.1" 302 -
2024-10-28 22:33:53,211 - INFO - Handling login request
2024-10-28 22:33:53,211 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:53] "GET /login HTTP/1.1" 200 -
2024-10-28 22:33:55,585 - INFO - Handling login request
2024-10-28 22:33:55,586 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:33:55,587 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:55] "POST /login HTTP/1.1" 302 -
2024-10-28 22:33:55,610 - INFO - Accessing commander page
2024-10-28 22:33:55,629 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:55] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:33:55,759 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:33:55,761 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:55] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:33:55,771 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:33:55,771 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:55] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:33:55,861 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:33:55,867 - INFO - 127.0.0.1 - - [28/Oct/2024 22:33:55] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:34:18,452 - INFO - Handling send attack request
2024-10-28 22:34:18,476 - INFO - Attack coordinate sent: 222
2024-10-28 22:34:18,477 - INFO - 127.0.0.1 - - [28/Oct/2024 22:34:18] "POST /send_attack HTTP/1.1" 302 -
2024-10-28 22:34:18,503 - INFO - Accessing commander page
2024-10-28 22:34:18,532 - INFO - 127.0.0.1 - - [28/Oct/2024 22:34:18] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:34:18,634 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:34:18,636 - INFO - 127.0.0.1 - - [28/Oct/2024 22:34:18] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:34:18,640 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:34:18,643 - INFO - 127.0.0.1 - - [28/Oct/2024 22:34:18] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:34:18,749 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:34:18,749 - INFO - 127.0.0.1 - - [28/Oct/2024 22:34:18] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:34:25,948 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:34:25,949 - INFO - 127.0.0.1 - - [28/Oct/2024 22:34:25] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:37:01,962 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://10.128.54.153:8000
2024-10-28 22:37:01,966 - INFO - Press CTRL+C to quit
2024-10-28 22:37:01,996 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:37:03,718 - WARNING - * Debugger is active!
2024-10-28 22:37:03,730 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:37:04,718 - INFO - * Detected change in 'E:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:37:04,718 - INFO - * Detected change in 'E:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:37:04,721 - INFO - * Detected change in 'E:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:37:05,072 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:37:10,119 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://10.128.54.153:8000
2024-10-28 22:37:10,119 - INFO - Press CTRL+C to quit
2024-10-28 22:37:10,156 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:37:12,112 - WARNING - * Debugger is active!
2024-10-28 22:37:12,124 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:37:26,734 - INFO - Handling login request
2024-10-28 22:37:26,739 - INFO - 127.0.0.1 - - [28/Oct/2024 22:37:26] "GET /login HTTP/1.1" 200 -
2024-10-28 22:37:29,590 - INFO - Handling login request
2024-10-28 22:37:29,596 - INFO - User admin logged in with role Õì²éÕß
2024-10-28 22:37:29,599 - INFO - 127.0.0.1 - - [28/Oct/2024 22:37:29] "POST /login HTTP/1.1" 302 -
2024-10-28 22:37:29,617 - INFO - Accessing scout page
2024-10-28 22:37:29,618 - WARNING - Unauthorized access to scout page
2024-10-28 22:37:29,618 - INFO - 127.0.0.1 - - [28/Oct/2024 22:37:29] "GET /scout HTTP/1.1" 302 -
2024-10-28 22:37:29,628 - INFO - Handling login request
2024-10-28 22:37:29,628 - INFO - 127.0.0.1 - - [28/Oct/2024 22:37:29] "GET /login HTTP/1.1" 200 -
2024-10-28 22:37:32,249 - INFO - Handling login request
2024-10-28 22:37:32,249 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:37:32,249 - INFO - 127.0.0.1 - - [28/Oct/2024 22:37:32] "POST /login HTTP/1.1" 302 -
2024-10-28 22:37:32,274 - INFO - Accessing commander page
2024-10-28 22:37:32,442 - INFO - 127.0.0.1 - - [28/Oct/2024 22:37:32] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:37:32,561 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:37:32,586 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:37:32,650 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:37:33,053 - INFO - 127.0.0.1 - - [28/Oct/2024 22:37:33] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 200 -
2024-10-28 22:37:33,181 - INFO - 127.0.0.1 - - [28/Oct/2024 22:37:33] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 200 -
2024-10-28 22:37:33,294 - INFO - 127.0.0.1 - - [28/Oct/2024 22:37:33] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 200 -
2024-10-28 22:39:57,236 - INFO - * Detected change in 'E:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:39:57,242 - INFO - * Detected change in 'E:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:39:57,242 - INFO - * Detected change in 'E:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:39:57,522 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:40:02,092 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://10.128.54.153:8000
2024-10-28 22:40:02,092 - INFO - Press CTRL+C to quit
2024-10-28 22:40:02,127 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:40:04,074 - WARNING - * Debugger is active!
2024-10-28 22:40:04,085 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:40:05,591 - INFO - Handling login request
2024-10-28 22:40:05,599 - INFO - 127.0.0.1 - - [28/Oct/2024 22:40:05] "GET /login HTTP/1.1" 200 -
2024-10-28 22:40:07,060 - INFO - Handling login request
2024-10-28 22:40:07,239 - WARNING - Invalid credentials
2024-10-28 22:40:07,241 - INFO - 127.0.0.1 - - [28/Oct/2024 22:40:07] "POST /login HTTP/1.1" 200 -
2024-10-28 22:40:11,798 - INFO - Handling login request
2024-10-28 22:40:11,799 - INFO - 127.0.0.1 - - [28/Oct/2024 22:40:11] "GET /login HTTP/1.1" 200 -
2024-10-28 22:40:13,641 - INFO - Handling login request
2024-10-28 22:40:13,658 - WARNING - Invalid credentials
2024-10-28 22:40:13,659 - INFO - 127.0.0.1 - - [28/Oct/2024 22:40:13] "POST /login HTTP/1.1" 200 -
2024-10-28 22:40:14,638 - INFO - Handling login request
2024-10-28 22:40:14,638 - INFO - 127.0.0.1 - - [28/Oct/2024 22:40:14] "GET /login HTTP/1.1" 200 -
2024-10-28 22:40:16,744 - INFO - Handling login request
2024-10-28 22:40:16,760 - WARNING - Invalid credentials
2024-10-28 22:40:16,763 - INFO - 127.0.0.1 - - [28/Oct/2024 22:40:16] "POST /login HTTP/1.1" 200 -
2024-10-28 22:42:54,269 - INFO - * Detected change in 'E:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:42:54,273 - INFO - * Detected change in 'E:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:42:54,274 - INFO - * Detected change in 'E:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:42:54,765 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:42:56,766 - WARNING - * Debugger is active!
2024-10-28 22:42:56,778 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:43:02,665 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://10.128.54.153:8000
2024-10-28 22:43:02,665 - INFO - Press CTRL+C to quit
2024-10-28 22:43:02,701 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:43:04,722 - WARNING - * Debugger is active!
2024-10-28 22:43:04,736 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:43:06,421 - INFO - Handling login request
2024-10-28 22:43:06,568 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:43:06,584 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:06] "POST /login HTTP/1.1" 302 -
2024-10-28 22:43:06,615 - INFO - Accessing commander page
2024-10-28 22:43:06,631 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:06] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:43:06,710 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:43:06,710 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:43:06,847 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:43:07,245 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:07] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 200 -
2024-10-28 22:43:07,262 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:07] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 200 -
2024-10-28 22:43:07,458 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:07] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 200 -
2024-10-28 22:43:08,801 - INFO - Handling login request
2024-10-28 22:43:08,817 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:08] "GET /login HTTP/1.1" 200 -
2024-10-28 22:43:11,646 - INFO - Handling login request
2024-10-28 22:43:11,662 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:43:11,662 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:11] "POST /login HTTP/1.1" 302 -
2024-10-28 22:43:11,708 - INFO - Accessing commander page
2024-10-28 22:43:11,716 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:11] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:43:11,820 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:43:11,820 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:11] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:43:11,835 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:43:11,835 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:11] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:43:11,917 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:43:11,919 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:11] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:43:16,520 - INFO - Handling login request
2024-10-28 22:43:16,537 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:43:16,537 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:16] "POST /login HTTP/1.1" 302 -
2024-10-28 22:43:16,579 - INFO - Accessing commander page
2024-10-28 22:43:16,581 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:16] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:43:16,692 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:43:16,692 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:16] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:43:16,698 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:43:16,699 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:16] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:43:16,772 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:43:16,779 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:16] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:43:19,387 - INFO - Handling login request
2024-10-28 22:43:19,406 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:43:19,406 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:19] "POST /login HTTP/1.1" 302 -
2024-10-28 22:43:19,446 - INFO - Accessing commander page
2024-10-28 22:43:19,449 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:19] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:43:19,585 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:43:19,590 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:19] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:43:19,597 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:43:19,597 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:19] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:43:19,676 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:43:19,676 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:19] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:43:25,334 - INFO - Handling login request
2024-10-28 22:43:25,351 - INFO - User scout logged in with role Õì²éÕß
2024-10-28 22:43:25,355 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:25] "POST /login HTTP/1.1" 302 -
2024-10-28 22:43:25,401 - INFO - Accessing scout page
2024-10-28 22:43:25,401 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:25] "GET /scout HTTP/1.1" 200 -
2024-10-28 22:43:34,953 - INFO - Handling login request
2024-10-28 22:43:34,969 - INFO - User attacker logged in with role ¹¥»÷Õß
2024-10-28 22:43:34,971 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:34] "POST /login HTTP/1.1" 302 -
2024-10-28 22:43:35,012 - INFO - Accessing attacker page
2024-10-28 22:43:35,025 - INFO - 127.0.0.1 - - [28/Oct/2024 22:43:35] "GET /attacker HTTP/1.1" 200 -
2024-10-28 22:44:14,631 - INFO - Handling login request
2024-10-28 22:44:14,650 - INFO - User scout logged in with role Õì²éÕß
2024-10-28 22:44:14,650 - INFO - 127.0.0.1 - - [28/Oct/2024 22:44:14] "POST /login HTTP/1.1" 302 -
2024-10-28 22:44:14,689 - INFO - Accessing scout page
2024-10-28 22:44:14,692 - INFO - 127.0.0.1 - - [28/Oct/2024 22:44:14] "GET /scout HTTP/1.1" 200 -
2024-10-28 22:44:21,108 - INFO - Handling send message request
2024-10-28 22:44:21,111 - INFO - 127.0.0.1 - - [28/Oct/2024 22:44:21] "GET /send_message HTTP/1.1" 200 -
2024-10-28 22:44:53,349 - INFO - Handling login request
2024-10-28 22:44:53,368 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:44:53,370 - INFO - 127.0.0.1 - - [28/Oct/2024 22:44:53] "POST /login HTTP/1.1" 302 -
2024-10-28 22:44:53,409 - INFO - Accessing commander page
2024-10-28 22:44:53,414 - INFO - 127.0.0.1 - - [28/Oct/2024 22:44:53] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:44:53,522 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:44:53,533 - INFO - 127.0.0.1 - - [28/Oct/2024 22:44:53] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:44:53,534 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:44:53,536 - INFO - 127.0.0.1 - - [28/Oct/2024 22:44:53] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:44:53,639 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:44:53,647 - INFO - 127.0.0.1 - - [28/Oct/2024 22:44:53] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:45:07,482 - INFO - Handling login request
2024-10-28 22:45:07,500 - INFO - User attacker logged in with role ¹¥»÷Õß
2024-10-28 22:45:07,502 - INFO - 127.0.0.1 - - [28/Oct/2024 22:45:07] "POST /login HTTP/1.1" 302 -
2024-10-28 22:45:07,543 - INFO - Accessing attacker page
2024-10-28 22:45:07,547 - INFO - 127.0.0.1 - - [28/Oct/2024 22:45:07] "GET /attacker HTTP/1.1" 200 -
2024-10-28 22:45:13,171 - INFO - Handling execute attack request for ID: 4
2024-10-28 22:45:13,175 - INFO - Attack executed for ID: 4
2024-10-28 22:45:13,175 - INFO - 127.0.0.1 - - [28/Oct/2024 22:45:13] "POST /execute_attack/4 HTTP/1.1" 302 -
2024-10-28 22:45:13,225 - INFO - Accessing attacker page
2024-10-28 22:45:13,227 - INFO - 127.0.0.1 - - [28/Oct/2024 22:45:13] "GET /attacker HTTP/1.1" 200 -
2024-10-28 22:45:17,973 - INFO - Handling login request
2024-10-28 22:45:17,996 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:45:17,998 - INFO - 127.0.0.1 - - [28/Oct/2024 22:45:17] "POST /login HTTP/1.1" 302 -
2024-10-28 22:45:18,029 - INFO - Accessing commander page
2024-10-28 22:45:18,034 - INFO - 127.0.0.1 - - [28/Oct/2024 22:45:18] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:45:18,155 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:45:18,155 - INFO - 127.0.0.1 - - [28/Oct/2024 22:45:18] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:45:18,172 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:45:18,172 - INFO - 127.0.0.1 - - [28/Oct/2024 22:45:18] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:45:18,228 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:45:18,232 - INFO - 127.0.0.1 - - [28/Oct/2024 22:45:18] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:46:16,716 - INFO - Handling login request
2024-10-28 22:46:16,721 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:16] "GET /login HTTP/1.1" 200 -
2024-10-28 22:46:18,305 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:18] "GET /favicon.ico HTTP/1.1" 404 -
2024-10-28 22:46:31,891 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:31] "GET /view_logs HTTP/1.1" 302 -
2024-10-28 22:46:31,914 - INFO - Handling login request
2024-10-28 22:46:31,914 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:31] "GET /login?next=/view_logs HTTP/1.1" 200 -
2024-10-28 22:46:45,710 - INFO - Handling login request
2024-10-28 22:46:45,734 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:46:45,734 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:45] "POST /login?next=/view_logs HTTP/1.1" 302 -
2024-10-28 22:46:45,768 - INFO - Accessing commander page
2024-10-28 22:46:45,768 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:45] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:46:45,879 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:46:45,879 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:46:45,879 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:45] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:46:45,879 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:45] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:46:45,992 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:46:45,992 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:45] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:46:55,150 - INFO - 127.0.0.1 - - [28/Oct/2024 22:46:55] "GET /commander/view_logs HTTP/1.1" 404 -
2024-10-28 22:47:37,404 - INFO - * Detected change in 'C:\\Users\\Lenovo\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\site-packages\\werkzeug\\routing\\map.py', reloading
2024-10-28 22:47:37,503 - INFO - 127.0.0.1 - - [28/Oct/2024 22:47:37] "GET /view_logs HTTP/1.1" 500 -
2024-10-28 22:47:37,591 - INFO - 127.0.0.1 - - [28/Oct/2024 22:47:37] "GET /view_logs?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
2024-10-28 22:47:37,614 - INFO - 127.0.0.1 - - [28/Oct/2024 22:47:37] "GET /view_logs?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
2024-10-28 22:47:37,809 - INFO - 127.0.0.1 - - [28/Oct/2024 22:47:37] "GET /view_logs?__debugger__=yes&cmd=resource&f=console.png&s=abx8odaX3rKMJwcIElt9 HTTP/1.1" 200 -
2024-10-28 22:47:37,944 - INFO - 127.0.0.1 - - [28/Oct/2024 22:47:37] "GET /view_logs?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
2024-10-28 22:47:38,290 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:47:40,573 - WARNING - * Debugger is active!
2024-10-28 22:47:40,589 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:51:20,421 - INFO - * Detected change in 'e:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:51:20,421 - INFO - * Detected change in 'e:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:51:20,426 - INFO - * Detected change in 'e:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:51:20,909 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:51:43,637 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://10.128.54.153:8000
2024-10-28 22:51:43,637 - INFO - Press CTRL+C to quit
2024-10-28 22:51:43,674 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:51:45,697 - WARNING - * Debugger is active!
2024-10-28 22:51:45,708 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:51:49,775 - INFO - Handling login request
2024-10-28 22:51:49,781 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:49] "GET /login HTTP/1.1" 200 -
2024-10-28 22:51:52,836 - INFO - Handling login request
2024-10-28 22:51:53,014 - INFO - User admin logged in with role Ö¸»ÓÕß
2024-10-28 22:51:53,019 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:53] "POST /login HTTP/1.1" 302 -
2024-10-28 22:51:53,055 - INFO - Accessing commander page
2024-10-28 22:51:53,073 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:53] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:51:53,191 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:51:53,213 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:51:53,279 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:51:53,802 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:53] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:51:53,830 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:53] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:51:53,954 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:53] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:51:57,166 - INFO - Handling send attack request
2024-10-28 22:51:57,170 - INFO - Attack coordinate sent: 333
2024-10-28 22:51:57,171 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:57] "POST /send_attack HTTP/1.1" 302 -
2024-10-28 22:51:57,205 - INFO - Accessing commander page
2024-10-28 22:51:57,209 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:57] "GET /commander HTTP/1.1" 200 -
2024-10-28 22:51:57,284 - INFO - Accessing uploaded file: 145922dab6954fd8968c426200198b17_sb.jpg
2024-10-28 22:51:57,285 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:57] "GET /uploads/145922dab6954fd8968c426200198b17_sb.jpg HTTP/1.1" 304 -
2024-10-28 22:51:57,291 - INFO - Accessing uploaded file: 1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png
2024-10-28 22:51:57,291 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:57] "GET /uploads/1eaf03ab0fdf409289d26eb2e282955c__20241022150445.png HTTP/1.1" 304 -
2024-10-28 22:51:57,390 - INFO - Accessing uploaded file: 2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png
2024-10-28 22:51:57,393 - INFO - 127.0.0.1 - - [28/Oct/2024 22:51:57] "GET /uploads/2d7d87c11e2f45c49a8e4ff7a699661a__20241015171033.png HTTP/1.1" 304 -
2024-10-28 22:52:01,340 - INFO - 127.0.0.1 - - [28/Oct/2024 22:52:01] "GET /view_logs HTTP/1.1" 200 -
2024-10-28 22:52:48,075 - INFO - * Detected change in 'e:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:52:48,082 - INFO - * Detected change in 'e:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:52:48,083 - INFO - * Detected change in 'e:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:52:49,076 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:52:51,041 - WARNING - * Debugger is active!
2024-10-28 22:52:51,050 - INFO - * Debugger PIN: 266-144-430
2024-10-28 22:52:58,531 - INFO - Index route accessed
2024-10-28 22:52:58,531 - INFO - 127.0.0.1 - - [28/Oct/2024 22:52:58] "GET / HTTP/1.1" 200 -
2024-10-28 22:53:03,459 - INFO - Handling login request
2024-10-28 22:53:03,464 - INFO - 127.0.0.1 - - [28/Oct/2024 22:53:03] "GET /login HTTP/1.1" 200 -
2024-10-28 22:53:06,867 - INFO - * Detected change in 'e:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:53:06,875 - INFO - * Detected change in 'e:\\_Ufo\\0000jiegou\\TheBattleCar\\app.py', reloading
2024-10-28 22:53:07,402 - INFO - * Restarting with watchdog (windowsapi)
2024-10-28 22:53:09,649 - WARNING - * Debugger is active!
2024-10-28 22:53:09,663 - INFO - * Debugger PIN: 266-144-430

@ -1,16 +1,23 @@
import os
import uuid
from flask import Flask, session, redirect, url_for, request, flash, render_template, jsonify, send_from_directory
import logging
from flask import Flask, current_app, session, redirect, url_for, request, flash, render_template, jsonify, send_from_directory
from flask_sqlalchemy import SQLAlchemy
from flask_mysqldb import MySQL
import MySQLdb.cursors
from werkzeug.utils import secure_filename
from flask_login import LoginManager, UserMixin, login_user, login_required, current_user
# 初始化 Flask 应用
app = Flask(__name__)
app.config['SECRET_KEY'] = 'your_secret_key'
app.secret_key = os.urandom(24) # 生成更安全的会话密钥
app.config['UPLOAD_FOLDER'] = 'uploads/' # 设置上传文件存储目录
os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True) # 确保目录存在
# 配置日志
logging.basicConfig(filename='app.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
# MySQL 配置
app.config['MYSQL_HOST'] = 'localhost'
app.config['MYSQL_USER'] = 'root' # 替换为你的 MySQL 用户名
@ -22,62 +29,123 @@ mysql = MySQL(app)
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
# 配置日志记录器
logging.basicConfig(filename='app.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
def allowed_file(filename):
return '.' in filename and \
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
# 初始化 Flask-Login
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'login'
class User(UserMixin):
def __init__(self, id, username, role):
self.id = id
self.username = username
self.role = role
@login_manager.user_loader
def load_user(user_id):
cursor = mysql.connection.cursor()
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))
user_data = cursor.fetchone()
cursor.close()
if user_data:
return User(user_data['id'], user_data['username'], user_data['role'])
return None
@app.route('/')
def index():
current_app.logger.info("Index route accessed")
return "Welcome to the Home Page!"
@app.route('/view_logs')
@login_required
def view_logs():
with open('app.log', 'r') as log_file:
logs = log_file.readlines()
return render_template('logs.html', logs=logs)
# 处理文件上传
@app.route('/upload', methods=['POST'])
def upload_file():
logger.info("Handling file upload request")
if 'file' not in request.files:
logger.warning("No file part in request")
return jsonify({'message': 'No file part'}), 400
file = request.files['file']
if file.filename == '':
logger.warning("No selected file")
return jsonify({'message': 'No selected file'}), 400
if file and allowed_file(file.filename):
filename = secure_filename(f"{uuid.uuid4().hex}_{file.filename}")
filepath = os.path.join(app.config['UPLOAD_FOLDER'], filename)
file.save(filepath)
logger.info(f"File uploaded successfully: {filename}")
return jsonify({'message': 'File uploaded successfully', 'filepath': filepath}), 201
else:
logger.warning("File type not allowed")
return jsonify({'message': 'File type not allowed'}), 400
# 提供上传文件的访问
@app.route('/uploads/<filename>')
def uploaded_file(filename):
logger.info(f"Accessing uploaded file: {filename}")
return send_from_directory(app.config['UPLOAD_FOLDER'], filename)
# 登录页面
@app.route('/login', methods=['GET', 'POST'])
def login():
logger.info("Handling login request")
if request.method == 'POST':
username = request.form['username']
password = request.form['password']
if username == 'admin' and password == 'admin':
role = request.form['role']
session['username'] = username
session['role'] = role
if role == '侦查者':
cursor = mysql.connection.cursor()
cursor.execute("SELECT * FROM users WHERE username = %s AND password = %s", (username, password))
user_data = cursor.fetchone()
cursor.close()
if user_data:
user = User(user_data['id'], user_data['username'], user_data['role'])
login_user(user)
logger.info(f"User {username} logged in with role {user_data['role']}")
if user_data['role'] == '侦查者':
return redirect(url_for('scout'))
elif role == '指挥者':
elif user_data['role'] == '指挥者':
return redirect(url_for('commander'))
elif role == '攻击者':
elif user_data['role'] == '攻击者':
return redirect(url_for('attacker'))
else:
logger.warning("Invalid credentials")
return "Invalid credentials. Please try again."
return render_template('login.html')
# 侦查者页面
@app.route('/scout')
@login_required
def scout():
if 'username' not in session or session['role'] != '侦查者':
logger.info("Accessing scout page")
if current_user.role != '侦查者':
logger.warning("Unauthorized access to scout page")
return redirect(url_for('login'))
return render_template('scout.html')
# 指挥者页面
@app.route('/commander')
@login_required
def commander():
if 'username' not in session or session['role'] != '指挥者':
logger.info("Accessing commander page")
if current_user.role != '指挥者':
logger.warning("Unauthorized access to commander page")
return redirect(url_for('login'))
# 获取特定目录下的所有文件和攻击坐标状态
@ -88,6 +156,7 @@ def commander():
media_items = [f for f in os.listdir(directory)
if os.path.isfile(os.path.join(directory, f)) and allowed_file(f)]
except Exception as e:
logger.error(f"Error accessing directory: {str(e)}")
flash(f"Error accessing directory: {str(e)}")
# 获取攻击状态
@ -97,14 +166,19 @@ def commander():
cursor.close()
return render_template('commander.html', media_items=media_items, attacks=attacks)
# 指挥者发送攻击坐标
@app.route('/send_attack', methods=['POST'])
@login_required
def send_attack():
if 'username' not in session or session['role'] != '指挥者':
logger.info("Handling send attack request")
if current_user.role != '指挥者':
logger.warning("Unauthorized access to send attack")
return redirect(url_for('login'))
coordinate = request.form.get('coordinate')
if not coordinate:
logger.warning("No coordinate provided")
return "No coordinate provided", 400
# 插入攻击坐标到数据库
@ -112,14 +186,18 @@ def send_attack():
cursor.execute("INSERT INTO attacks (coordinate) VALUES (%s)", (coordinate,))
mysql.connection.commit()
cursor.close()
logger.info(f"Attack coordinate sent: {coordinate}")
flash('攻击坐标已发送')
return redirect(url_for('commander'))
# 攻击者页面
@app.route('/attacker')
@login_required
def attacker():
if 'username' not in session or session['role'] != '攻击者':
logger.info("Accessing attacker page")
if current_user.role != '攻击者':
logger.warning("Unauthorized access to attacker page")
return redirect(url_for('login'))
# 获取攻击坐标列表
@ -132,31 +210,40 @@ def attacker():
# 攻击者执行攻击
@app.route('/execute_attack/<int:attack_id>', methods=['POST'])
@login_required
def execute_attack(attack_id):
if 'username' not in session or session['role'] != '攻击者':
logger.info(f"Handling execute attack request for ID: {attack_id}")
if current_user.role != '攻击者':
logger.warning("Unauthorized access to execute attack")
return redirect(url_for('login'))
cursor = mysql.connection.cursor()
cursor.execute("UPDATE attacks SET attacked = TRUE WHERE id = %s", (attack_id,))
mysql.connection.commit()
cursor.close()
logger.info(f"Attack executed for ID: {attack_id}")
flash(f'已对坐标ID为 {attack_id} 的目标完成打击')
return redirect(url_for('attacker'))
# 退出登录(清除会话)
@app.route('/logout')
@login_required
def logout():
logger.info("Handling logout request")
session.pop('username', None)
session.pop('role', None)
return redirect(url_for('login'))
# 发送消息
@app.route('/send_message', methods=['GET', 'POST'])
@login_required
def send_message():
logger.info("Handling send message request")
if request.method == 'POST':
message = request.form.get('message')
if not message:
logger.warning("No message provided")
return "No message provided", 400
photo_url = None
@ -169,6 +256,7 @@ def send_message():
file.save(filepath)
photo_url = url_for('uploaded_file', filename=filename, _external=True)
else:
logger.warning("Allowed file types are png, jpg, jpeg, gif")
return "Allowed file types are png, jpg, jpeg, gif", 400
# 插入数据到 MySQL
@ -176,6 +264,7 @@ def send_message():
cursor.execute("INSERT INTO messages (message, photo_url) VALUES (%s, %s)", (message, photo_url))
mysql.connection.commit()
cursor.close()
logger.info(f"Message sent: {message}, Photo URL: {photo_url}")
return f"Message and photo (if uploaded) have been received. Message: {message}\nPhoto URL: {photo_url if photo_url else 'N/A'}"
@ -183,7 +272,9 @@ def send_message():
# 获取所有消息
@app.route('/messages', methods=['GET'])
@login_required
def get_messages():
logger.info("Handling get messages request")
cursor = mysql.connection.cursor()
cursor.execute("SELECT id, message, photo_url, created_at FROM messages")
result = cursor.fetchall()

@ -1,24 +1,25 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
</head>
<body>
<h1>Login</h1>
</head>
<body>
<h2>Login</h2>
<form method="post">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br>
<label for="role">Choose a role:</label>
<select id="role" name="role" required>
<option value="侦查者">侦查者</option>
<option value="指挥者">指挥者</option>
<option value="攻击者">攻击者</option>
</select><br>
<button type="submit">Login</button>
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
<label for="role">Role:</label>
<select id="role" name="role" required>
<option value="侦查者">侦查者</option>
<option value="指挥者">指挥者</option>
<option value="攻击者">攻击者</option>
</select><br><br>
<button type="submit">Login</button>
</form>
</body>
</body>
</html>

@ -0,0 +1,17 @@
<!-- templates/logs.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>View Logs</title>
</head>
<body>
<h1>Application Logs</h1>
<pre>
{% for log in logs %}
{{ log }}
{% endfor %}
</pre>
<a href="{{ url_for('index') }}">Back to Home</a>
</body>
</html>
Loading…
Cancel
Save