跳转到主要内容

Memcache检查模块和命令行工具

项目描述

简介

这是一个对https://github.com/jayclassless/memcacheinspector的分支,以支持Python 3。pypi上的包是“memcacheinspector3”,但导入的模块仍然是“memcacheinspector”

此包包括两个部分

  • 一个用于从Memcached服务器提取键的Python模块。

  • 一个用于探索、搜索和更新Memcached项的命令行工具。

此实用程序利用了Memcached状态“功能”,这些功能在SensePost博客中讨论。

安装

使用pip(推荐)

$ pip install memcacheinspector3

或者,您可以下载源代码并手动安装。

$ python setup.py install

安装包将同时安装memcacheinspector Python模块和mcinspect命令行工具。

要求

用法

Usage: mcinspect [options] <action> [<arguments>]

Actions:
  list                     Lists all items stored in the server(s).
  dump                     Dumps all items (including values) stored in the
                           server(s).
  grep <pattern>           Dumps all items (including values) whose key or value
                           matches the specified search pattern.
  get <key> [<key> ...]    Retrieves the items with the specified key(s).
  set <key> <value>        Sets the item with the specified key and value.
  incr key                 Increments the value of the items with the specified
                           key(s).
  decr key                 Decrements the value of the items with the specified
                           key(s).
  delete <key> [<key> ...] Deletes the items with the specified key(s).
  flush                    Expires all items in the server(s).
  stats                    Retrieves statistics from the server(s).

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -s SERVER, --server=SERVER
                        Specifies a server to connect to. Can be used multiple
                        times. Defaults to '127.0.0.1:11211'.
  -z MAX_VALUE_SIZE, --max-value-size=MAX_VALUE_SIZE
                        The maximum size (in bytes) of a value can be when
                        performing a list or dump action. Zero or lower is
                        interpreted as no limit. Defaults to 0.
  -d DELTA, --delta=DELTA
                        The amount to change the value when using the incr or
                        decr actions. Defaults to 1.
  -i, --ignore-case     Ignore case distinctions in both the pattern and the
                        items during the grep action.
  -v, --invert-match    Inverts the sense of matching, to select non-matching
                        items during the grep action.

Output Format:
  list:
    <server connection string>|<expiration date>|<size in bytes>|<key>

  dump, grep:
    <server connection string>|<expiration date>|<size in bytes>|<key>
    <value>

  get, set, incr, decr:
    <server connection string>|<key>
    <value>

  delete:
    <server connection string>|<key>

  flush:
    <server connection string>

  stats:
    <server connection string>|<statistic key>|<value>

许可协议

memcacheinspector遵循MIT许可证。请参阅LICENSE文件以获取许可证的完整文本。

参考

主页https://github.com/brondsem/memcacheinspector/tree/fork

包索引http://pypi.python.org/pypi/memcacheinspector3/

Pythonhttps://pythonlang.cn/

Memcachedhttp://memcached.org/

python-memcachedhttps://pypi.ac.cn/project/python-memcached/

piphttps://pip.pypa.org.cn/

SensePost博客https://sensepost.com/blog/2010/blackhat-write-up-go-derper-and-mining-memcaches/

MIT许可证https://open-source.org.cn/licenses/mit-license.php

项目详情


下载文件

下载您平台对应的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码分发

memcacheinspector3-0.2.3.tar.gz (6.5 kB 查看哈希值)

上传时间 源代码

构建分发

memcacheinspector3-0.2.3-py2.py3-none-any.whl (7.3 kB 查看哈希值)

上传时间 Python 2 Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面