From 9ac36dce753113b64f5c23df3936a6bc0e8762e8 Mon Sep 17 00:00:00 2001 From: dmur1 <93072266+dmur1@users.noreply.github.com> Date: Fri, 21 Mar 2025 09:48:02 +0000 Subject: [PATCH 1/3] delete the angr command --- README.md | 24 ------------------- commands/angr.go | 60 ------------------------------------------------ 2 files changed, 84 deletions(-) delete mode 100644 commands/angr.go diff --git a/README.md b/README.md index 01dff76..cc87a13 100644 --- a/README.md +++ b/README.md @@ -107,30 +107,6 @@ you can restore a specific version of a file by copying it from the subdirectory --- -### 😠 angr - -``` -$ ret angr -``` - -runs the angr docker with ret - -mounts the current working directory as a volume - -note that this command requires docker - -effectively runs: -```bash -$ sudo docker pull angr/angr -$ sudo docker run -it -v $PWD:/home/angr/x angr/angr -``` - -see https://docs.angr.io/en/latest/getting-started/installing.html#installing-with-docker for more information - -🔗 https://github.com/rerrorctf/ret/blob/main/commands/angr.go - ---- - ### 🏁 capture ``` diff --git a/commands/angr.go b/commands/angr.go deleted file mode 100644 index 2d5adae..0000000 --- a/commands/angr.go +++ /dev/null @@ -1,60 +0,0 @@ -package commands - -import ( - "fmt" - "log" - "os" - "os/exec" - "ret/theme" -) - -func init() { - Commands = append(Commands, Command{ - Name: "angr", - Emoji: "😠", - Func: Angr, - Help: AngrHelp, - Arguments: nil}) -} - -func AngrHelp() string { - return "runs the angr docker with ret\n\n" + - "mounts the current working directory as a volume\n\n" + - "note that this command requires docker\n\n" + - "effectively runs:\n" + - "```bash\n" + - theme.ColorGray + "$ " + theme.ColorBlue + "sudo docker pull angr/angr\n" + - theme.ColorGray + "$ " + theme.ColorBlue + "sudo docker run -it -v $PWD:/home/angr/x angr/angr\n" + theme.ColorReset + - "```\n\n" + - "see https://docs.angr.io/en/latest/getting-started/installing.html#installing-with-docker for more information\n" + theme.ColorReset -} - -func Angr(args []string) { - pull := exec.Command("sudo", "docker", "pull", "angr/angr") - - pull.Stdin = os.Stdin - pull.Stdout = os.Stdout - pull.Stderr = os.Stderr - - err := pull.Run() - if err != nil { - log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err) - } - - dir, err := os.Getwd() - if err != nil { - log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err) - } - - run := exec.Command("sudo", "docker", "run", "-it", "-v", fmt.Sprintf("%s:/home/angr/x", dir), "angr/angr") - - run.Stdin = os.Stdin - run.Stdout = os.Stdout - run.Stderr = os.Stderr - - err = run.Run() - - if err != nil { - log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err) - } -} From 8c06b8058dceca01f6151bfcb3396547f1cbfe44 Mon Sep 17 00:00:00 2001 From: dmur1 <93072266+dmur1@users.noreply.github.com> Date: Fri, 21 Mar 2025 09:49:49 +0000 Subject: [PATCH 2/3] Revert "delete the angr command" This reverts commit 9ac36dce753113b64f5c23df3936a6bc0e8762e8. --- README.md | 24 +++++++++++++++++++ commands/angr.go | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 commands/angr.go diff --git a/README.md b/README.md index cc87a13..01dff76 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,30 @@ you can restore a specific version of a file by copying it from the subdirectory --- +### 😠 angr + +``` +$ ret angr +``` + +runs the angr docker with ret + +mounts the current working directory as a volume + +note that this command requires docker + +effectively runs: +```bash +$ sudo docker pull angr/angr +$ sudo docker run -it -v $PWD:/home/angr/x angr/angr +``` + +see https://docs.angr.io/en/latest/getting-started/installing.html#installing-with-docker for more information + +🔗 https://github.com/rerrorctf/ret/blob/main/commands/angr.go + +--- + ### 🏁 capture ``` diff --git a/commands/angr.go b/commands/angr.go new file mode 100644 index 0000000..2d5adae --- /dev/null +++ b/commands/angr.go @@ -0,0 +1,60 @@ +package commands + +import ( + "fmt" + "log" + "os" + "os/exec" + "ret/theme" +) + +func init() { + Commands = append(Commands, Command{ + Name: "angr", + Emoji: "😠", + Func: Angr, + Help: AngrHelp, + Arguments: nil}) +} + +func AngrHelp() string { + return "runs the angr docker with ret\n\n" + + "mounts the current working directory as a volume\n\n" + + "note that this command requires docker\n\n" + + "effectively runs:\n" + + "```bash\n" + + theme.ColorGray + "$ " + theme.ColorBlue + "sudo docker pull angr/angr\n" + + theme.ColorGray + "$ " + theme.ColorBlue + "sudo docker run -it -v $PWD:/home/angr/x angr/angr\n" + theme.ColorReset + + "```\n\n" + + "see https://docs.angr.io/en/latest/getting-started/installing.html#installing-with-docker for more information\n" + theme.ColorReset +} + +func Angr(args []string) { + pull := exec.Command("sudo", "docker", "pull", "angr/angr") + + pull.Stdin = os.Stdin + pull.Stdout = os.Stdout + pull.Stderr = os.Stderr + + err := pull.Run() + if err != nil { + log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err) + } + + dir, err := os.Getwd() + if err != nil { + log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err) + } + + run := exec.Command("sudo", "docker", "run", "-it", "-v", fmt.Sprintf("%s:/home/angr/x", dir), "angr/angr") + + run.Stdin = os.Stdin + run.Stdout = os.Stdout + run.Stderr = os.Stderr + + err = run.Run() + + if err != nil { + log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err) + } +} From 124421998bbb348c661b7edb24578a29dcd7027a Mon Sep 17 00:00:00 2001 From: dmur1 <93072266+dmur1@users.noreply.github.com> Date: Fri, 21 Mar 2025 09:50:34 +0000 Subject: [PATCH 3/3] delete the angr command --- README.md | 24 ------------------- commands/angr.go | 60 ------------------------------------------------ 2 files changed, 84 deletions(-) delete mode 100644 commands/angr.go diff --git a/README.md b/README.md index 01dff76..cc87a13 100644 --- a/README.md +++ b/README.md @@ -107,30 +107,6 @@ you can restore a specific version of a file by copying it from the subdirectory --- -### 😠 angr - -``` -$ ret angr -``` - -runs the angr docker with ret - -mounts the current working directory as a volume - -note that this command requires docker - -effectively runs: -```bash -$ sudo docker pull angr/angr -$ sudo docker run -it -v $PWD:/home/angr/x angr/angr -``` - -see https://docs.angr.io/en/latest/getting-started/installing.html#installing-with-docker for more information - -🔗 https://github.com/rerrorctf/ret/blob/main/commands/angr.go - ---- - ### 🏁 capture ``` diff --git a/commands/angr.go b/commands/angr.go deleted file mode 100644 index 2d5adae..0000000 --- a/commands/angr.go +++ /dev/null @@ -1,60 +0,0 @@ -package commands - -import ( - "fmt" - "log" - "os" - "os/exec" - "ret/theme" -) - -func init() { - Commands = append(Commands, Command{ - Name: "angr", - Emoji: "😠", - Func: Angr, - Help: AngrHelp, - Arguments: nil}) -} - -func AngrHelp() string { - return "runs the angr docker with ret\n\n" + - "mounts the current working directory as a volume\n\n" + - "note that this command requires docker\n\n" + - "effectively runs:\n" + - "```bash\n" + - theme.ColorGray + "$ " + theme.ColorBlue + "sudo docker pull angr/angr\n" + - theme.ColorGray + "$ " + theme.ColorBlue + "sudo docker run -it -v $PWD:/home/angr/x angr/angr\n" + theme.ColorReset + - "```\n\n" + - "see https://docs.angr.io/en/latest/getting-started/installing.html#installing-with-docker for more information\n" + theme.ColorReset -} - -func Angr(args []string) { - pull := exec.Command("sudo", "docker", "pull", "angr/angr") - - pull.Stdin = os.Stdin - pull.Stdout = os.Stdout - pull.Stderr = os.Stderr - - err := pull.Run() - if err != nil { - log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err) - } - - dir, err := os.Getwd() - if err != nil { - log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err) - } - - run := exec.Command("sudo", "docker", "run", "-it", "-v", fmt.Sprintf("%s:/home/angr/x", dir), "angr/angr") - - run.Stdin = os.Stdin - run.Stdout = os.Stdout - run.Stderr = os.Stderr - - err = run.Run() - - if err != nil { - log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err) - } -}