前言:我最近一直在学习使用简单的CGI进行Python web开发。我跟我的Python老师打赌,他不能进入我的数据库,或者“黑客”我简单的web应用程序。不幸的是,在自学了如何使用某些模块以确保应用程序的安全之后,我发现我的web主机(Hostgator)不允许安装其他模块。唯一一个我无法解决的问题(由于它的复杂性)是烧杯式无饼干会议。Here是我要重新创建的。在
以下是Hostgator提供的Python3模块列表:
CDROM atexit importlib shutil
DLFCN audioop inspect signal
IN base64 io site
MySQLdb bdb itertools smtpd
TYPES binascii json smtplib
__future__ binhex keyword sndhdr
_abcoll bisect lib2to3 socket
_ast builtins linecache socketserver
_backport bz2 locale spwd
_bisect cProfile logging sqlite3
_codecs calendar macpath sre_compile
_codecs_cn cgi macurl2path sre_constants
_codecs_hk cgitb mailbox sre_parse
_codecs_iso2022 chunk mailcap ssl
_codecs_jp cmath marshal stat
_codecs_kr cmd math string
_codecs_tw code mimetypes stringprep
_collections codecs mmap struct
_compat_pickle codeop modulefinder subprocess
_csv collections multiprocessing sunau
_ctypes colorsys netrc symbol
_ctypes_test command nis symtable
_curses compileall nntplib sys
_curses_panel concurrent ntpath sysconfig
_datetime configparser nturl2path syslog
_dbm contextlib numbers tabnanny
_dummy_thread copy opcode tarfile
_elementtree copyreg operator telnetlib
_functools crypt optparse tempfile
_gdbm csv os termios
_hashlib ctypes os2emxpath test
_heapq curses ossaudiodev tests
_io datetime parser textwrap
_json dbm pdb this
_locale decimal pickle threading
_lsprof difflib pickletools time
_markerlib dis pip timeit
_markupbase distutils pipes tkinter
_multibytecodec doctest pkg_resources token
_multiprocessing dummy_threading pkgutil tokenize
_mysql easy_install platform trace
_mysql_exceptions email plistlib traceback
_pickle encodings poplib tty
_posixsubprocess errno posix turtle
_pyio fcntl posixpath turtledemo
_random filecmp pprint types
_socket fileinput profile unicodedata
_sqlite3 fnmatch pstats unittest
_sre formatter pty urllib
_ssl fractions pwd uu
_string ftplib py_compile uuid
_strptime functools pyclbr virtualenv
_struct gc pydoc virtualenv_support
_symtable genericpath pydoc_data warnings
_testcapi getopt pyexpat wave
_thread getpass queue weakref
_threading_local gettext quopri webbrowser
_tkinter glob random wsgiref
_warnings grp re xdrlib
_weakref gzip readline xml
_weakrefset hashlib reprlib xmlrpc
abc heapq resource xxlimited
aifc hmac rlcompleter xxsubtype
antigravity html runpy zipfile
argparse http sched zipimport
array idlelib select zlib
ast imaplib setuptools
asynchat imghdr shelve
asyncore imp shlex
(很抱歉这么长时间,我只是觉得这是一条相关的信息)。在
所以,最后,关于这个问题。如何仅使用列出的模块重新创建烧杯加密会话管理?我真的需要一些帮助,我非常感激。即使有人能给我指点方向(或者更好的是推动我)。请记住,我的目标是通过加密的会话id(或类似的东西)阻止跨站点脚本。在
作为补充说明,如果这不是理想的方法,请告诉我。我将非常感谢你的帮助。在
编辑: 我可以通过添加PYTHONPATH并将其安装到单独的目录中,从而将烧杯安装到服务器上。但是,我不能安装WSGI,因为它(确认)不支持Hostgator共享帐户。我一直在试图弄清楚如何在不使用WSGI的情况下使用烧杯模块来管理我的会话——它等待调用start_response来发送会话信息,而这只适用于WSGI格式(我尝试了几种不同的方法,但都没有成功)。或者B:从头开始构建一个安全会话管理类(这对我来说似乎太遥不可及了)
目前没有回答
相关问题 更多 >
编程相关推荐