Git Product home page Git Product logo

ronin-repos's Introduction

ronin-repos

CI Code Climate Gem Version

Description

ronin-repos provides a repository system for installing, managing, and accessing third-party git repositories, that can contain additional Ruby code or other data.

Third-party git repositories can be used to extend parts of Ronin. Other Ronin libraries can then list and load additional third-party Ruby classes from specific directories within the installed third-party repos:

tl;dr ronin-repos is essentially a decentralized plugin system for Ronin using git repos.

ronin-repos is part of the ronin-rb project, a toolkit for security research and development.

Features

  • Supports installing any Git repository.
  • Manages installed repositories.
  • Has 85% documentation coverage.
  • Has 100% test coverage.

Synopsis

Usage: ronin-repos [options] [COMMAND [ARGS...]]

Options:
    -h, --help                       Print help information

Arguments:
    [COMMAND]                        The command name to run
    [ARGS ...]                       Additional arguments for the command

Commands:
    help
    install
    list, ls
    new
    purge
    remove, rm
    update, up

Install a repository:

$ ronin-repos install https://github.com/...

List installed Repositories:

$ ronin-repos ls

Update all installed Repositories:

$ ronin-repos update

Update a specific Repositories:

$ ronin-repos update NAME

Uninstall a specific Repositories:

$ ronin-repos rm repo-name

Delete all repositories:

$ ronin-repos purge

Generate your own repo:

$ ronin-repos new my-repo
$ git remote add origin [email protected]:user/my-repo.git
$ git push -u origin main

Examples

require 'ronin/repos'

Ronin::Repos.find_file('wordlists/wordlist.txt')
# => "/home/user/.cache/ronin-repos/foo-repo/wordlists/wordlist.txt"

Rnnin::Repos.glob("wordlists/*.txt")
# => ["/home/user/.cache/ronin-repos/foo-repo/wordlists/cities.txt",
#     "/home/user/.cache/ronin-repos/foo-repo/wordlists/states.txt",
#     "/home/user/.cache/ronin-repos/bar-repo/wordlists/bands.txt",
#     "/home/user/.cache/ronin-repos/bar-repo/wordlists/beers.txt"]

Requirements

Install

$ gem install ronin-repos

Gemfile

gem 'ronin-repos', '~> 0.1'

Development

  1. Fork It!
  2. Clone It!
  3. cd ronin-repos
  4. bundle install
  5. git checkout -b my_feature
  6. Code It!
  7. bundle exec rake spec
  8. git push origin my_feature

License

Copyright (c) 2021-2023 Hal Brodigan (postmodern.mod3 at gmail.com)

ronin-repos is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

ronin-repos is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with ronin-repos. If not, see https://www.gnu.org/licenses/.

ronin-repos's People

Contributors

postmodern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

yonasbsd

ronin-repos's Issues

Update to kramdown-man 1.0.0

Update the kramdown-man dependency to 1.0.0. Also update the man pages to use the new kramdown-man syntax (definition lists for arguments/options definitions and [ronin-foo](ronin-foo.1.md) man page links).

Add methods to allow requiring a single file from a repository

It should be possible to require a .rb file from a repository. These methods should accept a relative path and check in the lib/ directory of each repository.

If the repository has a Gemfile, somehow activate Bundler to activate any additional dependencies.

Add `NAME` sections to all man pages

Add a NAME section to the tops of all man pages with the command's name and a short summary.

## NAME

ronin foo - summary here

This can probably be automated with a Ruby script.

Add rubocop

Add rubocop to the repository.

  • Add the rubocop gem to the Gemfile.
  • Start with the template rubocop.yml file which closely matches Ronin's general code style.
  • Add the rubocop task and add it to the CI.

Add an `exec` subcommand to ronin-repos

It should be possible to exec a ruby script (or other executable file) within a repository's bin/ directory.

If the repository has a Gemfile, then prefix the command with bundle exec. Also set the BUNDLER_GEMFILE env variable so bundler knows where the Gemfile is.

Prefix all git methods in Repository with `git_`

Prefix all git related methods in Repository with git_. Add additional high-level methods for install, update, delete which call the git_ methods, and possibly other related methods. This will allow doing post-install tasks, like running bundle install, etc.

Add the ability of detecting a Gemfile and running `bundle install`

It should be possible to put a Gemfile in a repository, and run bundle install when the repository is installed. Gems should probably be installed into a local vendor/bundle directory or possibly a shared ~/.cache/ronin-repos/vendor/bundle directory.

Must also run bundle install after a repository has been updated.

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.