Skip to content

Commit

Permalink
Small fix on help message
Browse files Browse the repository at this point in the history
  • Loading branch information
j3ssie committed Sep 24, 2020
1 parent b73fab5 commit 6179326
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
17 changes: 7 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
FROM ubuntu

RUN apt-get update -y; apt-get install golang git -y; go get -u github.com/jaeles-project/jaeles; /root/go/bin/jaeles config -a init

WORKDIR /root/go/bin/

VOLUME /root/go/bin/out
VOLUME /root/.jaeles/
FROM golang:1.14.4-buster as builder
RUN GO111MODULE=on GOOS=linux go get -v -ldflags "-linkmode external -extldflags -static" github.com/jaeles-project/jaeles

FROM alpine:latest
WORKDIR /
COPY --from=builder /go/bin/jaeles /bin/jaeles
RUN jaeles config init
EXPOSE 5000

CMD [ "/root/go/bin/jaeles", "server", "--host", "0.0.0.0" ]
ENTRYPOINT ["/bin/jaeles"]
20 changes: 12 additions & 8 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,20 @@ func runConfig(cmd *cobra.Command, args []string) error {
reloadSignature(options.SignFolder, options.Config.SkipMics)
break
case "update":
// only ask if use default Repo
if utils.FolderExists(options.RootFolder) && options.Config.Repo == "" {
mess := fmt.Sprintf("Looks like you already have signatures in %s\nDo you want to to override it?", options.RootFolder)
c := utils.PromptConfirm(mess)
if c {
utils.InforF("Cleaning root folder")
os.RemoveAll(options.RootFolder)
if options.Config.Forced {
os.RemoveAll(options.RootFolder)
} else {
// only ask if use default Repo
if utils.FolderExists(options.RootFolder) && options.Config.Repo == "" {
mess := fmt.Sprintf("Looks like you already have signatures in %s\nDo you want to to override it?", options.RootFolder)
c := utils.PromptConfirm(mess)
if c {
utils.InforF("Cleaning root folder")
os.RemoveAll(options.RootFolder)
}
}
}

core.UpdatePlugins(options)
core.UpdateSignature(options)
reloadSignature(path.Join(options.RootFolder, "base-signatures"), options.Config.SkipMics)
Expand Down Expand Up @@ -331,7 +336,6 @@ func ScanHelp(cmd *cobra.Command, _ []string) {
fmt.Println(libs.Banner())
fmt.Println(cmd.UsageString())
ScanMessage()
fmt.Printf("Official Documentation can be found here: %s\n", color.GreenString(libs.DOCS))
}

// ScanMessage print help message
Expand Down

0 comments on commit 6179326

Please sign in to comment.