Skip to main content

Memcache Inspection Module and Command-Line Utility

Project description

Introduction

This package includes two things:

  • A Python module for extracting keys from Memcached servers.

  • A command-line utility for exploring, searching, and updating Memcached items.

This utility makes use of the Memcached status “features” discussed in the SensePost Blog.

Installation

Using pip (recommended):

$ pip install memcacheinspector

Or, using easy_install:

$ easy_install memcacheinspector

Or, you can download the source and install it by hand:

$ python setup.py install

Installing the package installs both the memcacheinspector python module as well as the mcinspect command-line utility.

Requirements

Usage

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>

License

memcacheinspector is released under the MIT License. See the LICENSE file for full text of the license.

Reference

Home: https://github.com/jayclassless/memcacheinspector

Package Index: http://pypi.python.org/pypi/memcacheinspector/

Python: http://www.python.org/

Memcached: http://memcached.org/

python-memcached: https://pypi.org/project/python-memcached/

pip: https://pip.pypa.io/

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

MIT License: http://www.opensource.org/licenses/mit-license.php

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memcacheinspector3-0.2.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

memcacheinspector3-0.2.2-py2-none-any.whl (9.0 kB view details)

Uploaded Python 2

File details

Details for the file memcacheinspector3-0.2.2.tar.gz.

File metadata

  • Download URL: memcacheinspector3-0.2.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.22.0 setuptools/36.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/2.7.5

File hashes

Hashes for memcacheinspector3-0.2.2.tar.gz
Algorithm Hash digest
SHA256 5b66007d873fc394b2574ae39f6e8771d2a1a7e7a81963b0749672473ee02024
MD5 e0ab8ecc57b4538fa3549d2f68cccd63
BLAKE2b-256 cf8cc16d7d82d510cbc16ddfd07998974d6e7865c5644d4accd4d81cef56deec

See more details on using hashes here.

File details

Details for the file memcacheinspector3-0.2.2-py2-none-any.whl.

File metadata

  • Download URL: memcacheinspector3-0.2.2-py2-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/36.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9

File hashes

Hashes for memcacheinspector3-0.2.2-py2-none-any.whl
Algorithm Hash digest
SHA256 e390ab50b0edbfc746b7e7d6342ef3c6bef5c5dfd6f5865e409b1be17ac3213e
MD5 491da30b0d8f1f0c8c7246d6b570ace8
BLAKE2b-256 180ac22f87dc237ae05c683d2c397d56d98ad1de4c38a5403cbd3b5fd41edef4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page