Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
fix elasticsearch stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Sep 3, 2018
1 parent 25d0e80 commit 68aa0e3
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 503 deletions.
24 changes: 7 additions & 17 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,13 @@
version = "1.0.2"

[[constraint]]
name = "gopkg.in/dancannon/gorethink.v2"
version = "2.2.2"
branch = "master"
name = "github.com/malice-plugins/pkgs"

[[constraint]]
name = "gopkg.in/natefinch/lumberjack.v2"
version = "2.0.0"

[[override]]
name = "github.com/olivere/elastic"
version = "^6.0.0"

[[override]]
name = "github.com/docker/distribution"
revision = "b38e5838b7b2f2ad48e06ec4b500011976080621"
Expand Down
2 changes: 1 addition & 1 deletion commands/elk.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package commands

import (
log "github.com/Sirupsen/logrus"
"github.com/maliceio/go-plugin-utils/database/elasticsearch"
"github.com/malice-plugins/pkgs/database/elasticsearch"
"github.com/maliceio/malice/config"
"github.com/maliceio/malice/malice/database"
"github.com/maliceio/malice/malice/docker/client"
Expand Down
4 changes: 2 additions & 2 deletions commands/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

log "github.com/Sirupsen/logrus"
"github.com/maliceio/go-plugin-utils/database/elasticsearch"
"github.com/maliceio/go-plugin-utils/utils"
"github.com/malice-plugins/pkgs/database/elasticsearch"
"github.com/malice-plugins/pkgs/utils"
"github.com/maliceio/malice/config"
"github.com/maliceio/malice/malice/database"
"github.com/maliceio/malice/malice/docker/client"
Expand Down
12 changes: 7 additions & 5 deletions commands/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

log "github.com/Sirupsen/logrus"
"github.com/fatih/structs"
"github.com/maliceio/go-plugin-utils/database/elasticsearch"
"github.com/maliceio/go-plugin-utils/utils"
"github.com/malice-plugins/pkgs/database/elasticsearch"
"github.com/malice-plugins/pkgs/utils"
"github.com/maliceio/malice/config"
"github.com/maliceio/malice/malice/database"
"github.com/maliceio/malice/malice/docker/client"
Expand All @@ -22,9 +22,11 @@ import (
func cmdScan(path string, logs bool) error {

es := elasticsearch.Database{
URL: config.Conf.DB.URL,
Index: utils.Getopt("MALICE_ELASTICSEARCH_INDEX", "malice"),
Type: "samples",
URL: utils.Getopt("MALICE_ELASTICSEARCH_URL", config.Conf.DB.URL),
Index: utils.Getopt("MALICE_ELASTICSEARCH_INDEX", "malice"),
Type: utils.Getopt("MALICE_ELASTICSEARCH_TYPE", "samples"),
Username: utils.Getopt("MALICE_ELASTICSEARCH_USERNAME", config.Conf.DB.Username),
Password: utils.Getopt("MALICE_ELASTICSEARCH_PASSWORD", config.Conf.DB.Password),
}

if len(path) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions config/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ version = "v0.3.20"
[database]
name = "malice-elastic"
image = "malice/elasticsearch:6.4"
url = "http://localhost:9200"
# url = "http://elasticsearch:9200"
# url = "http://localhost:9200"
url = "http://elasticsearch:9200"
username = ""
password = ""
ports = [9200]
Expand Down
2 changes: 1 addition & 1 deletion malice/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/go-connections/nat"
"github.com/docker/go-units"
"github.com/maliceio/go-plugin-utils/database/elasticsearch"
"github.com/malice-plugins/pkgs/database/elasticsearch"
"github.com/maliceio/malice/config"
"github.com/maliceio/malice/malice/docker/client"
"github.com/maliceio/malice/malice/docker/client/container"
Expand Down
2 changes: 1 addition & 1 deletion malice/docker/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

log "github.com/Sirupsen/logrus"
"github.com/docker/docker/client"
"github.com/maliceio/go-plugin-utils/utils"
"github.com/malice-plugins/pkgs/utils"
"github.com/maliceio/malice/config"
"golang.org/x/net/context"
)
Expand Down
2 changes: 1 addition & 1 deletion malice/persist/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/go-units"
"github.com/dustin/go-jsonpointer"
"github.com/maliceio/go-plugin-utils/utils"
"github.com/malice-plugins/pkgs/utils"
"github.com/maliceio/malice/config"
"github.com/maliceio/malice/malice/docker/client"
er "github.com/maliceio/malice/malice/errors"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
log "github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types/strslice"
runconfigopts "github.com/docker/docker/runconfig/opts"
"github.com/maliceio/go-plugin-utils/utils"
"github.com/malice-plugins/pkgs/utils"
"github.com/maliceio/malice/config"
"github.com/maliceio/malice/malice/docker/client"
"github.com/maliceio/malice/malice/docker/client/container"
Expand Down
4 changes: 2 additions & 2 deletions plugins/templates/go/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

log "github.com/Sirupsen/logrus"
"github.com/fatih/structs"
"github.com/maliceio/go-plugin-utils/database/elasticsearch"
"github.com/maliceio/go-plugin-utils/utils"
"github.com/malice-plugins/pkgs/database/elasticsearch"
"github.com/malice-plugins/pkgs/utils"
"github.com/urfave/cli"
)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 68aa0e3

Please sign in to comment.