GithubHelp home page GithubHelp logo

jhao104 / ssdbadmin Goto Github PK

View Code? Open in Web Editor NEW
354.0 19.0 89.0 246 KB

SSDB可视化界面管理工具 ssdb web manager tool

Home Page: http://ssdb.io/docs/zh_cn/

License: Apache License 2.0

Python 56.06% HTML 42.67% CSS 0.39% JavaScript 0.57% Dockerfile 0.31%
ssdb flask gui webgui ssdbadmin

ssdbadmin's Introduction

My GitHub

Top Langs

ssdbadmin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ssdbadmin's Issues

UnicodeDecodeError

点击k-v页面报此错误

Snipaste_2020-05-16_22-52-52

解决方法

原为: item_list = [.decode() for _ in item_list if isinstance(, bytes)]

改为: item_list = [.decode("utf8", "ignore") for _ in item_list if isinstance(, bytes)]

不清楚是什么原因

运行成功,网页报错

python 3.7.1
flask 0.12

Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1994, in __call__ return self.wsgi_app(environ, start_response) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1985, in wsgi_app response = self.handle_exception(e) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\_compat.py", line 33, in reraise raise value File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\_compat.py", line 33, in reraise raise value File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "D:\Downloads\goole\SSDBAdmin-master\SSDBAdmin\apps\index.py", line 34, in index server_info = SSDBClient(request).serverInfo() File "D:\Downloads\goole\SSDBAdmin-master\SSDBAdmin\model\SSDBClient.py", line 51, in serverInfo info_list = [_.decode() for _ in self.__conn.execute_command('info')] File "D:\Downloads\goole\SSDBAdmin-master\SSDBAdmin\model\SSDBClient.py", line 51, in <listcomp> info_list = [_.decode() for _ in self.__conn.execute_command('info')] AttributeError: 'int' object has no attribute 'decode'

image
image

发现bug

在 kv 页面,当没有选择任何数据的时候,直接点击红色 x 会报错

redis命令错误

页面都报错了, hlist这个命令好像不存在啊,还有scan命令用法应该也有问题,直接报错

能够访问SSDBAdmin但是无法获取SSDB数据

如题
Web网页提示:500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
服务器的运行日志里面有一个报错:AttributeError: 'list' object has no attribute 'decode

服务器环境:Centos 8 && python36

AttributeError: 'int' object has no attribute 'decode'

File "C:\ProgramData\Anaconda3\lib\site-packages\flask\app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "C:\ProgramData\Anaconda3\lib\site-packages\flask\app.py", line 2295, in wsgi_app
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e)
except:
error = sys.exc_info()[1]
raise
return response(environ, start_response)
finally:
File "C:\ProgramData\Anaconda3\lib\site-packages\flask\app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\ProgramData\Anaconda3\lib\site-packages\flask_compat.py", line 35, in reraise
raise value
File "C:\ProgramData\Anaconda3\lib\site-packages\flask\app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "C:\ProgramData\Anaconda3\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\ProgramData\Anaconda3\lib\site-packages\flask\app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\ProgramData\Anaconda3\lib\site-packages\flask_compat.py", line 35, in reraise
raise value
File "C:\ProgramData\Anaconda3\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "C:\ProgramData\Anaconda3\lib\site-packages\flask\app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users<user>\Python\jhao104\SSDBAdmin\SSDBAdmin\apps\index.py", line 34, in index
server_info = SSDBClient(request).serverInfo()
File "C:\Users<user>\Python\jhao104\SSDBAdmin\SSDBAdmin\model\SSDBClient.py", line 51, in serverInfo
info_list = [.decode() for _ in self.__conn.execute_command('info')]
File "C:\Users<user>\Python\jhao104\SSDBAdmin\SSDBAdmin\model\SSDBClient.py", line 51, in
info_list = [
.decode() for _ in self.__conn.execute_command('info')]
AttributeError: 'int' object has no attribute 'decode'

项目启动正常,浏览器进入管理页面报错

python 环境:3.7.2
redis 版本: 5.0.4 (00000000/0) 64 bit

AttributeError
AttributeError: 'int' object has no attribute 'decode'

Traceback (most recent call last)
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/compat.py", line 35, in reraise
raise value
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/compat.py", line 35, in reraise
raise value
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/lixingmao/Downloads/proxy_pool/venv/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
Open an interactive python shell in this framereturn self.view_functionsrule.endpoint
File "/Users/lixingmao/Downloads/SSDBAdmin/SSDBAdmin/apps/index.py", line 34, in index
server_info = SSDBClient(request).serverInfo()
File "/Users/lixingmao/Downloads/SSDBAdmin/SSDBAdmin/model/SSDBClient.py", line 53, in serverInfo
info_list = [
.decode() for _ in self.__conn.execute_command('info')]
File "/Users/lixingmao/Downloads/SSDBAdmin/SSDBAdmin/model/SSDBClient.py", line 53, in
info_list = [
.decode() for _ in self.__conn.execute_command('info')]
AttributeError: 'int' object has no attribute 'decode'
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.

配置完host和端口 界面打不开

  • Serving Flask app "SSDBAdmin" (lazy loading)
  • Environment: production
    WARNING: Do not use the development server in a production environment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 836-829-088
    但是网站127.0.0.1:5000上不去

反射型Xss

您好,我是奇虎360代码卫士团队的工作人员,在我们的开源项目检测中发现SSDBAdmin存在反射型XSS风险,详细信息如下:

image
在apps/queue.py 53行,未检验数据是否存在恶意代码,应用程序将容易受到反射型XSS攻击。建议用户的输入进行合理验证。

在使用这个工具查看数据时出现了这个error:ValueError: too many values to unpack (expected 2)

[2019-10-11 19:09:17,369] ERROR in app: Exception on /ssdbadmin/hash/scan [GET]
Traceback (most recent call last):
File "D:\Python37\lib\site-packages\flask\app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "D:\Python37\lib\site-packages\flask\app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "D:\Python37\lib\site-packages\flask\app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "D:\Python37\lib\site-packages\flask_compat.py", line 33, in reraise
raise value
File "D:\Python37\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "D:\Python37\lib\site-packages\flask\app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "D:\PyCharm Community Edition 2019.2.1\SSDBAdmin-master\SSDBAdmin\apps\hash.py", line 58, in hashScan
item_list = db_client.hashScan(name, key_start, "", limit=limit + 1)
File "D:\PyCharm Community Edition 2019.2.1\SSDBAdmin-master\SSDBAdmin\model\SSDBClient.py", line 301, in hashScan
item_list = self.__conn.execute_command('hscan', hash_name, key_start, key_end, limit)
File "D:\Python37\lib\site-packages\redis\client.py", line 839, in execute_command
return self.parse_response(conn, command_name, **options)
File "D:\Python37\lib\site-packages\redis\client.py", line 859, in parse_response
return self.response_callbacks[command_name](response, **options)
File "D:\Python37\lib\site-packages\redis\client.py", line 380, in parse_hscan
cursor, r = response
ValueError: too many values to unpack (expected 2)

TODO

  • Support Python3
  • ssdb password verify
  • login user authentication

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.