Sha256: 7f5494937758b7506c18d25f1bf6f8018811aded900736ebe37be9de04fbf1da
Contents?: true
Size: 946 Bytes
Versions: 3
Compression:
Stored size: 946 Bytes
Contents
#!/usr/bin/env ruby # Author Eric Monti (emonti at matasano) # # d64 converts a base-64 encoded string back to its orginal form. # # Usage: d64 -h # require 'rbkb' require 'rbkb/command_line' include RBkB::CommandLine #------------------------------------------------------------------------------- # Init options and arg parsing OPTS = {} arg = bkb_stdargs(nil, OPTS) arg = bkb_inputargs(arg, OPTS) arg.banner += " <data | blank for stdin>" #------------------------------------------------------------------------------ # Parse arguments arg.parse!(ARGV) rescue bail "Error: #{$!}\n#{arg}" # default string arg if OPTS[:indat].nil? and a=ARGV.shift OPTS[:indat] = a.dup end # catchall if ARGV.length != 0 bail "Error: bad arguments - #{ARGV.join(' ')}\n-h|--help for more info." end OPTS[:indat] ||= STDIN.read() #------------------------------------------------------------------------------ # Do Stuff print OPTS[:indat].d64
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
emonti-rbkb-0.6.1.1 | bin/d64 |
emonti-rbkb-0.6.1.2 | bin/d64 |
emonti-rbkb-0.6.1.3 | bin/d64 |