Code Monkey home page Code Monkey logo

snake-tail's Introduction

Snake Tail

The command line interface to Snake. If Web UIs and cURL are not your thing, then this is for you!

Installation

To install perform the following:

pip3 install git+https://github.com/countercept/snake-tail

Usage

Snake Tail supports the following, as displayed by its usage page:

snake-tail -h
usage: snake-tail [-h] [--insecure] [--json]
                  {command,download,file,memory,note,scale,scales,store,upload}
                  ...
positional arguments:
  {command,download,file,memory,note,scale,scales,store,upload}
                        command help
    command             execute a command on a sample in snake
    download            download a sample from snake
    file                get information about a file from snake
    memory              get information about a memory from snake
    note                get the note for a sample
    scale               interact with snake's scales
    scales              list installed scales
    store               get information about samples in snake
    upload              upload a sample to snake
optional arguments:
  -h, --help            show this help message and exit
  --insecure            ignore ssl verification
  --json                return all output in json (where applicable)

By default, Snake Tail will try to communicate with Snake over localhost:5000 this can be overridden by setting the environment file SNAKE_URL.

export SNAKE_URL='http://api.snake.example.com'

snake-tail's People

Contributors

alexkornitzer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

snake-tail's Issues

'snake-tail store' only returns 10 samples

I guess this is due to the pagination fix, which I'm very happy with. But just wanted to make you aware that his is now causing the 'snake-tail store' only returning 10 samples

Not compatible with Python 3.7

From my investigation it looks like snake-tail isn't compatible with Python 3.7 due to the use of the async option, this feature changed for Pyhton 3.7

Traceback (most recent call last):
  File "~/.local/bin//snake-tail", line 11, in <module>
    load_entry_point('snake-tail==1.0', 'console_scripts', 'snake-tail')()
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "~/.local/lib/python3.7/site-packages/snake_tail/snake_tail.py", line 122
    asynchronous=args.async,

More of a feature request than an issue

Currently if you try to upload a file, for example, and the file already exists the snake-tail tools prints the API error from the web server and does an exit (0) ideally you would want to reflect this error in the exit code when the tool exits.

$ snake-tail upload file a.exe ; echo $?
Status: Error
Message: upload/file - file already exists for given sha256 digest
0

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.