Git Product home page Git Product logo

haricot's Introduction

haricot

Utility to work with HAR files.

I had the objective to reverse-engineer a Web-UI. With Chrome's developer tools it is a breeze to record the network traffic triggered by specific user actions and save such a bunch of requests as a HAR file (which describes all requests, URLs, payloads, responses, headers etc. as JSON).

Haricot is a simple tool to print a summary about the entries, and to extract individual payloads, e.g. POST data or reponse content.

USAGE:
    haricot [FLAGS] [OPTIONS] -f <FILE> [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information
    -v               Verbosity level (default=WARNING, 'v'=INFO, 'vv'=DEBUG, 'vvv'=TRACE)

OPTIONS:
    -c <FILE>        Path to config file. Format may be TOML, YAML, HJSON, JSON.
    -f <FILE>        Path to HAR file.

SUBCOMMANDS:
    body       Get body data
    entries    Count entries
    help       Prints this message or the help of the given subcommand(s)
    summary    Show a summary of the entries

Example:

./target/debug/haricot -f /tmp/my-har-file.har -vv body 3 resp --ecs | jq '.'

But foremost, Haricot is my first application while learning Rust. My objectives were, of course, Rust, and also to glimpse into "clap" for command line parsing and "serde" to parse and manipulate JSON structures.

As said, this is my first app in Rust, so the code is not elegant, and surely many unnecessary type casts and (de-)references happen. -- WIP.

Compile

With a nightly Rust toolchain, run

cargo build

and then have a look at

./target/debug/haricot --help

For development I used this watcher

cargo watch -x 'run -- -v -f /tmp/my-har-file.har'

haricot's People

Contributors

dmdm avatar

Watchers

James Cloos avatar  avatar

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.