From a6a081fc9f5d55e0611e5282685507d781b91751 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Sat, 13 Apr 2024 21:35:31 -0700 Subject: [PATCH] Also create the `recon/` and `brute/` directories within the new repo dir. --- lib/ronin/repos/cli/commands/new.rb | 2 ++ spec/cli/commands/new_spec.rb | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/ronin/repos/cli/commands/new.rb b/lib/ronin/repos/cli/commands/new.rb index 4727f75..a263449 100644 --- a/lib/ronin/repos/cli/commands/new.rb +++ b/lib/ronin/repos/cli/commands/new.rb @@ -69,6 +69,8 @@ def run(path) mkdir path mkdir File.join(path,'exploits') mkdir File.join(path,'payloads') + mkdir File.join(path,'recon') + mkdir File.join(path,'brute') erb 'README.md.erb', File.join(path,'README.md') Dir.chdir(path) do diff --git a/spec/cli/commands/new_spec.rb b/spec/cli/commands/new_spec.rb index 85084b1..635d22e 100644 --- a/spec/cli/commands/new_spec.rb +++ b/spec/cli/commands/new_spec.rb @@ -41,6 +41,14 @@ expect(File.directory?(File.join(@path,'payloads'))).to be(true) end + it "must create the recon/ directory within the repo directory" do + expect(File.directory?(File.join(@path,'recon'))).to be(true) + end + + it "must create the brute/ directory within the repo directory" do + expect(File.directory?(File.join(@path,'brute'))).to be(true) + end + it "must create a git repository within the directory" do expect(File.directory?(File.join(@path,'.git'))).to be(true) end