"I do" stops interactive command if there is any potential risky pattern

Description

ido (I do) executes your shell command provided as its input, but it may wait for you to confirm when there is some potential risky pattern in your arguments (live, remove, delete,...)

Build or installation

$ go get github.com/icy/ido

Examples

$ go get github.com/icy/ido
$ ido rm -rfv /prod/

:: Found risky pattern: rm
:: Please type YES and enter to continue:
:: Thanks, you may have saved your system.

$ ido echo rm -rfv /prod/

:: Found risky pattern: rm
:: Please type YES and enter to continue: YES
:: Going to execute your command... Best luck.
rm -rfv /prod/

Default pattern

var regExpDefault = regexp.MustCompile("(?i)(del|delete|remove|rm|live|prod|production|format)")

TODO

  • Allow user to adjust risk pattern
  • Allow external configuration?
  • Print random number as confirmation PIN code

Authors. License

  • Ky-Anh Huynh
  • MIT -- Do almost whatever you want.
Owner
Ky-Anh Huynh
My forks: @icyfork.
Ky-Anh Huynh
Similar Resources

androidqf (Android Quick Forensics) helps quickly gathering forensic evidence from Android devices, in order to identify potential traces of compromise.

androidqf androidqf (Android Quick Forensics) is a portable tool to simplify the acquisition of relevant forensic data from Android devices. It is the

Dec 28, 2022

Scan systems and docker images for potential spring4shell vulnerabilities.

Scan systems and docker images for potential spring4shell vulnerabilities.

Scan systems and docker images for potential spring4shell vulnerabilities. Will detect in-depth (layered archives jar/zip/tar/war and scans for vulnerable Spring4shell versions. Binaries for Windows, Linux and OsX, but can be build on each platform supported by supported Golang.

Nov 9, 2022

Checks if there are any updates for imports in your module.

Go Up goup checks if there are any updates for imports in your module. It parses go.mod files to get dependencies with their version, uses go-git to r

Jul 7, 2022

Handle any SQS use case, monitor any queue. Reusable for any project! Invoke in a goroutine to process SQS messages.

GOSQS This package is intended to be a Go SQS listener that can be imported and invoked as a goroutine handled by the life cycle of your service. It's

Dec 22, 2021

Go-ant-pattern: An ant pattern parser

go-ant-pattern - An ant pattern parser. Usage package main import ( "fmt" "github.com/cbuschka/go-ant-pattern" ) func main() { path := "

Dec 7, 2021

Leader-follower-pattern - Build leader-follower system pattern with etcd election

主备系统模式 原理 使用分布式锁实现主备节点系统。通过对分布式锁进行续期,保持长期锁, 从而使当前服务节点处于主服务节点 无法获取分布式锁的服务节点,则作为备选

Jan 24, 2022

Command not found? Install it right there!

Command not found? Install it right there!

Tii On most GNU/Linux systems, when a command is not found, a message showing what can be run to install the command is printed.

Aug 10, 2022

Package create provides a generic option pattern for creating new values of any type

create Package create provides a generic option pattern for creating new values

Dec 30, 2021

go-pry - an interactive REPL for Go that allows you to drop into your code at any point.

go-pry - an interactive REPL for Go that allows you to drop into your code at any point.

go-pry go-pry - an interactive REPL for Go that allows you to drop into your code at any point. Example Usage Install go-pry go get github.com/d4l3k/g

Dec 24, 2022

Generate an interactive, autocompleting shell for any Cobra CLI

Generate an interactive, autocompleting shell for any Cobra CLI

cobra-shell Description Leverages the Cobra completion API to generate an interactive shell for any Cobra CLI, powered by go-prompt. On-the-fly autoco

Dec 19, 2022

Set is a useful collection but there is no built-in implementation in Go lang.

goset Set is a useful collection but there is no built-in implementation in Go lang. Why? The only one pkg which provides set operations now is golang

Sep 26, 2022

"there" also called "GoThere" aims to be a simple Go Library to reduce redundant code for REST APIs.

there "there" also called "GoThere" aims to be a simple Go Library to reduce redundant code for REST APIs. Despite the existence of the other librarie

Dec 25, 2022

Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration, and automating updates to configuration when there is new code to deploy.

Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration, and automating updates to configuration when there is new code to deploy.

Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration (like Git repositories), and automating updates to configuration when there is new code to deploy.

Jan 8, 2023

timea.go (did you see what I did there?) is a simple library to print given times in

timea.go timea.go (did you see what I did there?) is a simple library to print given times in "time ago" manner. Usage Get it: go get github.com/caarl

Sep 29, 2022

The Golang linter that checks that there is no simultaneous return of `nil` error and an invalid value.

nilnil Checks that there is no simultaneous return of nil error and an invalid value. Installation & usage $ go install github.com/Antonboom/nilnil@la

Dec 14, 2022

There are 1,000,000 uatoms in an atom, a fact which I frequently forget and/or second-guess.

There are 1,000,000 uatoms in an atom, a fact which I frequently forget and/or second-guess. This repo contains a lot of programming to save myself a little bit of remembering.

Nov 14, 2021

There are http server which handle transaction request(like: SET,GET,DELETE)

Loco_test_assesment There are http server which handle transaction request(like: SET,GET,DELETE) File "Backend Assessment.docx" has the proper informa

Jan 14, 2022

There is a certain amount of work to be done before you can implement the features of your Go powered CLI app

go-project-template-cli There is a certain amount of work to be done before you can implement the features of your Go powered CLI app. A few of those

Jan 23, 2022

Note - A text editor for the Linux Terminal! (Mainly compatible with Arch, because I made it on there)

Note - A text editor for the Linux Terminal! (Mainly compatible with Arch, because I made it on there)

Note - A text editor for the Linux Terminal! (Mainly compatible with Arch, because I made it on there)

Dec 7, 2022
Related tags
Scan systems and docker images for potential spring4shell vulnerabilities.
Scan systems and docker images for potential spring4shell vulnerabilities.

Scan systems and docker images for potential spring4shell vulnerabilities. Will detect in-depth (layered archives jar/zip/tar/war and scans for vulnerable Spring4shell versions. Binaries for Windows, Linux and OsX, but can be build on each platform supported by supported Golang.

Nov 9, 2022
Exploit for remote command execution in Golang go get command.

CVE-2018-6574 Exploit for remote command execution in Golang go get command. Introduction When you go get a package, Go is designed to build and insta

Oct 15, 2021
✒ A self-hosted, cross-platform service to sign iOS apps using any CI as a builder
✒ A self-hosted, cross-platform service to sign iOS apps using any CI as a builder

iOS Signer Service A self-hosted, cross-platform service to sign iOS apps using any CI as a builder Introduction There are many reasons to install app

Jan 7, 2023
Automatic HTTPS for any Go program: fully-managed TLS certificate issuance and renewal
Automatic HTTPS for any Go program: fully-managed TLS certificate issuance and renewal

Easy and Powerful TLS Automation The same library used by the Caddy Web Server Caddy's automagic TLS features—now for your own Go programs—in one powe

Jan 6, 2023
Serpscan is a powerfull php script designed to allow you to leverage the power of dorking straight from the comfort of your command line.
Serpscan is a powerfull php script designed to allow you to leverage the power of dorking straight from the comfort of your command line.

SerpScan Serpscan is a powerful PHP tool designed to allow you to leverage the power of dorking straight from the comfort of your command line. Table

Nov 11, 2022
SourcePoint is a C2 profile generator for Cobalt Strike command and control servers designed to ensure evasion.
SourcePoint is a C2 profile generator for Cobalt Strike command and control servers designed to ensure evasion.

SourcePoint SourcePoint is a polymorphic C2 profile generator for Cobalt Strike C2s, written in Go. SourcePoint allows unique C2 profiles to be genera

Dec 29, 2022
Volana - Shell command obfuscation to avoid detection systems
Volana - Shell command obfuscation to avoid detection systems

volana (moon in malagasy) { Use it ; ??(hide from); ??(detected by) } Shell comm

Nov 9, 2022
Doctl: A command-line interface (CLI) for the DigitalOcean API

doctl doctl is a command-line interface (CLI) for the DigitalOcean API. Usage:

Feb 16, 2022
A Flask-based HTTP(S) command and control (C2) framework with a web frontend. Malleable agents written in Go and scripts written in bash.

▄▄▄▄ ██▓ █████▒██▀███ ▒█████ ██████ ▄▄▄█████▓ ▓█████▄ ▓██▒▓██ ▒▓██ ▒ ██▒▒██▒ ██▒▒██ ▒ ▓ ██▒ ▓▒ ▒██▒ ▄██▒██▒▒████ ░▓██ ░▄█ ▒▒██░ ██▒░

Dec 24, 2022
TBH, there are probably better/faster implementations out there.

Scott's Skiplist TBH, there are probably better/faster implementations out there. See https://github.com/MauriceGit/skiplist-survey I wrote this one b

Feb 10, 2022