Coder Social home page Coder Social logo

uget's Introduction

μget

Simple utility to help CI guys do their job in constrained environments to download and run binaries in /tmp. Size of μget is around 4Kb.

Features

  • Could be used as curl or wget replacement. In my case it's convenient to PUT binary to S3 bucket and then run it on device

  • Supports only HTTP (we need deal with size), no redirects yet

  • No fancy error messages inside binary, returns only exit codes from defined preset (see Error codes section).

Usage

  • As curl replacement: uget ifconfig.me

  • Ad-hoc utility to download and run binary:

$ ./uget run openipc.s3-eu-west-1.amazonaws.com/ipc_chip_info

Transferring to device using telnet

# on your Linux workstation
$ ./bin2sh uget > uget.sh
# login via telnet to embedded device, copy-paste text from uget.sh
# target binary will reside in /tmp
$ ./uget example.com

# if target system doesn't support printf use
$ ./bin2sh -echo uget > uget.sh

Demo

asciicast

Error codes

Error code Description
0 everything is ok
1 general error code
2 socket creation error
3 DNS resolution error
4 connection error
5 send error
6 incorrect command line options
  • HTTP response codes other than 2XX are transformed from XYZ number to XZ exit code (so 44 means 404, or 52 means 502)

uget's People

Contributors

flyrouter avatar ssharshunov avatar widgetii avatar ystinia avatar

Stargazers

 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

uget's Issues

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.