封面图片|乱发请求
1.如何自定义博客封面
添加cover变数并赋值即可,如图:
2.关于王者荣耀
时隔20天,我终于忍不住又下回了王者荣耀,明天开玩。
之前设计的王者荣耀隐藏分查询系统由于王者营地后台更新,暂时无法使用了,只能凭感觉降ELO分,“能躺绝不C”
不知道从王者四星掉到什么段了。
3.研究学历案学习平台
今天闲得无聊,开始深入学历案学习平台的研究。
目的:找到上传视频等文件的方法,把它从图床升级成无限制外链云盘。
于是开始瞎捣鼓这个网站,试图从作业上传接口破解出无限制上传方法,先乱发点请求试试。
发送如下请求:
GET /api/v1/ HTTP/1.1
服务器回复:
Page not found (404)
Request Method: | GET |
---|---|
Request URL: | https://edu.51yxxg.com/api/v1/ |
Using the URLconf defined in
edu.urls
,
Django tried these URL patterns, in this order:
- ^api/v1/util/
- ^api/v1/user/
- ^api/v1/school/
- ^api/v1/course/
- ^api/v1/quiz/
- ^api/v1/live/
- ^api/v1/wechat/
- ^api/v1/pay/
The current path,
api/v1/
, didn't match any of these.
You're seeing this error because you have
DEBUG = True
in
your Django settings file. Change that to
False
, and Django
will display a standard 404 page.
跟着指引继续发送:
GET /api/v1/live/ HTTP/1.1
服务器回复:
Page not found (404)
Request Method: | GET |
---|---|
Request URL: | https://edu.51yxxg.com/api/v1/live/ |
Using the URLconf defined in
edu.urls
,
Django tried these URL patterns, in this order:
- ^api/v1/util/
- ^api/v1/user/
- ^api/v1/school/
- ^api/v1/course/
- ^api/v1/quiz/
- ^api/v1/live/ room/ [name='live-room-view']
- ^api/v1/live/ room/temp/ [name='live-temp-room-view']
- ^api/v1/live/ room/temp/record/ [name='live-temp-room-record-view']
- ^api/v1/live/ room/batch/ [name='live-room-batch-view']
- ^api/v1/live/ room/white/export/ [name='live-room-export-view']
- ^api/v1/live/ room/<int:pk>/ [name='live-room-detail-view']
- ^api/v1/live/ room/<int:pk>/active/ [name='live-room-active-view']
- ^api/v1/live/ room/<int:pk>/copy/ [name='live-room-copy-view']
- ^api/v1/live/ room/<int:pk>/token/ [name='live-room-token-view']
- ^api/v1/live/ room/<int:pk>/user/online/ [name='live-room-users-view']
- ^api/v1/live/ room/<int:pk>/white/ [name='live-room-white-view']
- ^api/v1/live/ room/<int:pk>/white/zombie/ [name='live-room-white-zombie-view']
- ^api/v1/live/ room/<int:pk>/material/ [name='live-room-material-view']
- ^api/v1/live/ room/<int:pk>/code/ [name='live-room-code-view']
- ^api/v1/live/ room/<int:pk>/user/random/ [name='live-room-user-random-view']
- ^api/v1/live/ room/material/<int:pk>/ [name='live-room-material-detail-view']
- ^api/v1/live/ room/material/<int:pk>/question/ [name='live-room-question-view']
- ^api/v1/live/ room/code/<int:pk>/ [name='live-room-code-detail-view']
- ^api/v1/live/ room/code/<int:code>/user/<int:user>/ [name='live-room-code-user-view']
- ^api/v1/live/ room/user/code/<int:pk>/ [name='live-room-user-code-view']
- ^api/v1/live/ room/teacher/code/<int:pk>/ [name='live-room-teacher-code-view']
- ^api/v1/live/ room/<int:pk>/config/ [name='live-room-config-view']
- ^api/v1/live/ room/<int:pk>/homework/ [name='live-room-homework-view']
- ^api/v1/live/ room/<int:pk>/classroom/homework/ [name='live-room-classroom-homework-view']
- ^api/v1/live/ room/<int:pk>/homework/user/ [name='live-room-homework-user-view']
- ^api/v1/live/ room/homework/<int:pk>/ [name='live-room-homework-detail-view']
- ^api/v1/live/ room/<int:pk>/note/ [name='live-room-note-view']
- ^api/v1/live/ room/note/<int:pk>/ [name='live-room-note-detail-view']
- ^api/v1/live/ record/ [name='live-record-view']
- ^api/v1/live/ room/<int:pk>/record/info/ [name='live-record-info-view']
- ^api/v1/live/ room/<int:pk>/record/report/ [name='live-record-report-view']
- ^api/v1/live/ room/<int:pk>/action/ [name='live-action-view']
- ^api/v1/live/ room/admin/<int:pk>/history/ [name='live-admin-history-view']
- ^api/v1/live/ room/<int:pk>/status/ [name='live-status-view']
- ^api/v1/live/ room/record/callback/ [name='live-record-callback-view']
- ^api/v1/live/ room/tag/ [name='live-room-tag-view']
- ^api/v1/wechat/
- ^api/v1/pay/
The current path,
api/v1/live/
, didn't match any of these.
You're seeing this error because you have
DEBUG = True
in
your Django settings file. Change that to
False
, and Django
will display a standard 404 page.
有点东西啊!
其他目录内容一样充实,不再列举。
发现结尾必须是/,故意去掉:
POST /api/v1/live/record HTTP/1.1
服务器回复:
有趣的是这个页面做的还很好,里面有很多可以点击展开详情,不妨试试
此段较长,跳过此段(网页内似乎不支持markdown这种语法哦)
RuntimeError at /api/v1/live/record
You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to edu.51yxxg.com/api/v1/live/record/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.
Request Method: | POST |
---|---|
Request URL: | https://edu.51yxxg.com/api/v1/live/record |
Django Version: | 2.0.2 |
Exception Type: | RuntimeError |
Exception Value: |
You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to edu.51yxxg.com/api/v1/live/record/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings. |
Exception Location: | /usr/local/lib/python3.5/dist-packages/django/middleware/common.py in get_full_path_with_slash, line 99 |
Python Executable: | /usr/bin/python3 |
Python Version: | 3.5.2 |
Python Path: |
['/home/zhiyu/product/edu', '/usr/local/bin', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/home/zhiyu/.local/lib/python3.5/site-packages', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages'] |
Server time: | Thu, 8 Jul 2021 21:56:07 +0800 |
Traceback Switch to copy-and-paste view
-
/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py
ininner
-
This decorator is automatically applied to all middleware to ensure that
-
no middleware leaks an exception and that the next middleware in the stack
-
can rely on getting a response instead of an exception.
-
"""
-
@wraps(get_response)
-
def inner(request):
-
try:
-
response = get_response(request)
...
-
except Exception as exc:
-
response = response_for_exception(request, exc)
-
return response
-
return inner
Variable Value exc RuntimeError("You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to edu.51yxxg.com/api/v1/live/record/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.",)
get_response <django.middleware.common.CommonMiddleware object at 0x7f8839f365c0>
request <WSGIRequest: POST '/api/v1/live/record'>
-
-
/usr/local/lib/python3.5/dist-packages/django/utils/deprecation.py
in__call__
-
def __init__(self, get_response=None):
-
self.get_response = get_response
-
super().__init__()
-
def __call__(self, request):
-
response = None
-
if hasattr(self, 'process_request'):
-
response = self.process_request(request)
...
-
if not response:
-
response = self.get_response(request)
-
if hasattr(self, 'process_response'):
-
response = self.process_response(request, response)
-
return response
Variable Value request <WSGIRequest: POST '/api/v1/live/record'>
response None
self <django.middleware.common.CommonMiddleware object at 0x7f8839f365c0>
-
-
/usr/local/lib/python3.5/dist-packages/django/middleware/common.py
inprocess_request
-
# Check for a redirect based on settings.PREPEND_WWW
-
host = request.get_host()
-
must_prepend = settings.PREPEND_WWW and host and not host.startswith('www.')
-
redirect_url = ('%s://www.%s' % (request.scheme, host)) if must_prepend else ''
-
# Check if a slash should be appended
-
if self.should_redirect_with_slash(request):
-
path = self.get_full_path_with_slash(request)
...
-
else:
-
path = request.get_full_path()
-
# Return a redirect if necessary
-
if redirect_url or path != request.get_full_path():
-
redirect_url += path
Variable Value host 'edu.51yxxg.com'
must_prepend False
redirect_url ''
request <WSGIRequest: POST '/api/v1/live/record'>
self <django.middleware.common.CommonMiddleware object at 0x7f8839f365c0>
-
-
/usr/local/lib/python3.5/dist-packages/django/middleware/common.py
inget_full_path_with_slash
-
raise RuntimeError(
-
"You called this URL via %(method)s, but the URL doesn't end "
-
"in a slash and you have APPEND_SLASH set. Django can't "
-
"redirect to the slash URL while maintaining %(method)s data. "
-
"Change your form to point to %(url)s (note the trailing "
-
"slash), or set APPEND_SLASH=False in your Django settings." % {
-
'method': request.method,
-
'url': request.get_host() + new_path,
...
-
}
-
)
-
return new_path
-
def process_response(self, request, response):
-
"""
Variable Value new_path '/api/v1/live/record/'
request <WSGIRequest: POST '/api/v1/live/record'>
self <django.middleware.common.CommonMiddleware object at 0x7f8839f365c0>
-
Request information
USER
[unable to retrieve the current user]
GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
No cookie data
META
Variable | Value |
---|---|
CONTENT_LENGTH |
'102' |
CONTENT_TYPE |
'application/json;charset=UTF-8' |
HTTP_ACCEPT |
'application/json, text/plain, */*' |
HTTP_ACCEPT_ENCODING |
'gzip, deflate' |
HTTP_ACCEPT_LANGUAGE |
'zh-CN,zh;q=0.9' |
HTTP_AUTHORIZATION |
'Token 24dab18adf0211eba61700163e12323c' |
HTTP_CONNECTION |
'close' |
HTTP_DNT |
'1' |
HTTP_HOST |
'edu.51yxxg.com' |
HTTP_ORIGIN |
'https://edu.51yxxg.com' |
HTTP_REFERER |
'https://edu.51yxxg.com/' |
HTTP_SEC_FETCH_MODE |
'cors' |
HTTP_SEC_FETCH_SITE |
'same-origin' |
HTTP_USER_AGENT |
('Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/78.0.3904.108 Safari/537.36') |
HTTP_X_FORWARDED_FOR |
'112.1.49.25' |
HTTP_X_FORWARDED_PROTO |
'https' |
PATH_INFO |
'/api/v1/live/record' |
QUERY_STRING |
'' |
RAW_URI |
'/api/v1/live/record' |
REMOTE_ADDR |
'172.16.168.223' |
REMOTE_PORT |
'34652' |
REQUEST_METHOD |
'POST' |
SCRIPT_NAME |
'' |
SERVER_NAME |
'0.0.0.0' |
SERVER_PORT |
'8099' |
SERVER_PROTOCOL |
'HTTP/1.0' |
SERVER_SOFTWARE |
'gunicorn/19.9.0' |
gunicorn.socket |
<gevent._socket3.socket at 0x7f8814e74908 object, fd=13, family=2, type=2049, proto=0> |
wsgi.errors |
<gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f8814dfcda0> |
wsgi.file_wrapper |
'' |
wsgi.input |
<gunicorn.http.body.Body object at 0x7f8814dfc048> |
wsgi.multiprocess |
True |
wsgi.multithread |
True |
wsgi.run_once |
False |
wsgi.url_scheme |
'https' |
wsgi.version |
(1, 0) |
Settings
Using settings module
edu.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES |
{} |
ADMINS |
[] |
ALLOWED_HOSTS |
['*'] |
APPEND_SLASH |
True |
AUTHENTICATION_BACKENDS |
['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS |
'********************' |
AUTH_USER_MODEL |
'auth.User' |
BASE_DIR |
'/home/zhiyu/product/edu' |
CACHES |
{'default': {'BACKEND': 'redis_cache.RedisCache', 'LOCATION': 'redis://:Zhiyu122306@r-bp1c125e22702be4.redis.rds.aliyuncs.com:6379', 'OPTIONS': {'CONNECTION_POOL_CLASS': 'redis.BlockingConnectionPool', 'CONNECTION_POOL_CLASS_KWARGS': {'max_connections': 50, 'timeout': 20}, 'DB': 4, 'MAX_CONNECTIONS': 1000, 'PARSER_CLASS': 'redis.connection.HiredisParser', 'PICKLE_VERSION': -1}}} |
CACHE_MIDDLEWARE_ALIAS |
'default' |
CACHE_MIDDLEWARE_KEY_PREFIX |
'********************' |
CACHE_MIDDLEWARE_SECONDS |
600 |
CORS_ALLOW_CREDENTIALS |
True |
CORS_ALLOW_HEADERS |
('XMLHttpRequest', 'X_FILENAME', 'accept-encoding', 'authorization', 'content-type', 'dnt', 'origin', 'user-agent', 'x-csrftoken', 'x-requested-with', 'Pragma') |
CORS_ALLOW_METHODS |
('DELETE', 'GET', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'VIEW') |
CORS_ORIGIN_ALLOW_ALL |
True |
CORS_ORIGIN_WHITELIST |
'*' |
CSRF_COOKIE_AGE |
31449600 |
CSRF_COOKIE_DOMAIN |
None |
CSRF_COOKIE_HTTPONLY |
False |
CSRF_COOKIE_NAME |
'csrftoken' |
CSRF_COOKIE_PATH |
'/' |
CSRF_COOKIE_SECURE |
False |
CSRF_FAILURE_VIEW |
'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME |
'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS |
[] |
CSRF_USE_SESSIONS |
False |
DATABASES |
{'banxue': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': 'rm-bp16hk719217i74757o.mysql.rds.aliyuncs.com', 'NAME': 'banxue_release', 'OPTIONS': {'charset': 'utf8mb4', 'init_command': "SET sql_mode='STRICT_TRANS_TABLES', " 'innodb_strict_mode=1'}, 'PASSWORD': '********************', 'PORT': '3306', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'zhiyu'}, 'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': 'rm-bp16hk719217i74757o.mysql.rds.aliyuncs.com', 'NAME': 'edu_release', 'OPTIONS': {'charset': 'utf8mb4', 'init_command': "SET sql_mode='STRICT_TRANS_TABLES', " 'innodb_strict_mode=1'}, 'PASSWORD': '********************', 'PORT': '3306', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'zhiyu'}} |
DATABASE_ROUTERS |
[] |
DATA_UPLOAD_MAX_MEMORY_SIZE |
2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS |
1000 |
DATETIME_FORMAT |
'N j, Y, P' |
DATETIME_INPUT_FORMATS |
['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] |
DATE_FORMAT |
'N j, Y' |
DATE_INPUT_FORMATS |
['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
DEBUG |
True |
DEBUG_PROPAGATE_EXCEPTIONS |
False |
DECIMAL_SEPARATOR |
'.' |
DEFAULT_CHARSET |
'utf-8' |
DEFAULT_CONTENT_TYPE |
'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER |
'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE |
'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL |
'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE |
'' |
DEFAULT_TABLESPACE |
'' |
DISALLOWED_USER_AGENTS |
[] |
EDU |
{'api_url_prefix_v1': '********************', 'host': {'host_string': 'zhiyu@172.16.168.223', 'password': '********************', 'web': {'command': 'git pull', 'pwd': '/web/XueLiAnPlatform'}}, 'qiniu': {'access_key': '********************', 'access_secret': '********************', 'access_server': 'https://store.51yxxg.com', 'bucket_name': 'banxue'}, 'redis': {'db': 1, 'host': 'r-bp1d9b2ec391e054.redis.rds.aliyuncs.com', 'password': '********************', 'port': 6379}, 'server': 'https://edu.51yxxg.com', 'sms': {'access_key_id': '********************', 'access_key_secret': '********************'}, 'tag': '', 'wechat_apiclient_cert': '********************', 'wechat_apiclient_key': '********************'} |
EMAIL_BACKEND |
'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST |
'localhost' |
EMAIL_HOST_PASSWORD |
'********************' |
EMAIL_HOST_USER |
'' |
EMAIL_PORT |
25 |
EMAIL_SSL_CERTFILE |
None |
EMAIL_SSL_KEYFILE |
'********************' |
EMAIL_SUBJECT_PREFIX |
'[Django] ' |
EMAIL_TIMEOUT |
None |
EMAIL_USE_LOCALTIME |
False |
EMAIL_USE_SSL |
False |
EMAIL_USE_TLS |
False |
ENCRYPT_MAGIC_CODE |
'edu@2018' |
FILE_CHARSET |
'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS |
None |
FILE_UPLOAD_HANDLERS |
['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE |
2621440 |
FILE_UPLOAD_PERMISSIONS |
None |
FILE_UPLOAD_TEMP_DIR |
None |
FIRST_DAY_OF_WEEK |
0 |
FIXTURE_DIRS |
[] |
FORCE_SCRIPT_NAME |
None |
FORMAT_MODULE_PATH |
None |
FORM_RENDERER |
'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS |
[] |
INSTALLED_APPS |
['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_mysql', 'corsheaders', 'util', 'edu_user', 'school', 'course', 'quiz', 'live', 'wechat', 'pay', 'service'] |
INTERNAL_IPS |
[] |
LANGUAGES |
[('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI |
['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE |
'en-us' |
LANGUAGE_COOKIE_AGE |
None |
LANGUAGE_COOKIE_DOMAIN |
None |
LANGUAGE_COOKIE_NAME |
'django_language' |
LANGUAGE_COOKIE_PATH |
'/' |
LOCALE_PATHS |
[] |
LOGGING |
{'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'formatters': {'custom': {'format': '[%(asctime)s] %(levelname)s %(pathname)s ' '%(funcName)s %(lineno)d >> %(message)s'}, 'simple': {'format': '[%(asctime)s] %(levelname)s %(message)s'}, 'verbose': {'format': '[%(asctime)s] %(levelname)s ' '[%(pathname)s %(funcName)s %(lineno)d] ' '%(process)d:%(thread)d %(message)s'}}, 'handlers': {'admin_school': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/admin_school.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'admin_user': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/admin_user.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'auth-middleware': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/auth-middleware.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'base_view': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/base_view.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'console': {'class': 'logging.StreamHandler', 'formatter': 'simple', 'level': 'INFO'}, 'course': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/course.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'exception_handler': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/exception_handler.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'live': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/live.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'live_helper': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/live_helper.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}, 'pay': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/pay.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'qiniu_helper': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/qiniu_helper.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'quiz': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/quiz.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'redis_helper': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/redis_helper.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'school': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/school.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'user': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/user.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'user_helper': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/user_helper.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'util': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/util.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'wechat': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/wechat.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'wechat_pay_helper': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/wechat_pay_helper.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}, 'wx_helper': {'backupCount': 3, 'class': 'logging.handlers.RotatingFileHandler', 'encoding': 'utf8', 'filename': '/tmp/log/edu/wx_helper.log', 'formatter': 'verbose', 'level': 'INFO', 'maxBytes': 20971520}}, 'loggers': {'admin_school': {'handlers': ['console', 'admin_school'], 'level': 'DEBUG'}, 'admin_user': {'handlers': ['console', 'admin_user'], 'level': 'DEBUG'}, 'auth-middleware': {'handlers': ['console', 'auth-middleware'], 'level': 'DEBUG'}, 'base_view': {'handlers': ['console', 'base_view'], 'level': 'DEBUG'}, 'course': {'handlers': ['console', 'course'], 'level': 'DEBUG'}, 'django.db.backends': {'handlers': ['console'], 'level': 'ERROR', 'propagate': True}, 'django.request': {'handlers': ['console'], 'level': 'ERROR', 'propagate': True}, 'exception_handler': {'handlers': ['console', 'exception_handler'], 'level': 'DEBUG'}, 'live': {'handlers': ['console', 'live'], 'level': 'DEBUG'}, 'live_helper': {'handlers': ['console', 'live_helper'], 'level': 'DEBUG'}, 'pay': {'handlers': ['console', 'pay'], 'level': 'DEBUG'}, 'qiniu_helper': {'handlers': ['console', 'qiniu_helper'], 'level': 'DEBUG'}, 'quiz': {'handlers': ['console', 'quiz'], 'level': 'DEBUG'}, 'redis_helper': {'handlers': ['console', 'redis_helper'], 'level': 'DEBUG'}, 'school': {'handlers': ['console', 'school'], 'level': 'DEBUG'}, 'user': {'handlers': ['console', 'user'], 'level': 'DEBUG'}, 'user_helper': {'handlers': ['console', 'user_helper'], 'level': 'DEBUG'}, 'util': {'handlers': ['console', 'util'], 'level': 'DEBUG'}, 'wechat': {'handlers': ['console', 'wechat'], 'level': 'DEBUG'}, 'wechat_pay_helper': {'handlers': ['console', 'wechat_pay_helper'], 'level': 'DEBUG'}, 'wx_helper': {'handlers': ['console', 'wx_helper'], 'level': 'DEBUG'}}, 'version': 1} |
LOGGING_CONFIG |
'logging.config.dictConfig' |
LOGIN_REDIRECT_URL |
'/accounts/profile/' |
LOGIN_URL |
'/accounts/login/' |
LOGOUT_REDIRECT_URL |
None |
MAIN_LOG_NAME |
'edu' |
MANAGERS |
[] |
MEDIA_ROOT |
'' |
MEDIA_URL |
'' |
MESSAGE_STORAGE |
'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE |
['corsheaders.middleware.CorsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'edu.middleware.EDUAuthenticationMiddleware'] |
MIGRATION_MODULES |
{} |
MONTH_DAY_FORMAT |
'F j' |
NUMBER_GROUPING |
0 |
PASSWORD_HASHERS |
'********************' |
PASSWORD_RESET_TIMEOUT_DAYS |
'********************' |
PREPEND_WWW |
False |
REST_FRAMEWORK |
{'DATETIME_FORMAT': '%Y-%m-%d %H:%M:%S', 'DEFAULT_AUTHENTICATION_CLASSES': ('edu.authentication.EDUTokenAuthentication',), 'DEFAULT_PAGINATION_CLASS': 'edu.pagination.BXCommonPagination', 'DEFAULT_PERMISSION_CLASSES': ('edu.permissions.BXViewPermissions',), 'EXCEPTION_HANDLER': 'edu.exceptions.custom_exception_handler', 'FILTER_BACKEND': 'rest_framework.filters.DjangoFilterBackend', 'PAGE_SIZE': 8} |
ROOT_URLCONF |
'edu.urls' |
SECRET_KEY |
'********************' |
SECURE_BROWSER_XSS_FILTER |
False |
SECURE_CONTENT_TYPE_NOSNIFF |
False |
SECURE_HSTS_INCLUDE_SUBDOMAINS |
False |
SECURE_HSTS_PRELOAD |
False |
SECURE_HSTS_SECONDS |
0 |
SECURE_PROXY_SSL_HEADER |
None |
SECURE_REDIRECT_EXEMPT |
[] |
SECURE_SSL_HOST |
None |
SECURE_SSL_REDIRECT |
False |
SERVER_EMAIL |
'root@localhost' |
SESSION_CACHE_ALIAS |
'default' |
SESSION_COOKIE_AGE |
1209600 |
SESSION_COOKIE_DOMAIN |
None |
SESSION_COOKIE_HTTPONLY |
True |
SESSION_COOKIE_NAME |
'sessionid' |
SESSION_COOKIE_PATH |
'/' |
SESSION_COOKIE_SECURE |
False |
SESSION_ENGINE |
'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE |
False |
SESSION_FILE_PATH |
None |
SESSION_SAVE_EVERY_REQUEST |
False |
SESSION_SERIALIZER |
'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE |
'edu.settings' |
SHORT_DATETIME_FORMAT |
'm/d/Y P' |
SHORT_DATE_FORMAT |
'm/d/Y' |
SIGNING_BACKEND |
'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS |
[] |
STATICFILES_DIRS |
[] |
STATICFILES_FINDERS |
['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE |
'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT |
None |
STATIC_URL |
'/static/' |
TEMPLATES |
[{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEST_NON_SERIALIZED_APPS |
[] |
TEST_RUNNER |
'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR |
',' |
TIME_FORMAT |
'P' |
TIME_INPUT_FORMATS |
['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE |
'Asia/Shanghai' |
USE_ETAGS |
False |
USE_I18N |
True |
USE_L10N |
True |
USE_THOUSAND_SEPARATOR |
False |
USE_TZ |
False |
USE_X_FORWARDED_HOST |
False |
USE_X_FORWARDED_PORT |
False |
WSGI_APPLICATION |
'edu.wsgi.application' |
X_FRAME_OPTIONS |
'SAMEORIGIN' |
YEAR_MONTH_FORMAT |
'F Y' |
You're seeing this error because you have
DEBUG = True
in your
Django settings file. Change that to
False
, and Django will
display a standard page generated by the handler for this status code.
不过安全意识不错,密码还是保护的好好的。
这时自然想到发送请求:
服务器非常高兴地接收了:
于是再发送请求:
GET /pass.php HTTP/1.1
服务器返回:
MIME格式为image/jpeg。
参考文献
php,一句话木马,三个雷同