зеркало из https://github.com/mozilla/mig.git
[major] reorganize repository structure for `go get mig.ninja/mig`
This is a major change to the structure of the repository and the Makefile, but a minor change in terms of functionalities. It simply changes the structure of the directories to be compliant with Go's idiomatic build methods. I also bought the domain `mig.ninja` and will now be using that as a standard import path for everything. The magic to serve everything under mig.ninja/mig will be documented elsewhere.
This commit is contained in:
Родитель
a6958d2b51
Коммит
e9aa7febf9
|
@ -5,18 +5,18 @@ bin/*
|
||||||
conf/*
|
conf/*
|
||||||
!conf/*.inc
|
!conf/*.inc
|
||||||
!conf/mig-agent-installer.wxs
|
!conf/mig-agent-installer.wxs
|
||||||
src/mig/agent/configuration.go
|
agent/configuration.go
|
||||||
src/mig/*/available_modules.go
|
*/available_modules.go
|
||||||
src/mig/*/*/available_modules.go
|
*/*/available_modules.go
|
||||||
src/mig/*/*/*/available_modules.go
|
*/*/*/available_modules.go
|
||||||
!conf/available_modules.go
|
!conf/available_modules.go
|
||||||
*.a
|
*.a
|
||||||
*.so
|
*.so
|
||||||
*.o
|
*.o
|
||||||
!src/mig
|
|
||||||
*.rpm
|
*.rpm
|
||||||
*.deb
|
*.deb
|
||||||
packages/
|
packages/
|
||||||
tmp/
|
tmp/
|
||||||
src/mig/workers/*/*.html
|
.builddir/
|
||||||
src/mig/modules/*/*.html
|
workers/*/*.html
|
||||||
|
modules/*/*.html
|
||||||
|
|
98
Makefile
98
Makefile
|
@ -29,16 +29,14 @@ PREFIX := /usr/local/
|
||||||
DESTDIR := /
|
DESTDIR := /
|
||||||
BINDIR := bin/$(OS)/$(ARCH)
|
BINDIR := bin/$(OS)/$(ARCH)
|
||||||
AGTCONF := conf/mig-agent-conf.go.inc
|
AGTCONF := conf/mig-agent-conf.go.inc
|
||||||
AVAILMODS := conf/available_modules.go
|
|
||||||
MSICONF := mig-agent-installer.wxs
|
MSICONF := mig-agent-installer.wxs
|
||||||
|
|
||||||
GCC := gcc
|
GCC := gcc
|
||||||
CFLAGS :=
|
CFLAGS :=
|
||||||
LDFLAGS :=
|
LDFLAGS :=
|
||||||
GOOPTS :=
|
GOOPTS :=
|
||||||
GO := GOPATH=$(shell pwd):$(shell go env GOROOT)/bin GOOS=$(OS) GOARCH=$(ARCH) GO15VENDOREXPERIMENT=1 go
|
GO := GOOS=$(OS) GOARCH=$(ARCH) GO15VENDOREXPERIMENT=1 go
|
||||||
GOGETTER := GOPATH=$(shell pwd)/.tmpdeps go get -d
|
GOGETTER := GOPATH=$(shell pwd)/.tmpdeps go get -d
|
||||||
GOTEST := GOPATH=$(shell pwd) GOOS=$(OS) GOARCH=$(ARCH) GO15VENDOREXPERIMENT=1 go test
|
|
||||||
GOLDFLAGS := -ldflags "-X main.version=$(BUILDREV)"
|
GOLDFLAGS := -ldflags "-X main.version=$(BUILDREV)"
|
||||||
GOCFLAGS :=
|
GOCFLAGS :=
|
||||||
MKDIR := mkdir
|
MKDIR := mkdir
|
||||||
|
@ -47,49 +45,57 @@ INSTALL := install
|
||||||
|
|
||||||
all: test mig-agent mig-scheduler mig-api mig-cmd mig-console mig-action-generator mig-action-verifier worker-agent-intel worker-compliance-item
|
all: test mig-agent mig-scheduler mig-api mig-cmd mig-console mig-action-generator mig-action-verifier worker-agent-intel worker-compliance-item
|
||||||
|
|
||||||
mig-agent:
|
mig-agent:
|
||||||
echo building mig-agent for $(OS)/$(ARCH)
|
echo building mig-agent for $(OS)/$(ARCH)
|
||||||
if [ ! -r $(AGTCONF) ]; then echo "$(AGTCONF) configuration file is missing" ; exit 1; fi
|
if [ ! -r $(AGTCONF) ]; then echo "$(AGTCONF) configuration file does not exist" ; exit 1; fi
|
||||||
cp $(AGTCONF) src/mig/agent/configuration.go
|
# test if the agent configuration variable contains something different than the default value
|
||||||
if [ ! -r $(AVAILMODS) ]; then echo "$(AVAILMODS) configuration file is missing" ; exit 1; fi
|
# and if so, replace the link to the default configuration with the provided configuration
|
||||||
cp $(AVAILMODS) src/mig/agent/available_modules.go
|
if [ $(AGTCONF) != "conf/mig-agent-conf.go.inc" ]; then rm agent/configuration.go; cp $(AGTCONF) agent/configuration.go; fi
|
||||||
$(MKDIR) -p $(BINDIR)
|
$(MKDIR) -p $(BINDIR)
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX) $(GOLDFLAGS) mig/agent
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX) $(GOLDFLAGS) mig.ninja/mig/agent
|
||||||
ln -fs "$$(pwd)/$(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX)" "$$(pwd)/$(BINDIR)/mig-agent-latest"
|
ln -fs "$$(pwd)/$(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX)" "$$(pwd)/$(BINDIR)/mig-agent-latest"
|
||||||
[ -x "$(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX)" ] && echo SUCCESS && exit 0
|
[ -x "$(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX)" ] && echo SUCCESS && exit 0
|
||||||
|
|
||||||
mig-scheduler:
|
mig-scheduler:
|
||||||
$(MKDIR) -p $(BINDIR)
|
$(MKDIR) -p $(BINDIR)
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-scheduler $(GOLDFLAGS) mig/scheduler
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-scheduler $(GOLDFLAGS) mig.ninja/mig/scheduler
|
||||||
|
|
||||||
mig-api:
|
mig-api:
|
||||||
$(MKDIR) -p $(BINDIR)
|
$(MKDIR) -p $(BINDIR)
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-api $(GOLDFLAGS) mig/api
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-api $(GOLDFLAGS) mig.ninja/mig/api
|
||||||
|
|
||||||
mig-action-generator:
|
mig-action-generator:
|
||||||
$(MKDIR) -p $(BINDIR)
|
$(MKDIR) -p $(BINDIR)
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-generator $(GOLDFLAGS) mig/client/generator
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-generator $(GOLDFLAGS) mig.ninja/mig/client/generator
|
||||||
|
|
||||||
mig-action-verifier:
|
mig-action-verifier:
|
||||||
$(MKDIR) -p $(BINDIR)
|
$(MKDIR) -p $(BINDIR)
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-verifier $(GOLDFLAGS) mig/client/verifier
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-verifier $(GOLDFLAGS) mig.ninja/mig/client/verifier
|
||||||
|
|
||||||
mig-console:
|
mig-console:
|
||||||
if [ ! -r $(AVAILMODS) ]; then echo "$(AGTCONF) configuration file is missing" ; exit 1; fi
|
|
||||||
cp $(AVAILMODS) src/mig/client/console/available_modules.go
|
|
||||||
$(MKDIR) -p $(BINDIR)
|
$(MKDIR) -p $(BINDIR)
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-console $(GOLDFLAGS) mig/client/console
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-console $(GOLDFLAGS) mig.ninja/mig/client/console
|
||||||
|
|
||||||
mig-cmd:
|
mig-cmd:
|
||||||
if [ ! -r $(AVAILMODS) ]; then echo "$(AGTCONF) configuration file is missing" ; exit 1; fi
|
|
||||||
cp $(AVAILMODS) src/mig/client/cmd/available_modules.go
|
|
||||||
$(MKDIR) -p $(BINDIR)
|
$(MKDIR) -p $(BINDIR)
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-$(OS)$(ARCH) $(GOLDFLAGS) mig/client/cmd
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-$(OS)$(ARCH) $(GOLDFLAGS) mig.ninja/mig/client/cmd
|
||||||
ln -fs "$$(pwd)/$(BINDIR)/mig-$(OS)$(ARCH)" "$$(pwd)/$(BINDIR)/mig"
|
ln -fs "$$(pwd)/$(BINDIR)/mig-$(OS)$(ARCH)" "$$(pwd)/$(BINDIR)/mig"
|
||||||
|
|
||||||
mig-agent-search:
|
mig-agent-search:
|
||||||
$(MKDIR) -p $(BINDIR)
|
$(MKDIR) -p $(BINDIR)
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-search $(GOLDFLAGS) mig/client/agent-search
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-search $(GOLDFLAGS) mig.ninja/mig/client/agent-search
|
||||||
|
|
||||||
|
worker-agent-verif:
|
||||||
|
$(MKDIR) -p $(BINDIR)
|
||||||
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig_agent_verif_worker $(GOLDFLAGS) mig.ninja/mig/workers/agent_verif
|
||||||
|
|
||||||
|
worker-agent-intel:
|
||||||
|
$(MKDIR) -p $(BINDIR)
|
||||||
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-intel-worker $(GOLDFLAGS) mig.ninja/mig/workers/agent_intel
|
||||||
|
|
||||||
|
worker-compliance-item:
|
||||||
|
$(MKDIR) -p $(BINDIR)
|
||||||
|
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-compliance-item-worker $(GOLDFLAGS) mig.ninja/mig/workers/compliance_item
|
||||||
|
|
||||||
go_vendor_dependencies:
|
go_vendor_dependencies:
|
||||||
GOOS="linux" $(GOGETTER) github.com/bobappleyard/readline
|
GOOS="linux" $(GOGETTER) github.com/bobappleyard/readline
|
||||||
|
@ -113,9 +119,9 @@ go_vendor_dependencies:
|
||||||
$(GOGETTER) golang.org/x/net/ipv4
|
$(GOGETTER) golang.org/x/net/ipv4
|
||||||
$(GOGETTER) golang.org/x/net/ipv6
|
$(GOGETTER) golang.org/x/net/ipv6
|
||||||
$(GOGETTER) gopkg.in/gcfg.v1
|
$(GOGETTER) gopkg.in/gcfg.v1
|
||||||
echo 'removing .git from vendored pkg and moving them to src/mig/vendor'
|
echo 'removing .git from vendored pkg and moving them to vendor'
|
||||||
find .tmpdeps/src -type d -name ".git" ! -name ".gitignore" -exec rm -rf {} \; || exit 0
|
find .tmpdeps/src -type d -name ".git" ! -name ".gitignore" -exec rm -rf {} \; || exit 0
|
||||||
cp -ar .tmpdeps/src/* src/mig/vendor/
|
cp -ar .tmpdeps/src/* vendor/
|
||||||
rm -rf .tmpdeps
|
rm -rf .tmpdeps
|
||||||
|
|
||||||
install: mig-agent mig-scheduler
|
install: mig-agent mig-scheduler
|
||||||
|
@ -262,27 +268,21 @@ deb-server: mig-scheduler mig-api worker-agent-intel worker-compliance-item
|
||||||
fpm -C tmp -n mig-server --license GPL --vendor mozilla --description "Mozilla InvestiGator Server" \
|
fpm -C tmp -n mig-server --license GPL --vendor mozilla --description "Mozilla InvestiGator Server" \
|
||||||
-m "Mozilla OpSec" --url http://mig.mozilla.org --architecture $(FPMARCH) -v $(BUILDREV) -s dir -t deb .
|
-m "Mozilla OpSec" --url http://mig.mozilla.org --architecture $(FPMARCH) -v $(BUILDREV) -s dir -t deb .
|
||||||
|
|
||||||
worker-agent-verif:
|
|
||||||
$(MKDIR) -p $(BINDIR)
|
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig_agent_verif_worker $(GOLDFLAGS) mig/workers/agent_verif
|
|
||||||
|
|
||||||
worker-agent-intel:
|
|
||||||
$(MKDIR) -p $(BINDIR)
|
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-intel-worker $(GOLDFLAGS) mig/workers/agent_intel
|
|
||||||
|
|
||||||
worker-compliance-item:
|
|
||||||
$(MKDIR) -p $(BINDIR)
|
|
||||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-compliance-item-worker $(GOLDFLAGS) mig/workers/compliance_item
|
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
make -C doc doc
|
make -C doc doc
|
||||||
|
|
||||||
test: test-modules
|
test: test-modules
|
||||||
#$(GO) test mig/...
|
$(GO) test mig.ninja/mig/agent/...
|
||||||
|
$(GO) test mig.ninja/mig/scheduler/...
|
||||||
|
$(GO) test mig.ninja/mig/api/...
|
||||||
|
$(GO) test mig.ninja/mig/client/...
|
||||||
|
$(GO) test mig.ninja/mig/database/...
|
||||||
|
$(GO) test mig.ninja/mig/workers/...
|
||||||
|
$(GO) test mig.ninja/mig
|
||||||
|
|
||||||
test-modules:
|
test-modules:
|
||||||
# test all modules
|
# test all modules
|
||||||
$(GOTEST) mig/modules...
|
$(GO) test mig.ninja/mig/modules/...
|
||||||
|
|
||||||
clean-agent:
|
clean-agent:
|
||||||
find bin/ -name mig-agent* -exec rm {} \;
|
find bin/ -name mig-agent* -exec rm {} \;
|
||||||
|
@ -290,10 +290,18 @@ clean-agent:
|
||||||
rm -rf tmp
|
rm -rf tmp
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
$(GO) vet mig/...
|
$(GO) vet mig.ninja/mig/agent/...
|
||||||
|
$(GO) vet mig.ninja/mig/scheduler/...
|
||||||
|
$(GO) vet mig.ninja/mig/api/...
|
||||||
|
$(GO) vet mig.ninja/mig/client/...
|
||||||
|
$(GO) vet mig.ninja/mig/modules/...
|
||||||
|
$(GO) vet mig.ninja/mig/database/...
|
||||||
|
$(GO) vet mig.ninja/mig/workers/...
|
||||||
|
$(GO) vet mig.ninja/mig
|
||||||
|
|
||||||
clean: clean-agent
|
clean: clean-agent
|
||||||
rm -rf bin
|
rm -rf bin
|
||||||
rm -rf tmp
|
rm -rf tmp
|
||||||
|
rm -rf .builddir
|
||||||
|
|
||||||
.PHONY: clean clean-agent doc agent-install-script agent-remove-script
|
.PHONY: clean clean-agent doc agent-install-script agent-remove-script
|
||||||
|
|
|
@ -4,6 +4,11 @@ MIG: Mozilla InvestiGator
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/mozilla/mig.svg?branch=master)](https://travis-ci.org/mozilla/mig)
|
[![Build Status](https://travis-ci.org/mozilla/mig.svg?branch=master)](https://travis-ci.org/mozilla/mig)
|
||||||
|
|
||||||
|
Build one-liner:
|
||||||
|
```bash
|
||||||
|
$ go get mig.ninja/mig && cd $GOPATH/src/mig.ninja/mig && make
|
||||||
|
````
|
||||||
|
|
||||||
MIG is OpSec's platform for investigative surgery of remote endpoints.
|
MIG is OpSec's platform for investigative surgery of remote endpoints.
|
||||||
|
|
||||||
MIG is composed of agents installed on all systems of an infrastructure that are
|
MIG is composed of agents installed on all systems of an infrastructure that are
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig/pgp"
|
"mig.ninja/mig/pgp"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
|
@ -9,8 +9,8 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/pgp"
|
"mig.ninja/mig/pgp"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"github.com/jvehent/service-go"
|
"github.com/jvehent/service-go"
|
||||||
"github.com/streadway/amqp"
|
"github.com/streadway/amqp"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"runtime"
|
"runtime"
|
|
@ -0,0 +1 @@
|
||||||
|
../conf/available_modules.go
|
|
@ -9,7 +9,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gopkg.in/gcfg.v1"
|
"gopkg.in/gcfg.v1"
|
|
@ -0,0 +1 @@
|
||||||
|
../conf/mig-agent-conf.go.inc
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"github.com/streadway/amqp"
|
"github.com/streadway/amqp"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
mrand "math/rand"
|
mrand "math/rand"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
|
@ -8,7 +8,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
)
|
)
|
|
@ -9,7 +9,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
)
|
)
|
|
@ -8,7 +8,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
)
|
)
|
|
@ -9,7 +9,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
|
@ -9,7 +9,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/jvehent/cljs"
|
"github.com/jvehent/cljs"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/pgp"
|
"mig.ninja/mig/pgp"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
|
@ -8,7 +8,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/jvehent/cljs"
|
"github.com/jvehent/cljs"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"github.com/gorilla/context"
|
"github.com/gorilla/context"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/jvehent/cljs"
|
"github.com/jvehent/cljs"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
|
@ -7,7 +7,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
|
@ -8,9 +8,9 @@ package main
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"mig/modules/file"
|
"mig.ninja/mig/modules/file"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gopkg.in/gcfg.v1"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
geo "github.com/oschwald/geoip2-golang"
|
geo "github.com/oschwald/geoip2-golang"
|
||||||
|
"gopkg.in/gcfg.v1"
|
||||||
"io"
|
"io"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
migdb "mig/database"
|
migdb "mig.ninja/mig/database"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
|
@ -7,7 +7,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"net"
|
"net"
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,8 +8,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/pgp"
|
"mig.ninja/mig/pgp"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/pgp"
|
"mig.ninja/mig/pgp"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
|
@ -8,8 +8,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/jvehent/cljs"
|
"github.com/jvehent/cljs"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
migdb "mig/database"
|
migdb "mig.ninja/mig/database"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
"regexp"
|
|
@ -3,7 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
|
@ -17,9 +17,9 @@ import (
|
||||||
"golang.org/x/crypto/openpgp"
|
"golang.org/x/crypto/openpgp"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"mig/pgp"
|
"mig.ninja/mig/pgp"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
|
@ -0,0 +1 @@
|
||||||
|
../../conf/available_modules.go
|
|
@ -8,9 +8,9 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"time"
|
"time"
|
|
@ -10,9 +10,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/bobappleyard/readline"
|
"github.com/bobappleyard/readline"
|
||||||
"io"
|
"io"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/bobappleyard/readline"
|
"github.com/bobappleyard/readline"
|
||||||
"io"
|
"io"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
|
@ -0,0 +1 @@
|
||||||
|
../../conf/available_modules.go
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/bobappleyard/readline"
|
"github.com/bobappleyard/readline"
|
||||||
"io"
|
"io"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"github.com/bobappleyard/readline"
|
"github.com/bobappleyard/readline"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"mig/pgp"
|
"mig.ninja/mig/pgp"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
|
@ -8,8 +8,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/jvehent/cljs"
|
"github.com/jvehent/cljs"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
|
@ -8,8 +8,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"mig/client"
|
"mig.ninja/mig/client"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "mig/modules/agentdestroy"
|
_ "mig.ninja/mig/modules/agentdestroy"
|
||||||
_ "mig/modules/file"
|
_ "mig.ninja/mig/modules/file"
|
||||||
_ "mig/modules/memory"
|
_ "mig.ninja/mig/modules/memory"
|
||||||
_ "mig/modules/netstat"
|
_ "mig.ninja/mig/modules/netstat"
|
||||||
_ "mig/modules/ping"
|
_ "mig.ninja/mig/modules/ping"
|
||||||
_ "mig/modules/pkg"
|
_ "mig.ninja/mig/modules/pkg"
|
||||||
_ "mig/modules/scribe"
|
_ "mig.ninja/mig/modules/scribe"
|
||||||
_ "mig/modules/timedrift"
|
_ "mig.ninja/mig/modules/timedrift"
|
||||||
//_ "mig/modules/upgrade"
|
//_ "mig/modules/upgrade"
|
||||||
//_ "mig/modules/example"
|
//_ "mig/modules/example"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import(
|
import(
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"mig"
|
"mig.ninja/mig"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/kardianos/osext"
|
"github.com/kardianos/osext"
|
||||||
"io"
|
"io"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"runtime"
|
"runtime"
|
|
@ -6,7 +6,7 @@
|
||||||
package agentdestroy
|
package agentdestroy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -30,7 +30,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
|
@ -6,7 +6,7 @@
|
||||||
package example
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"golang.org/x/crypto/sha3"
|
"golang.org/x/crypto/sha3"
|
||||||
"hash"
|
"hash"
|
||||||
"io"
|
"io"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
|
@ -6,7 +6,7 @@
|
||||||
package file
|
package file
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -16,7 +16,7 @@ import (
|
||||||
"github.com/mozilla/masche/memaccess"
|
"github.com/mozilla/masche/memaccess"
|
||||||
"github.com/mozilla/masche/process"
|
"github.com/mozilla/masche/process"
|
||||||
"io"
|
"io"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"regexp"
|
"regexp"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
|
@ -8,8 +8,8 @@ package memory
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"net"
|
"net"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
|
@ -6,7 +6,7 @@
|
||||||
package netstat
|
package netstat
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"golang.org/x/net/ipv4"
|
"golang.org/x/net/ipv4"
|
||||||
"golang.org/x/net/ipv6"
|
"golang.org/x/net/ipv6"
|
||||||
"io"
|
"io"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
|
@ -6,7 +6,7 @@
|
||||||
package ping
|
package ping
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
scribelib "github.com/mozilla/scribe/src/scribe"
|
scribelib "github.com/mozilla/scribe/src/scribe"
|
||||||
"io"
|
"io"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"regexp"
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
|
@ -6,7 +6,7 @@
|
||||||
package pkg
|
package pkg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
scribelib "github.com/mozilla/scribe/src/scribe"
|
scribelib "github.com/mozilla/scribe/src/scribe"
|
||||||
"io"
|
"io"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"mig/modules/file"
|
"mig.ninja/mig/modules/file"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
|
@ -6,7 +6,7 @@
|
||||||
package scribe
|
package scribe
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
|
@ -6,7 +6,7 @@
|
||||||
package timedrift
|
package timedrift
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"hash"
|
"hash"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mig/modules"
|
"mig.ninja/mig/modules"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
|
@ -6,7 +6,7 @@
|
||||||
package upgrade
|
package upgrade
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mig/testutil"
|
"mig.ninja/mig/testutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче